feat: 迁移至 Codex API 并添加 GLM Coding Plan 提供商

This commit is contained in:
2026-02-15 01:05:03 +08:00
parent 262ee1758a
commit 0296ca6564
3 changed files with 47 additions and 103 deletions

View File

@@ -1,4 +1,5 @@
CPA_API_KEY= CODEX_API_KEY=
# MCP
EXA_API_KEY= EXA_API_KEY=
CONTEXT7_API_KEY= CONTEXT7_API_KEY=
# Windows only # Windows only

View File

@@ -4,75 +4,67 @@
"agents": { "agents": {
// ref: https://github.com/code-yeongyu/oh-my-opencode/blob/dev/AGENTS.md#agent-models // 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": "glm-coding-plan/glm-4.7"
"variant": "max"
}, },
"hephaestus": { "hephaestus": {
"model": "cpa-openai/gpt-5.3-codex", "model": "codex/gpt-5.3-codex",
"variant": "medium" "variant": "medium"
}, },
"atlas": {
"model": "cpa-anthropic/claude-sonnet-4-5"
},
"oracle": { "oracle": {
"model": "cpa-openai/gpt-5.2", "model": "codex/gpt-5.2",
"variant": "high" "variant": "high"
}, },
"librarian": { "librarian": {
"model": "cpa-google/gemini-3-flash" "model": "glm-coding-plan/glm-4.7"
}, },
"explore": { "explore": {
"model": "cpa-google/gemini-3-flash" "model": "opencode/gpt-5-nano"
}, },
"multimodal-looker": { "multimodal-looker": {
"model": "cpa-google/gemini-3-flash" "model": "codex/gpt-5.2"
}, },
"prometheus": { "prometheus": {
"model": "cpa-anthropic/claude-opus-4-6", "model": "codex/gpt-5.2",
"variant": "max" "variant": "high"
}, },
"metis": { "metis": {
"model": "cpa-anthropic/claude-opus-4-6", "model": "codex/gpt-5.2",
"variant": "max" "variant": "high"
}, },
"momus": { "momus": {
"model": "cpa-openai/gpt-5.2", "model": "codex/gpt-5.2",
"variant": "medium" "variant": "medium"
}, },
"sisyphus-junior": { "atlas": {
"model": "cpa-anthropic/claude-sonnet-4-5" "model": "codex/gpt-5.2"
} }
}, },
"categories": { "categories": {
// ref: https://github.com/code-yeongyu/oh-my-opencode/blob/dev/docs/category-skill-guide.md#available-built-in-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": "glm-coding-plan/glm-4.7"
"variant": "high"
}, },
"ultrabrain": { "ultrabrain": {
"model": "cpa-openai/gpt-5.3-codex", "model": "codex/gpt-5.3-codex",
"variant": "xhigh" "variant": "xhigh"
}, },
"deep": { "deep": {
"model": "cpa-openai/gpt-5.3-codex", "model": "codex/gpt-5.3-codex",
"variant": "medium" "variant": "medium"
}, },
"artistry": {
"model": "cpa-google/gemini-3-pro",
"variant": "high"
},
"quick": { "quick": {
"model": "cpa-google/gemini-3-flash" "model": "opencode/glm-4.7-free"
}, },
"unspecified-low": { "unspecified-low": {
"model": "cpa-anthropic/claude-sonnet-4-5" "model": "codex/gpt-5.3-codex",
"variant": "medium"
}, },
"unspecified-high": { "unspecified-high": {
"model": "cpa-anthropic/claude-opus-4-6", "model": "codex/gpt-5.3-codex",
"variant": "max" "variant": "medium"
}, },
"writing": { "writing": {
"model": "cpa-google/gemini-3-flash" "model": "glm-coding-plan/glm-4.7"
} }
}, },
"git_master": { "git_master": {

View File

@@ -2,85 +2,22 @@
"$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": "codex/gpt-5.3-codex",
"small_model": "cpa-google/gemini-3-flash", "small_model": "opencode/gpt-5-nano",
"plugin": ["oh-my-opencode@latest"], "plugin": ["oh-my-opencode@latest"],
"provider": { "provider": {
// ref: https://models.dev/ // ref: https://models.dev/
"cpa-anthropic": { "codex": {
"name": "CPA Anthropic", "name": "Codex",
"npm": "@ai-sdk/anthropic",
"options": {
"baseURL": "https://cpa.furtherverse.com/v1",
"apiKey": "{env:CPA_API_KEY}",
"setCacheKey": true
},
"models": {
"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 }
},
"claude-sonnet-4-5": {
"name": "Claude Sonnet 4.5",
"tool_call": true,
"reasoning": false,
"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,
"reasoning": true,
"modalities": {
"input": ["text", "image", "video", "audio", "pdf"],
"output": ["text"]
},
"limit": { "context": 1048576, "output": 65536 }
},
"gemini-3-flash": {
"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", "npm": "@ai-sdk/openai",
"options": { "options": {
"baseURL": "https://cpa.furtherverse.com/v1", "baseURL": "https://codex-api.packycode.com/v1",
"apiKey": "{env:CPA_API_KEY}", "apiKey": "{env:CODEX_API_KEY}",
"setCacheKey": true "setCacheKey": true
}, },
"models": { "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"],
@@ -90,7 +27,6 @@
}, },
"gpt-5.2": { "gpt-5.2": {
"name": "GPT-5.2", "name": "GPT-5.2",
"tool_call": true,
"reasoning": true, "reasoning": true,
"modalities": { "modalities": {
"input": ["text", "image"], "input": ["text", "image"],
@@ -99,7 +35,22 @@
"limit": { "context": 400000, "input": 272000, "output": 128000 } "limit": { "context": 400000, "input": 272000, "output": 128000 }
} }
} }
}
}, },
"disabled_providers": ["opencode"] "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",
"reasoning": true,
"modalities": { "input": ["text"], "output": ["text"] },
"limit": { "context": 204800, "output": 131072 }
}
}
}
}
} }