feat(onboarding): simplify BYOK to provider + key, fetch models from key

This commit is contained in:
Prakhar Pandey 2026-06-19 01:12:53 +05:30
parent 2ddec07712
commit 92b95f659e
5 changed files with 136 additions and 166 deletions

View file

@ -2,7 +2,7 @@ import { z } from 'zod';
import { RelPath, Encoding, Stat, DirEntry, ReaddirOptions, ReadFileResult, WorkspaceChangeEvent, WriteFileOptions, WriteFileResult, RemoveOptions } from './workspace.js';
import { ListToolsResponse } from './mcp.js';
import { AskHumanResponsePayload, CreateRunOptions, Run, ListRunsResponse, ToolPermissionAuthorizePayload } from './runs.js';
import { LlmModelConfig } from './models.js';
import { LlmModelConfig, LlmProvider } from './models.js';
import { AgentScheduleConfig, AgentScheduleEntry } from './agent-schedule.js';
import { AgentScheduleState } from './agent-schedule-state.js';
import { ServiceEvent } from './service-events.js';
@ -361,6 +361,16 @@ const ipcSchemas = {
error: z.string().optional(),
}),
},
'models:listForProvider': {
req: z.object({
provider: LlmProvider,
}),
res: z.object({
success: z.boolean(),
models: z.array(z.string()).optional(),
error: z.string().optional(),
}),
},
'models:saveConfig': {
req: LlmModelConfig,
res: z.object({