can change openrouter model in UI

This commit is contained in:
DaKheera47
2025-12-15 16:12:15 +00:00
parent 4244c908e5
commit 04f771f289
11 changed files with 312 additions and 14 deletions
+14 -1
View File
@@ -8,7 +8,8 @@ import type {
JobsListResponse,
PipelineStatusResponse,
JobSource,
PipelineRun
PipelineRun,
AppSettings,
} from '../../shared/types';
const API_BASE = '/api';
@@ -92,6 +93,18 @@ export async function runPipeline(config?: {
});
}
// Settings API
export async function getSettings(): Promise<AppSettings> {
return fetchApi<AppSettings>('/settings');
}
export async function updateSettings(update: { model?: string | null }): Promise<AppSettings> {
return fetchApi<AppSettings>('/settings', {
method: 'PATCH',
body: JSON.stringify(update),
});
}
// Database API
export async function clearDatabase(): Promise<{
message: string;