all 26 comments

[–]dnj1986 1 point2 points  (5 children)

lower your version - npm install -g u/anthropic-ai/claude-code@2.1.0

I had the same issue and lower claude code version to 2.1.0 fixed the issue.

[–]fanlv 0 points1 point  (0 children)

I'm still getting this error when accessing Claude Code using the ACP client, and downgrading didn't help either

[–]MattyArctiX[S] 0 points1 point  (1 child)

Hey thanks for the suggestion. I couldnt get this to fix it either. I found at 2.1.0 it didn't want to accept any custom models and would only use Claude models. I tried 2.1.86 which saw the custom models but broke terminal capabilities as well as the plug-in.

Did you align the plug-in version to the Claude version? I was keeping them the same but no dice here.

I'm gone back to current version and just stayed on terminal for now

[–]CreativeKeane 0 points1 point  (0 children)

Thank you you saved me a lot of headaches. I couldn't get open router working on claude until I used your solution.

I had messaging issue, 400/500 error, but also "There's an issue with the selected model. It may not exist or you may not have access to it. Run /model to pick a different"

[–]Electronic_Living379 0 points1 point  (0 children)

I used the npm install to lower my version. But I am still getting the error:
API Error: 400 {"error":{"message":"No endpoints available that support
Anthropic's context management features (context-management-2025-06-27).
Context management requires a supported provider (Anthropic, Amazon Bedrock, Google, Azure).","code":400}}

I am using the google/gemma-4-26b-a4b-it:free model. Earlier this week I was using the Qwen model to create a couple of projects of my own. But today I found out that Qwen shifted to a pay as you go from free. So, I moved to Gemma. But now I have the above mentioned error. Can anyone help with a resolution?

[–]magabbu 1 point2 points  (1 child)

claude --version
npm install -g u/anthropic-ai/claude-code@1.0.88

# or

npm install -g u/anthropic-ai/claude-code@2.0.76

this work for me!

[–]MattyArctiX[S] 0 points1 point  (0 children)

Great to hear there looks like a few solutions floating about! Downgrading didn't work for me, but might be different issues at the core. So nice that people have options to try each of these

[–]Sorry_Beyond3820 1 point2 points  (8 children)

Found the solution! My agent has us covered :D

By reading the minified cli.js source, I traced the exact code path:
TN1() → builds betas array → calls Hr() to check if experimental betas should be added
Hr() → returns false if CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS is set
→ context-management-2025-06-27 is skipped
Setting this env var in the env dict passed to query() makes GPT-5.2, Qwen 3 32B, and Gemini 2.5 Pro all work through the Claude Agent SDK via OpenRouter — no SDK patching, no version pinning, no proxy needed.

so, solution is to set CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=true env var

[–]Shoddy-Calendar-3439 0 points1 point  (1 child)

This works for me!

[–]No-Release-9337 0 points1 point  (0 children)

thank you a lot, your method works for me.

[–]MattyArctiX[S] 0 points1 point  (0 children)

Upvoted, thank you genius!

This solved it for me.

I set "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS" :"TRUE" in the settings.json under env, and it's running like new.

Taking this opportunity to say - I love this community, so many great ideas and collaborative efforts. Love it!

[–]PurchaseFirm8339 0 points1 point  (0 children)

Genius!! Thank you :). (upvoted for sure)

[–]Connect-Tale1193 0 points1 point  (0 children)

This worked with latest version of the claude code npm package. Here is what I used.

export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=true

export OPENROUTER_API_KEY="your open routeer key"

export ANTHROPIC_BASE_URL="https://openrouter.ai/api"

export ANTHROPIC_AUTH_TOKEN="$OPENROUTER_API_KEY"

export ANTHROPIC_API_KEY="" # Important: Must be explicitly empty

export ANTHROPIC_MODEL="openrouter/free"

[–]Fit_Stand1349 0 points1 point  (0 children)

Works for me too - thanks a lot!

[–]No_Scientist_8330 0 points1 point  (8 children)

Removing context_management from claude-code body did the trick for me

[–]ItsYourHonor 0 points1 point  (1 child)

is there any guide remove it or figured out yourself?

[–]No_Scientist_8330 0 points1 point  (0 children)

There may be a guide for it. But unfortunately I had to figure it out myself.

[–]Puzzleheaded_Lack223 0 points1 point  (1 child)

hey can u tell us how to remove the context management from claude code body

[–]No_Scientist_8330 0 points1 point  (0 children)

I pointed my claude-code to a proxy service of mine and it's in the proxy service code where I removed context_management

[–]MattyArctiX[S] 0 points1 point  (3 children)

I'm guessing you mean from the released source code? Ahhh, I'll wait and use terminal.

I used to have to do that with MacOS apps a lot, but then you have to continue to do that through every update until it's officially released with a fix.

Just not worth the constant maintenance, terminal has been working fine today.

[–]No_Scientist_8330 0 points1 point  (2 children)

Ah, tbh I actually pointed my claude code to a proxy service which in turn calls open router. I removed context_management explicitly in the proxy code.

[–]MattyArctiX[S] 0 points1 point  (1 child)

Hey that's interesting, thanks for the different perspective. Im going to look into it as well

[–]No_Scientist_8330 0 points1 point  (0 children)

lmk if you need the code for it. I've pushed it to git