#7736·cc-switch

Add per-model `supported_tools` configuration in Model Mapping for Codex

Author: RicardoMilesCreated Sep 28, 2026Updated Sep 28, 2026
Labelsenhancement

Self Checks / 自检

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:

  1. Switch to Chat Completions mode (loses Responses native features)
  2. Manually edit cc-switch-model-catalog.json (risk of being overwritten)
  3. 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:

  1. Let users disable automation_update, image_gen etc. for specific models
  2. Keep Responses API mode and native features for compatible models
  3. Prevent manual JSON edits that get overwritten on provider switch

Example Configuration:

json
{
  "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.
我有兴趣参与开发此功能。