Files
opencode-config/opencode.jsonc
imbytecat c26370c1a5 refactor: 统一模型引用前缀为 cpa- 并更新API配置
- 更新所有模型引用前缀为 cpa-,统一使用新的代理服务命名规范。
- 添加GLM Coding Plan和CPA系列API网关配置,移除重复的GLM配置并更新PackyCode为CPA Anthropic配置。
2026-01-26 16:20:37 +08:00

97 lines
2.3 KiB
JSON

{
"$schema": "https://opencode.ai/config.json",
"autoupdate": "notify",
"theme": "tokyonight",
"model": "anthropic-gateway/claude-sonnet-4-5",
"small_model": "google-gateway/gemini-3-flash",
"plugin": ["oh-my-opencode"],
"provider": {
"glm-coding-plan": {
"name": "GLM Coding Plan",
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://api.z.ai/api/coding/paas/v4",
"apiKey": "{env:ZAI_API_KEY}"
},
"models": {
"glm-4.7": {
"name": "GLM-4.7"
}
}
},
"cpa-anthropic": {
"name": "CPA Anthropic",
"npm": "@ai-sdk/anthropic",
"options": {
"baseURL": "http://10.0.1.1:8317/v1",
"apiKey": "{env:CPA_API_KEY}"
},
"models": {
"claude-opus-4-5-thinking": {
"name": "Claude Opus 4.5 (Thinking)"
},
"claude-sonnet-4-5-thinking": {
"name": "Claude Sonnet 4.5 (Thinking)"
},
"claude-sonnet-4-5": {
"name": "Claude Sonnet 4.5"
},
"claude-haiku-4-5": {
"name": "Claude Haiku 4.5"
}
}
},
"cpa-google": {
"name": "CPA Google",
"npm": "@ai-sdk/google",
"options": {
"baseURL": "http://10.0.1.1:8317/v1beta",
"apiKey": "{env:CPA_API_KEY}"
},
"models": {
"gemini-3-pro-high": {
"name": "Gemini 3 Pro (High)"
},
"gemini-3-pro-image": {
"name": "Gemini 3 Pro (Image)"
},
"gemini-3-flash": {
"name": "Gemini 3 Flash"
}
}
},
"cpa-openai": {
"name": "CPA OpenAI",
"npm": "@ai-sdk/openai",
"options": {
"baseURL": "http://10.0.1.1:8317/v1",
"apiKey": "{env:CPA_API_KEY}"
},
"models": {
"gpt-5.2": {
"name": "GPT-5.2"
},
"gpt-5.2-codex": {
"name": "GPT-5.2-Codex"
}
}
},
"packycode-anthropic": {
"name": "PackyCode Anthropic",
"npm": "@ai-sdk/anthropic",
"options": {
"baseURL": "https://www.packyapi.com/v1",
"apiKey": "{env:PACKY_API_KEY}"
},
"models": {
"claude-opus-4-5-20251101": {
"name": "Claude Opus 4.5"
},
"claude-sonnet-4-5-20250929": {
"name": "Claude Sonnet 4.5"
}
}
}
}
}