feat: openrouter out of the box experience for goose installations (#3507)

This commit is contained in:
Michael Neale
2025-07-30 17:17:43 +10:00
committed by GitHub
parent faf252a5a7
commit 601c678722
15 changed files with 977 additions and 100 deletions
+25
View File
@@ -0,0 +1,25 @@
export interface OpenRouterSetupStatus {
isRunning: boolean;
error: string | null;
}
export async function startOpenRouterSetup(): Promise<{ success: boolean; message: string }> {
const baseUrl = `${window.appConfig.get('GOOSE_API_HOST')}:${window.appConfig.get('GOOSE_PORT')}`;
const response = await fetch(`${baseUrl}/handle_openrouter`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
});
if (!response.ok) {
console.error('Failed to start Openrouter setup:', response.statusText);
return {
success: false,
message: `Failed to start Openrouter setup ['${response.status}]`,
};
}
const result = await response.json();
return result;
}