Author’s note: A breakdown of the “billing mechanism compatibility warning” that appears in Auto Mode after connecting Claude Code to the Deepseek API — what it means, temporary workarounds, and compatibility requirements for API proxy platforms.
Recently, quite a few developers have connected Claude Code to the Deepseek API and found that when they turn on Auto Mode (automatic permission mode), a compatibility warning about the classifier billing mechanism appears. Anthropic has already documented this mechanism change in its official docs, so this notice isn’t a sporadic glitch, nor is it an internet rumor.
This isn’t a Deepseek API error, and it isn’t a problem with your account. It comes from a recent Claude Code release changing how Auto Mode handles security review, and third-party upstreams like api.deepseek.com don’t support the new mechanism yet. This article sums up what the warning means, how to deal with it right now, and what it means for API proxy platforms.
Key takeaway: In 3 minutes, get the full picture of the Claude Code Auto Mode billing compatibility warning, plus copy-and-paste configuration steps and a gateway compatibility checklist.

Claude Code Auto Mode Billing Warning: Key Facts at a Glance
Here’s a table that lays out the essentials of this change so you can quickly tell whether it affects you.
| Item | Details |
|---|---|
| Issued by | Anthropic (Claude Code official) |
| Feature involved | Claude Code Auto Mode’s safety classifier |
| Core change | Safety review moves from “client sends a separate classification request” to “server completes it within the main request” |
| Billing impact | Under the new mechanism, classifier requests are no longer billed separately |
| Who’s affected | Developers using Claude Code through third-party Anthropic-compatible endpoints such as Deepseek |
| Current status | You can still fall back to the old mechanism, but classifier requests consume tokens the old way |
| Future plans | Anthropic says a future version will remove the legacy fallback |
What the Claude Code Auto Mode classifier actually is
Auto Mode is designed to cut down on manual confirmation clicks. Before Claude Code runs a shell command, accesses the network, or performs any other potentially risky action, it sends the action through a classifier to decide whether it’s safe. If it passes, it runs automatically. If it fails, you either confirm it yourself or it gets rejected outright.
Under the old mechanism, that classifier check was a separate request fired off by Claude Code on its own, and that request consumed tokens. In other words, every time you let Claude Code run a command automatically, there was potentially an extra classification request on top of the main conversation request.
How the old and new billing mechanisms differ
Anthropic has now moved the safety review server-side: the main request carries safety-review fields, the server returns the review result while handling that main request, and the classifier request is therefore no longer billed separately. For official API users, this is a genuine cost optimization.
The catch is that the new mechanism requires the upstream server to implement this safety-review protocol. Deepseek’s Anthropic-compatible endpoint doesn’t implement it yet, so when Claude Code detects that the upstream doesn’t support it, it shows a compatibility warning and falls back to the old approach.
| Comparison | Old mechanism | New mechanism |
|---|---|---|
| Where safety review happens | Claude Code sends a separate classification request | Server completes it inside the main request |
| Classifier tokens | Billed separately | No longer billed separately |
| Official compatible services | Supported | Supported |
| Current Deepseek endpoint | Supported, billed the old way | Not yet compatible |
| Future versions | Kept as a fallback path | Legacy fallback will be removed |

