Skip to content

session isn't eligible because your requests go through api.deepseek.com - Claude Code

Quick fix

Set CLAUDE_CODE_AUTO_MODE_SERVER to 0 in the env of the CC Switch DeepSeek provider configuration, then confirm the key remains after switching providers.

Error output
We're changing auto mode to no longer charge for classifier requests in Claude Code.

However, this session isn't eligible because your requests go through api.deepseek.com, which isn't compatible with this update.

Nothing breaks: auto mode keeps working, and its classifier requests are billed as before.

To fix it and access the new version of auto mode, ask your gateway to implement:
https://code.claude.com/docs/en/auto-mode-classifier-billing

In Claude Code's Auto Mode billing check, free classifier requests apply only to Anthropic's own API; sessions using third-party endpoints such as DeepSeek are not eligible. The message says Auto Mode will continue working and classifier requests will be billed as before, but the session in this issue terminates or cannot continue. The maintainer explained that setting `CLAUDE_CODE_AUTO_MODE_SERVER=0` prevents Claude Code from requesting the server-side classifier.

The maintainer also noted that CC Switch 4.0.2 and earlier may drop this key from `settings.json` when switching providers or using Local Routing. #7893 fixes this issue and was planned for the next release. A comment also mentions that `setx CLAUDE_CODE_AUTO_MODE_SERVER 0` resolves it.

  1. Add `"CLAUDE_CODE_AUTO_MODE_SERVER": "0"` to the `env` object in the CC Switch DeepSeek provider configuration JSON.

    // 供应商配置 JSON;issue 未提供文件路径
    {
    "env": {
    "CLAUDE_CODE_AUTO_MODE_SERVER": "0"
    }
    }
  2. After switching providers or enabling Local Routing, confirm that the key remains in `settings.json`; CC Switch 4.0.2 and earlier may remove it.

ToolClaude Code
Version2.1.278
PlatformsWindows
What should I do if the problem persists after setting `CLAUDE_CODE_AUTO_MODE_SERVER=0`?
The maintainer recommends confirming that the key is in the `env` of the CC Switch DeepSeek provider configuration JSON and remains there after switching providers or using Local Routing.
Can CC Switch delete this setting when switching providers?
The maintainer said CC Switch 4.0.2 and earlier may drop the key from `settings.json` when switching providers or using Local Routing; #7893 fixes this issue and was planned for the next release.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.