mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
d380b410af
Some native /responses gateways whose first-party models lack OpenAI's hosted web_search tool (MiMo, LongCat, MiniMax) reject a web_search tool with "tool type 'web_search' is not supported by this gateway phase". Codex sends the tool by default (config-driven, not gated by the catalog's supports_search_tool), so cc-switch now writes the top-level `web_search = "disabled"` line per those vendors' official Codex docs. Scope is a blacklist (default-on): only providers matched by base_url host or model brand prefix are disabled; relays serving real GPT, DouBao, Qwen, and any unknown provider keep Codex's default. Matching by model brand (not just host) also catches aggregators (e.g. SiliconFlow) fronting a reject vendor's model. The field is injected alongside model_catalog_json at switch time and removed via an ownership sentinel, so existing providers need no re-save and switching back re-enables web search.