From 0477142263ecef81d2b9c66157f6c745affce3c5 Mon Sep 17 00:00:00 2001 From: Theo Browne Date: Fri, 10 Apr 2026 14:37:10 -0700 Subject: [PATCH] Limit included 1M context to supported Claude models - Keep 1M as the premium default only for models covered by the plan - Leave other models on their existing context defaults --- apps/server/src/provider/Layers/ClaudeProvider.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/server/src/provider/Layers/ClaudeProvider.ts b/apps/server/src/provider/Layers/ClaudeProvider.ts index 9feec28637..b4af3f5972 100644 --- a/apps/server/src/provider/Layers/ClaudeProvider.ts +++ b/apps/server/src/provider/Layers/ClaudeProvider.ts @@ -348,10 +348,17 @@ function claudeAuthMetadata(input: { return undefined; } +/** + * Models where 1M context is included in premium Claude Code subscriptions + * without needing extra usage enabled. + */ +const MODELS_WITH_INCLUDED_1M_CONTEXT = new Set(["claude-opus-4-6"]); + /** * Adjust the built-in model list based on the user's detected subscription. * - * - Premium tiers (Max, Enterprise, Team): 1M context becomes the default. + * - Premium tiers (Max, Enterprise, Team): 1M context becomes the default + * for models that include it in the plan (currently only Opus). * - Other tiers (Pro, free, unknown): 200k context stays the default; * 1M remains available as a manual option so users can still enable it. */ @@ -364,10 +371,11 @@ export function adjustModelsForSubscription( return baseModels; } - // Flip 1M to be the default for premium users + // Flip 1M to be the default only for models that include it in the plan return baseModels.map((model) => { const caps = model.capabilities; if (!caps || caps.contextWindowOptions.length === 0) return model; + if (!MODELS_WITH_INCLUDED_1M_CONTEXT.has(model.slug)) return model; return { ...model,