[BUG] Claude Code *Desktop* app lost the ability to select 1M Context variants of models for 3p inference

Status Fixed / completed
Maintainer reply None cached
Activity 9 comments · opened Jun 18, 2026 · closed Aug 25, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The Claude Desktop app (which contains Cowork + Claude Code for desktop) lost the 1M context variants in its model selector in the latest app updates for 3p inference (e.g., Amazon Bedrock).

What Should Happen?

Claude Code desktop app's model selector should include "1M Context" variants for models that support it

<img width="990" height="272" alt="Image" src="https://github.com/user-attachments/assets/a84435e0-6b88-4f19-91c3-6f9baba931e0" />

Error Messages/Logs

Steps to Reproduce

Download and open the latest Claude desktop app.

Enable third-party inference, e.g., for Amazon Bedrock, and configure models with the "Offer 1M-context variant" option:

<img width="735" height="1340" alt="Image" src="https://github.com/user-attachments/assets/91e0f265-b60e-4252-8f7a-8962925597e6" />

Equivalent JSON:

{
  "inferenceProvider": "bedrock",
  "inferenceCredentialKind": "vendor-profile",
  "inferenceBedrockRegion": "us-east-1",
  "inferenceBedrockProfile": "claude",
  "inferenceModels": [
    {
      "name": "global.anthropic.claude-opus-4-6-v1",
      "labelOverride": "Claude Opus 4.6",
      "supports1m": true,
      "anthropicFamilyTier": "opus"
    },
    {
      "name": "global.anthropic.claude-opus-4-7",
      "labelOverride": "Claude Opus 4.7",
      "supports1m": true,
      "anthropicFamilyTier": "opus"
    },
    {
      "name": "global.anthropic.claude-opus-4-8",
      "labelOverride": "Claude Opus 4.8",
      "supports1m": true,
      "anthropicFamilyTier": "opus",
      "isFamilyDefault": true
    }
  ]
}

Start a new session in Claude Code / Cowork, and observe the model selector only shows the non-1M context variants, which was not the case in previous versions of the app.

This is a serious regression. If you try to resume any existing session that has already exceeded 200K tokens in length and used to be open in a 1M context variant model, the agent will immediately and destructively compact the conversation because as soon as you resume it's on a 200K context variant.

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Claude Desktop 1.12603.1

Claude Code Version

Claude Desktop 1.14271.0

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

9 Comments

github-actions[bot] · 2 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/69109
  2. https://github.com/anthropics/claude-code/issues/68287
  3. https://github.com/anthropics/claude-code/issues/36351

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

zy1917315170 · 2 months ago

如何解决这个问题

GentlemanHu · 2 months ago
如何解决这个问题
/model claude-opus-4-8[1m]

手动输命令可以强制选1M

zy1917315170 · 2 months ago
> 如何解决这个问题 /model claude-opus-4-8[1m] 手动输出命令可以强制选1M

这个我知道 但是每次开新窗口或者重新打开软件就还要输入 有点麻烦

GentlemanHu · 2 months ago
> > 如何解决这个问题 > > > /model claude-opus-4-8[1m] > 手动输出命令可以强制选1M 这个我知道 但是每次开新窗口或者重新打开软件就还要输入 有点麻烦

那目前应该没办法了,只能等官方修;或者试试改配置,里边手动加个1M的配置试试

baslr · 2 months ago

same here:

<img width="1525" height="721" alt="Image" src="https://github.com/user-attachments/assets/b944d19c-f774-4018-bafb-169ccecfd64a" />

GiuseppeCapaldo93 · 2 months ago

Root cause + suggested fix (from the shipped app code)

Adding root-cause detail on top of the symptom already documented here. This isn't only the picker hiding the 1M variants — the 3p desktop actively strips the [1m] signal before it reaches the child, so even a running session is capped at 200K. Two code paths combine:

1. The config transform stores the base name and drops [1m]. The transform that normalizes inferenceModels captures supports1m but keeps only the base name (in effect):

const m = t.name.match(/^(.+?)\[1m\]$/i);
// stores m[1] (base, WITHOUT [1m]) instead of m[0] (full "name[1m]")
return m ? { ...t, name: m[1].trim(), supports1m: !0 } : t;

supports1m is used for the picker badge but never re-consulted when building the child's --model, so the child is spawned with e.g. claude-opus-4-6 (no suffix).

2. [1m] is the child's main 1M trigger — which is exactly why @GentlemanHu's /model claude-opus-4-8[1m] workaround works: it re-supplies the suffix the app dropped:

function is1m(model){ if (killSwitch()) return false; return /\[1m\]/i.test(model); }
// is1m(model) === true  → 1_000_000 window AND attaches the context-1m-2025-08-07 beta
// otherwise             → 200_000

3. The beta fallback is also closed, because the 3p desktop spawns the child with CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS="1", which removes context-1m-2025-08-07 from the beta set. So both routes to 1M are shut at once, silently — no error, picker still shows the model as 1M-capable.

Reproduces beyond Bedrock: same behavior on a LiteLLM-style OpenAI-compatible gateway (Windows desktop) for Opus 4.5/4.6 and Sonnet 4.5/4.6; Haiku correctly stays 200K. Verified locally that letting the [1m] survive to the child restores a 1,000,000-token window for all of them, and reverting returns them to 200K — so the defect is isolated to the desktop's name transform + forced-betas-off, not the models, the gateway, or the child's window logic.

Suggested fix (you already record everything needed): honor supports1m when constructing the child model argument — simplest is to keep the full match (m[0]) in the transform so [1m] survives, or re-append it at spawn when supports1m === true. Additionally, avoid force-setting CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 for 3p (or make it configurable) so the context-1m-2025-08-07 path stays available. Either one restores 1M for 3p/enterprise without users having to retype /model ...[1m] every session.

GiuseppeCapaldo93 · 1 month ago

Still reproduces on Desktop 1.17377.1 (3p / gateway inference).

Confirming the regression is still present in the current build. The [1m]-stripping transform described above is unchanged in 1.17377.1's app.asar — the only difference from earlier builds is that the minified variable in the transform was renamed (earlier i/n → now r), i.e. that code was re-touched but the strip itself was not fixed. The child claude-code process is still spawned with the base name (no [1m]), and CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS is still forced to "1", so both routes to 1M stay closed.

This build also added supports1m help text in the picker UI, yet the value still isn't honored when building the child --model — so the picker advertises 1M while sessions silently cap at 200K.

Repro unchanged: 3p LiteLLM-style OpenAI-compatible gateway, Opus 4.5/4.6 and Sonnet 4.5/4.6 (Haiku correctly stays 200K). Letting the full name[1m] survive to the child restores a 1,000,000-token window for all of them; reverting returns them to 200K.

GiuseppeCapaldo93 · 1 month ago

Update: still reproduces on Desktop 1.19367.0.

Updated to the latest build today (from 1.17377.1) — no change to the defect. The [1m]-stripping transform is still present in app.asar (2 occurrences), and CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS is still force-set to "1". The only churn is cosmetic: the minified variable in the transform changed again — this build actually uses two different vars across the two copies (n and Q), where the previous build had r in both. supports1m is still referenced in the picker UI (~14×) but still isn't honored when building the child --model.

So the 3p Opus/Sonnet 1M variants continue to silently cap at 200K (Haiku correctly stays 200K). Same one-line fix still restores 1M: keep the full name[1m] (the transform's full match) instead of the base group, or re-append [1m] at spawn when supports1m === true.

Timeline with no fix: 1.14271.0 (first broken) → 1.15962.x1.17377.11.19367.0.