mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-30 02:14:43 +08:00
refactor(claude): migrate api_format from settings_config to meta
Move api_format storage from settings_config to ProviderMeta to prevent polluting ~/.claude/settings.json when switching providers. - Add api_format field to ProviderMeta (Rust + TypeScript) - Update ProviderForm to read/write apiFormat from meta - Maintain backward compatibility for legacy settings_config.api_format and openrouter_compat_mode fields (read-only fallback) - Strip api_format from settings_config before writing to live config
This commit is contained in:
@@ -139,6 +139,10 @@ export interface ProviderMeta {
|
||||
costMultiplier?: string;
|
||||
// 供应商计费模式来源
|
||||
pricingModelSource?: string;
|
||||
// Claude API 格式(仅 Claude 供应商使用)
|
||||
// - "anthropic": 原生 Anthropic Messages API 格式,直接透传
|
||||
// - "openai_chat": OpenAI Chat Completions 格式,需要格式转换
|
||||
apiFormat?: "anthropic" | "openai_chat";
|
||||
}
|
||||
|
||||
// Skill 同步方式
|
||||
|
||||
Reference in New Issue
Block a user