feat(opencode): add OpenCode platform with Zen and GO account types

Keep the internal platform ID opencode_go. Product surface is OpenCode
with account_mode zen|go, model-aware routing across Chat Completions,
Responses, and Anthropic Messages, and X-OpenCode-Session derived from
prompt_cache_key / metadata.user_id so prompt cache can hit.

Unmatched models fall back to /v1/chat/completions. Related to #6742.
This commit is contained in:
刘佳林
2026-09-11 10:05:24 +08:00
parent 0116c5a1e1
commit 242907854d
104 changed files with 2364 additions and 186 deletions
@@ -644,6 +644,7 @@ var platformToLiteLLMProvider = map[string]string{
service.PlatformZhipu: "zhipu",
service.PlatformDeepseek: "deepseek",
service.PlatformMiniMax: "minimax",
service.PlatformOpenCodeGo: "opencode-go",
}
// SyncPricingModels 返回 LiteLLM 定价目录中指定平台的最新模型列表