@devries-cameron20 / t3code-1 / commits / 678f827f0b
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Remove Claude subscription-based model adjustment (#1899)

Julius Marminge committed Apr 10, 2026 at 15:00 UTC 678f827f0b0713ab5ea9512ce12e034c2c923be8
1 file changed +3 -52
apps/server/src/provider/Layers/ClaudeProvider.ts
+3 -52
@@ -276,18 +276,6 @@ function extractClaudeAuthMethodFromOutput(result: CommandResult): string | unde
276 return Option.getOrUndefined(findAuthMethod(parsed.success));
277 }
278
279 -// ── Dynamic model capability adjustment ─────────────────────────────
280 -
281 -/** Subscription types where the 1M context window is included in the plan. */
282 -const PREMIUM_SUBSCRIPTION_TYPES = new Set([
283 - "max",
284 - "maxplan",
285 - "max5",
286 - "max20",
287 - "enterprise",
288 - "team",
289 -]);
290 -
279 function toTitleCaseWords(value: string): string {
280 return value
281 .split(/[\s_-]+/g)
@@ -348,41 +336,6 @@ function claudeAuthMetadata(input: {
336 return undefined;
337 }
338
351 -/**
352 - * Adjust the built-in model list based on the user's detected subscription.
353 - *
354 - * - Premium tiers (Max, Enterprise, Team): 1M context becomes the default.
355 - * - Other tiers (Pro, free, unknown): 200k context stays the default;
356 - * 1M remains available as a manual option so users can still enable it.
357 - */
358 -export function adjustModelsForSubscription(
359 - baseModels: ReadonlyArray<ServerProviderModel>,
360 - subscriptionType: string | undefined,
361 -): ReadonlyArray<ServerProviderModel> {
362 - const normalized = subscriptionType?.toLowerCase().replace(/[\s_-]+/g, "");
363 - if (!normalized || !PREMIUM_SUBSCRIPTION_TYPES.has(normalized)) {
364 - return baseModels;
365 - }
366 -
367 - // Flip 1M to be the default for premium users
368 - return baseModels.map((model) => {
369 - const caps = model.capabilities;
370 - if (!caps || caps.contextWindowOptions.length === 0) return model;
371 -
372 - return {
373 - ...model,
374 - capabilities: {
375 - ...caps,
376 - contextWindowOptions: caps.contextWindowOptions.map((opt) =>
377 - opt.value === "1m"
378 - ? { value: opt.value, label: opt.label, isDefault: true as const }
379 - : { value: opt.value, label: opt.label },
380 - ),
381 - },
382 - };
383 - });
384 -}
385 -
339 // ── SDK capability probe ────────────────────────────────────────────
340
341 const CAPABILITIES_PROBE_TIMEOUT_MS = 8_000;
@@ -563,8 +516,6 @@ export const checkClaudeProviderStatus = Effect.fn("checkClaudeProviderStatus")(
516 subscriptionType = yield* resolveSubscriptionType(claudeSettings.binaryPath);
517 }
518
566 - const resolvedModels = adjustModelsForSubscription(models, subscriptionType);
567 -
519 // ── Handle auth results (same logic as before, adjusted models) ──
520
521 if (Result.isFailure(authProbe)) {
@@ -573,7 +524,7 @@ export const checkClaudeProviderStatus = Effect.fn("checkClaudeProviderStatus")(
524 provider: PROVIDER,
525 enabled: claudeSettings.enabled,
526 checkedAt,
576 - models: resolvedModels,
527 + models,
528 probe: {
529 installed: true,
530 version: parsedVersion,
@@ -592,7 +543,7 @@ export const checkClaudeProviderStatus = Effect.fn("checkClaudeProviderStatus")(
543 provider: PROVIDER,
544 enabled: claudeSettings.enabled,
545 checkedAt,
595 - models: resolvedModels,
546 + models,
547 probe: {
548 installed: true,
549 version: parsedVersion,
@@ -609,7 +560,7 @@ export const checkClaudeProviderStatus = Effect.fn("checkClaudeProviderStatus")(
560 provider: PROVIDER,
561 enabled: claudeSettings.enabled,
562 checkedAt,
612 - models: resolvedModels,
563 + models,
564 probe: {
565 installed: true,
566 version: parsedVersion,