From 1be7ac925da09c4d30f6ffa178a68e371bb3274d Mon Sep 17 00:00:00 2001 From: imbytecat Date: Fri, 27 Feb 2026 13:57:37 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=88=9D=E6=AD=A5=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=E6=A8=A1=E5=9E=8B=E5=88=B0litellm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oh-my-opencode.jsonc | 43 +++++++++++----------- opencode.jsonc | 87 ++++++++++++++++++++------------------------ 2 files changed, 61 insertions(+), 69 deletions(-) diff --git a/oh-my-opencode.jsonc b/oh-my-opencode.jsonc index cb03db9..2d89077 100644 --- a/oh-my-opencode.jsonc +++ b/oh-my-opencode.jsonc @@ -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", + // ref: https://github.com/code-yeongyu/oh-my-opencode/blob/dev/src/agents/AGENTS.md#agent-inventory "agents": { - // ref: https://github.com/code-yeongyu/oh-my-opencode/blob/dev/AGENTS.md#agent-models "sisyphus": { - "model": "cpa-anthropic/claude-opus-4-6", + "model": "litellm/claude-opus-4-6", "variant": "max" }, "hephaestus": { - "model": "cpa-openai/gpt-5.3-codex", + "model": "litellm/gpt-5.3-codex", "variant": "medium" }, "atlas": { - "model": "cpa-anthropic/claude-sonnet-4-5" + "model": "litellm/claude-sonnet-4-5" }, "oracle": { - "model": "cpa-openai/gpt-5.2", + "model": "litellm/gpt-5.2", "variant": "high" }, "librarian": { - "model": "cpa-google/gemini-3-flash" + "model": "litellm/gemini-3-flash" }, "explore": { - "model": "cpa-google/gemini-3-flash" + "model": "litellm/gemini-3-flash" }, "multimodal-looker": { - "model": "cpa-google/gemini-3-flash" + "model": "litellm/gemini-3-flash" }, "prometheus": { - "model": "cpa-anthropic/claude-opus-4-6", + "model": "litellm/claude-opus-4-6", "variant": "max" }, "metis": { - "model": "cpa-anthropic/claude-opus-4-6", + "model": "litellm/claude-opus-4-6", "variant": "max" }, "momus": { - "model": "cpa-openai/gpt-5.2", + "model": "litellm/gpt-5.2", "variant": "medium" }, "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": { - // ref: https://github.com/code-yeongyu/oh-my-opencode/blob/dev/docs/category-skill-guide.md#available-built-in-categories "visual-engineering": { - "model": "cpa-google/gemini-3-pro", + "model": "litellm/gemini-3-pro", "variant": "high" }, "ultrabrain": { - "model": "cpa-openai/gpt-5.3-codex", + "model": "litellm/gpt-5.3-codex", "variant": "xhigh" }, "deep": { - "model": "cpa-openai/gpt-5.3-codex", + "model": "litellm/gpt-5.3-codex", "variant": "medium" }, "artistry": { - "model": "cpa-google/gemini-3-pro", + "model": "litellm/gemini-3-pro", "variant": "high" }, "quick": { - "model": "cpa-google/gemini-3-flash" + "model": "litellm/gemini-3-flash" }, "unspecified-low": { - "model": "cpa-anthropic/claude-sonnet-4-5" + "model": "litellm/claude-sonnet-4-5" }, "unspecified-high": { - "model": "cpa-anthropic/claude-opus-4-6", + "model": "litellm/claude-opus-4-6", "variant": "max" }, "writing": { - "model": "cpa-google/gemini-3-flash" + "model": "litellm/gemini-3-flash" } }, "git_master": { diff --git a/opencode.jsonc b/opencode.jsonc index 6fa0570..9452327 100644 --- a/opencode.jsonc +++ b/opencode.jsonc @@ -2,54 +2,51 @@ "$schema": "https://opencode.ai/config.json", "autoupdate": false, "theme": "system", - "model": "cpa-anthropic/claude-opus-4-6", - "small_model": "cpa-google/gemini-3-flash", + "model": "litellm/claude-opus-4-6", + "small_model": "litellm/claude-haiku-4-5", "plugin": ["oh-my-opencode@latest"], + // ref: https://models.dev/ "provider": { - // ref: https://models.dev/ - "cpa-anthropic": { - "name": "CPA Anthropic", - "npm": "@ai-sdk/anthropic", + "litellm": { + "name": "LiteLLM", + "npm": "@ai-sdk/openai-compatible", "options": { - "baseURL": "https://cpa.furtherverse.com/v1", - "apiKey": "{env:CPA_API_KEY}", + "baseURL": "https://ai.furtherverse.com/v1", + "apiKey": "{env:LITELLM_API_KEY}", "setCacheKey": true }, "models": { + // Anthropic "claude-opus-4-6": { "name": "Claude Opus 4.6", - "tool_call": true, "reasoning": true, "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }, - "limit": { "context": 1000000, "output": 128000 } + "limit": { "context": 200000, "output": 128000 } }, - "claude-sonnet-4-5": { - "name": "Claude Sonnet 4.5", - "tool_call": true, - "reasoning": false, + "claude-sonnet-4-6": { + "name": "Claude Sonnet 4.6", + "reasoning": true, "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }, "limit": { "context": 200000, "output": 64000 } - } - } - }, - "cpa-google": { - "name": "CPA Google", - "npm": "@ai-sdk/google", - "options": { - "baseURL": "https://cpa.furtherverse.com/v1beta", - "apiKey": "{env:CPA_API_KEY}", - "setCacheKey": true - }, - "models": { - "gemini-3-pro": { - "name": "Gemini 3 Pro", - "tool_call": true, + }, + "claude-haiku-4-5": { + "name": "Claude Haiku 4.5", + "reasoning": true, + "modalities": { + "input": ["text", "image", "pdf"], + "output": ["text"] + }, + "limit": { "context": 200000, "output": 64000 } + }, + // Google + "gemini-3.1-pro-preview": { + "name": "Gemini 3.1 Pro", "reasoning": true, "modalities": { "input": ["text", "image", "video", "audio", "pdf"], @@ -57,30 +54,27 @@ }, "limit": { "context": 1048576, "output": 65536 } }, - "gemini-3-flash": { + "gemini-3-flash-preview": { "name": "Gemini 3 Flash", - "tool_call": true, "reasoning": true, "modalities": { "input": ["text", "image", "video", "audio", "pdf"], "output": ["text"] }, "limit": { "context": 1048576, "output": 65536 } - } - } - }, - "cpa-openai": { - "name": "CPA OpenAI", - "npm": "@ai-sdk/openai", - "options": { - "baseURL": "https://cpa.furtherverse.com/v1", - "apiKey": "{env:CPA_API_KEY}", - "setCacheKey": true - }, - "models": { + }, + // OpenAI + "gpt-5.2": { + "name": "GPT-5.2", + "reasoning": true, + "modalities": { + "input": ["text", "image"], + "output": ["text"] + }, + "limit": { "context": 400000, "input": 272000, "output": 128000 } + }, "gpt-5.3-codex": { "name": "GPT-5.3-Codex", - "tool_call": true, "reasoning": true, "modalities": { "input": ["text", "image", "pdf"], @@ -88,9 +82,8 @@ }, "limit": { "context": 400000, "input": 272000, "output": 128000 } }, - "gpt-5.2": { - "name": "GPT-5.2", - "tool_call": true, + "gpt-5.1-codex-mini": { + "name": "GPT-5.1 Codex mini", "reasoning": true, "modalities": { "input": ["text", "image"],