PR #3726 fixed stale codex_responses persisting when switching providers by hardcoding api_mode=chat_completions in 5 model flows. This broke MiniMax, MiniMax-CN, and Alibaba which use /anthropic endpoints that need anthropic_messages — the hardcoded value overrides the URL-based auto-detection in runtime_provider.py. Fix: pop api_mode from config in the 3 URL-dependent flows (custom endpoint, Kimi, api_key_provider) instead of hardcoding. The runtime resolver already correctly auto-detects api_mode from the base_url suffix (/anthropic -> anthropic_messages, else chat_completions). OpenRouter and Copilot ACP flows keep the explicit value since their api_mode is always known. Reported by stefan171.
192 KiB
192 KiB