The “fallback removal in the future” part deserves special attention. Once the fallback is gone and the upstream still can’t return safety-review results, Claude Code will have no choice but to ask your permission for each relevant action one by one—or simply refuse to run it. At that point, the “auto” in Auto Mode will be a lot less automatic.
How to Handle the Auto Mode Warning After Connecting Deepseek to Claude Code
If your goal is just to keep driving Claude Code with Deepseek, the simplest approach is to actively turn off server-side classifier mode so that Claude Code falls back to the legacy mechanism and stops repeatedly checking and prompting.
Method 1: Terminal Environment Variable
Run this in your macOS or Linux terminal:
export CLAUDE_CODE_AUTO_MODE_SERVER=0
claude
This only takes effect for the current terminal session, which makes it handy for a quick test. If you want it to persist, add that export line to your ~/.zshrc or ~/.bashrc.
Option 2: Write It into settings.json
The more recommended approach is to write it into Claude Code’s config file at ~/.claude/settings.json:
{
"env": {
"CLAUDE_CODE_AUTO_MODE_SERVER": "0"
}
}
If the config file already has other content (like an upstream URL, model name, or permission rules), just merge the CLAUDE_CODE_AUTO_MODE_SERVER field into the existing env object. Never overwrite the whole file, or you’ll lose your existing settings.
What Actually Happens Once Server Mode Is Off
The changes after turning it off can be summed up in this table:
| Item | Before (default) | After (=0) |
|---|---|---|
| Compatibility warnings | Shown every time an incompatible upstream is detected | No longer pop up |
| Classifier mechanism | Attempts server-side review, falls back on failure | Uses the old classifier directly |
| Classifier tokens | Consumed as usual after fallback | Consumed as usual |
| Free classifier | Unavailable when the upstream is incompatible | Unavailable |
| Long-term availability | The fallback path will be removed | Officially framed as a temporary workaround, may be removed in the future |
In other words, this environment variable is just a “mute button” — it doesn’t give Deepseek any new free-classifier capability. It solves the notification annoyance, not the billing problem itself.
Use /status to confirm the actual status
After configuration is complete, run the official check command in Claude Code:
/status
Pay close attention to the Auto mode server item in the output: Enabled means server-side review is currently in use; Disabled means it has fallen back and is not using server-side review. If you just set CLAUDE_CODE_AUTO_MODE_SERVER=0, it should show Disabled here.
First verify upstream model availability
Before troubleshooting Auto Mode issues, it’s a good idea to confirm that the upstream model itself can be called normally, so you don’t mistake network or authentication issues for billing compatibility problems. Below is a minimal connectivity test using the OpenAI-compatible API:
import openai
client = openai.OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.apiyi.com/v1" # APIYI unified API, can switch among multiple models
)
resp = client.chat.completions.create(
model="deepseek-chat",
messages=[{"role": "user", "content": "回复 OK 即可"}]
)
print(resp.choices[0].message.content)
View the complete multi-model connectivity check script
import time
import openai
from typing import List
client = openai.OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.apiyi.com/v1"
)
def check_models(models: List[str]) -> None:
"""Check whether multiple models can be called normally one by one, and output the elapsed time"""
for model in models:
start = time.time()
try:
resp = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": "回复 OK 即可"}],
max_tokens=10
)
cost = time.time() - start
text = resp.choices[0].message.content.strip()
print(f"[成功] {model}: {text}({cost:.2f}s)")
except Exception as e:
print(f"[失败] {model}: {e}")
if __name__ == "__main__":
# Model names are subject to the list actually provided by the platform
check_models(["deepseek-chat", "claude-sonnet-4-5", "gpt-4o-mini"])
🚀 Quick start tip: When troubleshooting Claude Code compatibility issues, it saves a lot of time to first test upstream providers like DeepSeek and Claude with a single API key. APIYI apiyi.com provides an OpenAI-compatible unified API, and new users get free testing credits—great for quick multi-model connectivity comparisons.
Impact of the New Claude Code Auto Mode Mechanism on API Proxy Platforms
For regular users, setting an environment variable solves the problem. But for operators of API proxy platforms and self-hosted gateways, this adjustment is worth paying closer attention to—because the same kind of compatibility issue will eventually affect your users too.
Auto Mode Safety Review Fields Gateways Need to Pass Through
According to Anthropic’s official documentation, gateways that support server-side safety review need to correctly handle the following fields:
| Location | Field | Requirement |
|---|---|---|
| Request Header | anthropic-beta |
Pass through as-is |
| Request Body | safeguards |
Pass through as-is |
| Response Body | safeguard_results |
Preserve and return correctly |
| Streaming | Safety review result-related fields | Must not be lost |
| Tool Use | Tool Use ID | Must not be modified arbitrarily |
The two types of gateway implementations most prone to problems are these. One is gateways that apply a “field whitelist” filter, which simply drop the unrecognized safeguards and safeguard_results. The other is gateways that reassemble streaming responses, swallowing review-result-related events during SSE event conversion. Some gateways also rewrite Tool Use IDs for internal tracking, which equally breaks the protocol.
Below is an illustrative snippet of gateway pass-through logic; the core idea is “don’t delete fields you don’t recognize”:
def forward_request(incoming_headers: dict, incoming_body: dict) -> tuple:
"""Illustrative: pass through Anthropic safety review-related fields without whitelist trimming"""
headers = {k: v for k, v in incoming_headers.items()
if k.lower() not in ("host", "content-length")}
# Keep anthropic-beta as-is; do not merge or rewrite
body = dict(incoming_body) # Preserve all fields, including safeguards
return headers, body
def forward_response(upstream_body: dict) -> dict:
"""Illustrative: return the response body as-is, preserving safeguard_results and tool_use id"""
return upstream_body
Pass-through fields don’t equal upstream support
There’s a very important caveat here: the gateway passing these fields through doesn’t mean the Deepseek model supports Anthropic’s server-side safety review. If the upstream itself hasn’t implemented this protocol, then no matter how thoroughly the proxy service is refined, you still won’t get safeguard_results, and naturally you won’t be able to take advantage of the free classifier.
So proxy platforms need to evaluate separately based on the upstream type:
- Anthropic official API as upstream: Prioritize checking whether the pass-through chain is complete. As long as the fields aren’t dropped, users have a chance to use the new mechanism directly.
- Deepseek and other third-party models as upstream: Even if they’re compatible with the Anthropic Messages API format, that doesn’t mean they support this dedicated safety review protocol—you’ll need to wait for the upstream vendor to implement it themselves.

