[codex] proxy provider model fetches (#777)

* proxy provider model fetches

* add provider model proxy e2e
This commit is contained in:
ekko
2026-05-16 08:57:00 +08:00
committed by GitHub
parent d066806d86
commit 07257a8964
6 changed files with 120 additions and 12 deletions
+11
View File
@@ -80,6 +80,17 @@ export async function fetchAvailableModels(): Promise<AvailableModelsResponse> {
return request<AvailableModelsResponse>('/api/hermes/available-models')
}
export async function fetchProviderModels(data: {
base_url: string
api_key?: string
freeOnly?: boolean
}): Promise<{ models: string[] }> {
return request<{ models: string[] }>('/api/hermes/provider-models', {
method: 'POST',
body: JSON.stringify(data),
})
}
export async function updateDefaultModel(data: {
default: string
provider?: string