mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-03 02:51:17 +08:00
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:
@@ -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[] = [
|
||||
|
||||
Reference in New Issue
Block a user