Compare commits

...

1 Commits

Author SHA1 Message Date
1be7ac925d refactor: 初步迁移模型到litellm 2026-02-27 13:57:37 +08:00
2 changed files with 61 additions and 69 deletions

View File

@@ -1,78 +1,77 @@
// bunx oh-my-opencode doctor --verbose
{ {
"$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json", "$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json",
// ref: https://github.com/code-yeongyu/oh-my-opencode/blob/dev/src/agents/AGENTS.md#agent-inventory
"agents": { "agents": {
// ref: https://github.com/code-yeongyu/oh-my-opencode/blob/dev/AGENTS.md#agent-models
"sisyphus": { "sisyphus": {
"model": "cpa-anthropic/claude-opus-4-6", "model": "litellm/claude-opus-4-6",
"variant": "max" "variant": "max"
}, },
"hephaestus": { "hephaestus": {
"model": "cpa-openai/gpt-5.3-codex", "model": "litellm/gpt-5.3-codex",
"variant": "medium" "variant": "medium"
}, },
"atlas": { "atlas": {
"model": "cpa-anthropic/claude-sonnet-4-5" "model": "litellm/claude-sonnet-4-5"
}, },
"oracle": { "oracle": {
"model": "cpa-openai/gpt-5.2", "model": "litellm/gpt-5.2",
"variant": "high" "variant": "high"
}, },
"librarian": { "librarian": {
"model": "cpa-google/gemini-3-flash" "model": "litellm/gemini-3-flash"
}, },
"explore": { "explore": {
"model": "cpa-google/gemini-3-flash" "model": "litellm/gemini-3-flash"
}, },
"multimodal-looker": { "multimodal-looker": {
"model": "cpa-google/gemini-3-flash" "model": "litellm/gemini-3-flash"
}, },
"prometheus": { "prometheus": {
"model": "cpa-anthropic/claude-opus-4-6", "model": "litellm/claude-opus-4-6",
"variant": "max" "variant": "max"
}, },
"metis": { "metis": {
"model": "cpa-anthropic/claude-opus-4-6", "model": "litellm/claude-opus-4-6",
"variant": "max" "variant": "max"
}, },
"momus": { "momus": {
"model": "cpa-openai/gpt-5.2", "model": "litellm/gpt-5.2",
"variant": "medium" "variant": "medium"
}, },
"sisyphus-junior": { "sisyphus-junior": {
"model": "cpa-anthropic/claude-sonnet-4-5" "model": "litellm/claude-sonnet-4-5"
} }
}, },
// ref: https://github.com/code-yeongyu/oh-my-opencode/blob/dev/docs/reference/configuration.md#built-in-categories
"categories": { "categories": {
// ref: https://github.com/code-yeongyu/oh-my-opencode/blob/dev/docs/category-skill-guide.md#available-built-in-categories
"visual-engineering": { "visual-engineering": {
"model": "cpa-google/gemini-3-pro", "model": "litellm/gemini-3-pro",
"variant": "high" "variant": "high"
}, },
"ultrabrain": { "ultrabrain": {
"model": "cpa-openai/gpt-5.3-codex", "model": "litellm/gpt-5.3-codex",
"variant": "xhigh" "variant": "xhigh"
}, },
"deep": { "deep": {
"model": "cpa-openai/gpt-5.3-codex", "model": "litellm/gpt-5.3-codex",
"variant": "medium" "variant": "medium"
}, },
"artistry": { "artistry": {
"model": "cpa-google/gemini-3-pro", "model": "litellm/gemini-3-pro",
"variant": "high" "variant": "high"
}, },
"quick": { "quick": {
"model": "cpa-google/gemini-3-flash" "model": "litellm/gemini-3-flash"
}, },
"unspecified-low": { "unspecified-low": {
"model": "cpa-anthropic/claude-sonnet-4-5" "model": "litellm/claude-sonnet-4-5"
}, },
"unspecified-high": { "unspecified-high": {
"model": "cpa-anthropic/claude-opus-4-6", "model": "litellm/claude-opus-4-6",
"variant": "max" "variant": "max"
}, },
"writing": { "writing": {
"model": "cpa-google/gemini-3-flash" "model": "litellm/gemini-3-flash"
} }
}, },
"git_master": { "git_master": {

View File

@@ -2,54 +2,51 @@
"$schema": "https://opencode.ai/config.json", "$schema": "https://opencode.ai/config.json",
"autoupdate": false, "autoupdate": false,
"theme": "system", "theme": "system",
"model": "cpa-anthropic/claude-opus-4-6", "model": "litellm/claude-opus-4-6",
"small_model": "cpa-google/gemini-3-flash", "small_model": "litellm/claude-haiku-4-5",
"plugin": ["oh-my-opencode@latest"], "plugin": ["oh-my-opencode@latest"],
// ref: https://models.dev/
"provider": { "provider": {
// ref: https://models.dev/ "litellm": {
"cpa-anthropic": { "name": "LiteLLM",
"name": "CPA Anthropic", "npm": "@ai-sdk/openai-compatible",
"npm": "@ai-sdk/anthropic",
"options": { "options": {
"baseURL": "https://cpa.furtherverse.com/v1", "baseURL": "https://ai.furtherverse.com/v1",
"apiKey": "{env:CPA_API_KEY}", "apiKey": "{env:LITELLM_API_KEY}",
"setCacheKey": true "setCacheKey": true
}, },
"models": { "models": {
// Anthropic
"claude-opus-4-6": { "claude-opus-4-6": {
"name": "Claude Opus 4.6", "name": "Claude Opus 4.6",
"tool_call": true,
"reasoning": true, "reasoning": true,
"modalities": { "modalities": {
"input": ["text", "image", "pdf"], "input": ["text", "image", "pdf"],
"output": ["text"] "output": ["text"]
}, },
"limit": { "context": 1000000, "output": 128000 } "limit": { "context": 200000, "output": 128000 }
}, },
"claude-sonnet-4-5": { "claude-sonnet-4-6": {
"name": "Claude Sonnet 4.5", "name": "Claude Sonnet 4.6",
"tool_call": true, "reasoning": true,
"reasoning": false,
"modalities": { "modalities": {
"input": ["text", "image", "pdf"], "input": ["text", "image", "pdf"],
"output": ["text"] "output": ["text"]
}, },
"limit": { "context": 200000, "output": 64000 } "limit": { "context": 200000, "output": 64000 }
} },
} "claude-haiku-4-5": {
}, "name": "Claude Haiku 4.5",
"cpa-google": { "reasoning": true,
"name": "CPA Google", "modalities": {
"npm": "@ai-sdk/google", "input": ["text", "image", "pdf"],
"options": { "output": ["text"]
"baseURL": "https://cpa.furtherverse.com/v1beta", },
"apiKey": "{env:CPA_API_KEY}", "limit": { "context": 200000, "output": 64000 }
"setCacheKey": true },
}, // Google
"models": { "gemini-3.1-pro-preview": {
"gemini-3-pro": { "name": "Gemini 3.1 Pro",
"name": "Gemini 3 Pro",
"tool_call": true,
"reasoning": true, "reasoning": true,
"modalities": { "modalities": {
"input": ["text", "image", "video", "audio", "pdf"], "input": ["text", "image", "video", "audio", "pdf"],
@@ -57,30 +54,27 @@
}, },
"limit": { "context": 1048576, "output": 65536 } "limit": { "context": 1048576, "output": 65536 }
}, },
"gemini-3-flash": { "gemini-3-flash-preview": {
"name": "Gemini 3 Flash", "name": "Gemini 3 Flash",
"tool_call": true,
"reasoning": true, "reasoning": true,
"modalities": { "modalities": {
"input": ["text", "image", "video", "audio", "pdf"], "input": ["text", "image", "video", "audio", "pdf"],
"output": ["text"] "output": ["text"]
}, },
"limit": { "context": 1048576, "output": 65536 } "limit": { "context": 1048576, "output": 65536 }
} },
} // OpenAI
}, "gpt-5.2": {
"cpa-openai": { "name": "GPT-5.2",
"name": "CPA OpenAI", "reasoning": true,
"npm": "@ai-sdk/openai", "modalities": {
"options": { "input": ["text", "image"],
"baseURL": "https://cpa.furtherverse.com/v1", "output": ["text"]
"apiKey": "{env:CPA_API_KEY}", },
"setCacheKey": true "limit": { "context": 400000, "input": 272000, "output": 128000 }
}, },
"models": {
"gpt-5.3-codex": { "gpt-5.3-codex": {
"name": "GPT-5.3-Codex", "name": "GPT-5.3-Codex",
"tool_call": true,
"reasoning": true, "reasoning": true,
"modalities": { "modalities": {
"input": ["text", "image", "pdf"], "input": ["text", "image", "pdf"],
@@ -88,9 +82,8 @@
}, },
"limit": { "context": 400000, "input": 272000, "output": 128000 } "limit": { "context": 400000, "input": 272000, "output": 128000 }
}, },
"gpt-5.2": { "gpt-5.1-codex-mini": {
"name": "GPT-5.2", "name": "GPT-5.1 Codex mini",
"tool_call": true,
"reasoning": true, "reasoning": true,
"modalities": { "modalities": {
"input": ["text", "image"], "input": ["text", "image"],