feat: Add OpenAI API type configuration and update provider settings

This commit is contained in:
outlook84
2026-05-25 01:23:36 +08:00
committed by Xubin Ren
parent 92915ea424
commit d472595417
12 changed files with 147 additions and 6 deletions
+1
View File
@@ -290,6 +290,7 @@ export async function updateProviderSettings(
query.set("provider", update.provider);
if (update.apiKey !== undefined) query.set("api_key", update.apiKey);
if (update.apiBase !== undefined) query.set("api_base", update.apiBase);
if (update.apiType !== undefined) query.set("api_type", update.apiType);
return request<SettingsPayload>(
`${base}/api/settings/provider/update?${query}`,
token,
+2
View File
@@ -206,6 +206,7 @@ export interface SettingsPayload {
api_key_hint?: string | null;
api_base?: string | null;
default_api_base?: string | null;
api_type?: "auto" | "chat_completions" | "responses";
}>;
web_search: {
provider: string;
@@ -391,6 +392,7 @@ export interface ProviderSettingsUpdate {
provider: string;
apiKey?: string;
apiBase?: string;
apiType?: "auto" | "chat_completions" | "responses";
}
export interface WebSearchSettingsUpdate {