Claude Code Auto Mode strategies for different upstreams
Translating the analysis above into concrete scenarios, we can organize it into a decision table:
| Upstream type | Server-side safety review | Recommended approach | Available platforms |
|---|---|---|---|
| Anthropic official Claude models | Supported (chain requires complete pass-through) | Keep defaults, confirm /status shows Enabled |
Official API, APIYI apiyi.com and other aggregation platforms (based on actual pass-through testing) |
| Deepseek Anthropic-compatible interface | Not yet supported | Set CLAUDE_CODE_AUTO_MODE_SERVER=0 |
Deepseek official interface, etc. |
| Other third-party compatible models | Usually not supported | Same as above, and keep an eye on future version changes | Various vendors’ compatible interfaces |
| Self-built gateway forwarding to official API | Depends on gateway implementation | Check each item against the field list for pass-through | Self-built gateway |
Long-Term Impact on Developers
- Cost: If you keep using Deepseek to run Auto Mode, classifier tokens still cost money; with an upstream that supports the new mechanism, you can eliminate that expense.
- Experience: Once the legacy fallback is removed, incompatible upstreams may cause Auto Mode to frequently ask for permission or even refuse to execute, reducing the level of automation.
- Selection: When choosing a model upstream for Claude Code, “whether it supports server-side safety review” will become a consideration alongside price and speed.
💡 Recommendation: If you rely heavily on Auto Mode to execute commands automatically, put Anthropic’s native Claude models and Deepseek in the same workflow for comparative testing. Use APIYI (apiyi.com) to switch between upstreams with the same key, so you can observe differences in token consumption and permission pop-up frequency on real tasks.
Claude Code Auto Mode Billing Warning FAQ
Q1: What does the billing warning mean after connecting Claude Code to Deepseek?
This is a compatibility notice from Claude Code about the Auto Mode classifier billing mechanism. It means the current upstream (such as `api.deepseek.com`) doesn’t support the new server-side safety review. Claude Code has fallen back to the legacy mechanism, and classifier requests will continue to consume tokens separately. It isn’t a Deepseek error, and it has nothing to do with your account status.
Q2: What are the side effects of setting CLAUDE_CODE_AUTO_MODE_SERVER=0?
The main effect is that the warning no longer appears, and the legacy classifier is used directly. The side effect is that you’ve explicitly given up server-side review, and classifier tokens are still billed as usual. In addition, the official documentation positions this environment variable as a temporary solution; it may be removed in future versions, at which point you’ll need to re-evaluate your upstream choice.
Q3: When will the legacy classifier fallback be removed?
Officially, all that’s stated is that “the legacy fallback will be removed in a future version.” The reference materials don’t give a specific version number or date. When upgrading Claude Code, keep an eye on the release notes, and after upgrading, use `/status` to check the `Auto mode server` status.
Q4: How can I actually use the free server-side classifier?
The prerequisite is that the upstream supports Anthropic’s server-side safety review protocol—currently mainly Anthropic’s official Claude models—and the intermediate chain must fully pass through `anthropic-beta`, `safeguards`, and `safeguard_results`. To verify quickly, you can get test credits through APIYI (apiyi.com), run Auto Mode once with a native Claude model, and then check with `/status` whether it shows `Enabled`.
Q5: My API proxy gateway already passes the fields through, so why is Deepseek still incompatible?
Because pass-through only solves the “fields aren’t lost” problem. Whether `safeguard_results` can be returned depends on the upstream model service itself. Deepseek’s API is compatible with the Anthropic Messages API format, but that doesn’t mean it implements this safety review protocol. In this case, the gateway side has already done its part; you can only wait for upstream support.
Q6: How can I judge the compatibility of an aggregation platform with Claude Code?
You can test each item against the field checklist in this article: whether the request headers retain `anthropic-beta`, whether the request body retains `safeguards`, whether the review results are returned in the response and streaming events, and whether the Tool Use ID is rewritten. On multi-model platforms like APIYI (apiyi.com), it’s also recommended to verify these checks as part of the Claude Code native API pass-through compatibility checklist.
Claude Code Auto Mode Billing Compatibility Key Takeaways
- What the warning really means: Auto Mode’s classifier billing mechanism changed — nothing to do with a Deepseek account or API outage.
- What’s new: Security review is now handled server-side inside the main request, so the classifier is no longer billed separately.
- Current state: Deepseek still works with Auto Mode, but classifier requests keep consuming tokens the old way.
- Temporary workaround: Set
CLAUDE_CODE_AUTO_MODE_SERVER=0to silence the notice — though you won’t get the free classifier. - Status check: Run
/statusto see whetherAuto mode serverisEnabledorDisabled. - Gateway essentials: Pass
safeguardsandsafeguard_resultsthrough intact, but if the upstream doesn’t support them, passthrough is a no-op. - Getting started: Use a single APIYI apiyi.com key to compare the Claude native and Deepseek paths side by side.
Claude Code Auto Mode Billing Warning: Summary
The Auto Mode warning that shows up after connecting Claude Code to the Deepseek API is really just a heads-up about an upgrade to the billing and security-review architecture:
- It’s not a bug: Deepseek can still drive Auto Mode normally — the classifier just keeps charging the old way.
- There’s a short-term fix: Disable server mode via an environment variable or
settings.jsonand the notice goes away. - Long term, you’ll need to choose a path: The legacy fallback will eventually be removed, so teams that lean heavily on Auto Mode should figure out early whether their upstream supports server-side security review.
- Gateways have to keep up: Proxy platforms should add
anthropic-beta,safeguards,safeguard_results, and Tool Use ID to their passthrough checklist.
If Deepseek is your daily driver, just set CLAUDE_CODE_AUTO_MODE_SERVER=0 and you’re done. If you’d rather have the free classifier, run a comparison test with a native Claude model. The quickest way to see how different upstreams actually behave in Claude Code is through APIYI at apiyi.com — the platform offers free trial credits and a unified interface across models.
📚 References
-
Anthropic Official Docs – Auto Mode Classifier Billing: Claude Code’s old vs. new billing mechanism and gateway compatibility requirements
- Link:
code.claude.com/docs/en/auto-mode-classifier-billing - Description: Official documentation covering the
CLAUDE_CODE_AUTO_MODE_SERVERenvironment variable, the/statuscheck method, and field pass-through requirements
- Link:
-
DeepSeek API Official Interface: Upstream endpoint for the Anthropic-compatible interface
- Link:
api.deepseek.com - Description: The third-party upstream discussed in this article, which currently doesn’t support server-side safety review
- Link:
Author: APIYI Technical Team
Technical Discussion: For questions about connecting Claude Code and upstream compatibility, check out the docs.apiyi.com documentation center for more configuration resources
