Add per-model `supported_tools` configuration in Model Mapping for Codex
Self Checks / 自检
I have searched for existing issues, including closed ones. 我已搜索过已有的 Issue,包括已关闭的。
Related App / 涉及应用
Codex
Problem or Motivation / 问题或动机
When using non-OpenAI models (DeepSeek, GLM, etc.) with Codex's native Responses API, the client automatically injects built-in tools like automation_update and image_gen.imagegen. These tools use advanced JSON Schema features (oneOf, anyOf) that many third-party models don't support, causing 400 errors:
Invalid schema for function 'automation_update': schema must have type 'object' and not have 'oneOf'/'anyOf'/'allOf' at the top level.
Proposed Solution / 建议方案
Current Workaround: Users must either:
- Switch to Chat Completions mode (loses Responses native features)
- Manually edit
cc-switch-model-catalog.json(risk of being overwritten) - Use only specific models that gracefully ignore invalid tools (e.g., Kimi-k2.5)
Request:
Add a supported_tools field in the Model Mapping UI/table, allowing per-model configuration of which tools to enable/disable. This would:
- Let users disable
automation_update,image_genetc. for specific models - Keep Responses API mode and native features for compatible models
- Prevent manual JSON edits that get overwritten on provider switch
Example Configuration:
{
"slug": "deepseek-v4-pro",
"experimental_supported_tools": ["bash", "python", "str_replace_editor"],
"unsupported_builtin_tools": ["automation_update", "image_gen"]
}
### Additional Context / 补充信息
- Related to Codex Desktop's wire_api = "responses" behavior
- Different from experimental_supported_tools which Codex may ignore for built-ins
- Would benefit users with custom/private model gateways
### Contribution / 参与贡献
- [x] I am interested in contributing to this feature.
我有兴趣参与开发此功能。Source: farion1231/cc-switch