feat(claude): add apiFormat support for provider presets

Allow preset providers to specify API format (anthropic or openai_chat),
enabling third-party proxy services that use OpenAI Chat Completions format.
This commit is contained in:
Jason
2026-01-30 15:22:39 +08:00
parent 065d5db843
commit 162800e18e
2 changed files with 13 additions and 0 deletions
+5
View File
@@ -43,6 +43,11 @@ export interface ProviderPreset {
// 图标配置
icon?: string; // 图标名称
iconColor?: string; // 图标颜色
// Claude API 格式(仅 Claude 供应商使用)
// - "anthropic" (默认): Anthropic Messages API 格式,直接透传
// - "openai_chat": OpenAI Chat Completions 格式,需要格式转换
apiFormat?: "anthropic" | "openai_chat";
}
export const providerPresets: ProviderPreset[] = [