Skip to content

Make Claude Sonnet 5.5 the Pro default and Opus opt-in only - #164

Merged
Programcode merged 2 commits into
mainfrom
cost/sonnet-pro-default
Oct 22, 2026
Merged

Programcode merged 2 commits into
mainfrom
cost/sonnet-pro-default

Conversation

@Programcode

Copy link
Copy Markdown
Owner

Cost fix 1 of 7. Pro accounts now start on Claude Sonnet 5.5 instead of Claude Opus 5.5, and Opus runs only when someone picks it.

What changes

  • DEFAULT_PRO_MODEL is now anthropic/claude-sonnet-5.5. New Pro accounts, and Pro accounts that never saved a model, get Sonnet for every tool.
  • Auto Pro no longer has Opus in its pool. It chooses between Sonnet 5.5 (the default) and GPT-6.1 Sol. When the router is unsure, fails, or names a model outside the pool, it falls back to Sonnet, never Opus.
  • A saved retired Sonnet ID (claude-sonnet-5, claude-sonnet-4-6) moves to Sonnet 5.5. A saved retired Opus ID (claude-opus-5, claude-opus-4-7) still moves to Opus 5.5, because someone picked Opus on purpose.
  • Opus 5.5 stays in the catalog and in the selector for Pro accounts.

What this does not change

Existing Pro accounts that already saved Opus 5.5 keep it. The app keeps any saved model that is still in the catalog. The saved row doesn't record whether someone picked Opus or just got it as the old default, so the client can't tell the two apart. Moving those accounts to Sonnet would mean a production data change to user_settings.feature_configs, which this PR doesn't do. Until then, the savings apply to new accounts, accounts that never saved a model, and every Auto Pro request.

This PR doesn't touch the research model, token caps, quotas, prompts, cost logging, or JSON output. Other cost PRs cover those.

Verification (local; GitHub Actions is down repo-wide)

  • npm run test:edge: 357 passed. The new router test proves that Auto Pro rejects an Opus answer from the router and falls back to Sonnet when the router fails. The handler test now expects Auto Pro to call Sonnet.
  • npm run verify: lint, typecheck, unit, edge, build, service-worker check and 30 desktop Chromium smoke tests all passed.
  • verify-debatelab fake stack, recipes/model-defaults on desktop-chromium and mobile-chromium: 3 of 3 passed on each. A new Pro account's user_settings hold Sonnet 5.5 for every tool, the selector shows Claude Sonnet 5.5 with Opus 5.5 still enabled, and a Generate run records model: anthropic/claude-sonnet-5.5 in ai_requests. Basic accounts still start on Haiku 5.5.
  • Not checked: live OpenRouter calls (live verify pins every call to Muse Spark anyway), staging, or production.

I updated the verify skill's recipe and feature notes, docs/architecture.md and supabase/README.md to match.

🤖 Generated with Claude Code

New Pro accounts start on Sonnet 5.5. Auto Pro routes between Sonnet 5.5
and GPT-6.1 Sol and falls back to Sonnet, so it never picks Opus. Opus
runs only when someone selects it. Retired Opus IDs still move to Opus
5.5, since those were explicit picks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 22, 2026 10:59
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
debate-navigator Ready Ready Preview Oct 22, 2026 1:47pm UTC
debatelab-staging Ready Ready Preview Oct 22, 2026 1:47pm UTC

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 1ad9329 and 0aad1e4.

📒 Files selected for processing: 11
  • .claude/skills/verify-debatelab/features/README.md
  • .claude/skills/verify-debatelab/features/case-generation.md
  • .claude/skills/verify-debatelab/features/model-defaults.md
  • .claude/skills/verify-debatelab/recipes/model-defaults.spec.ts
  • docs/architecture.md
  • src/lib/stores/settings-store.ts
  • supabase/README.md
  • supabase/functions/_shared/auto-model-router.test.ts
  • supabase/functions/_shared/auto-model-router.ts
  • supabase/functions/_shared/model-catalog.ts
  • supabase/functions/ai/handler-research.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.

Comment @coderabbitai help to get the list of available commands.

@Programcode

Copy link
Copy Markdown
Owner Author

The GitHub Actions failures on f31ecb6 did not run the code. Every job stopped within 1 to 2 seconds, and the annotation reads: "The job was not started because recent account payments have failed or your spending limit needs to be increased." It is the repo-wide Actions billing outage. Local results at f31ecb6: npm run test:edge 357 passed; npm run verify passed (lint, typecheck, unit, edge, build, 30 desktop Chromium smoke tests); verify-debatelab recipes/model-defaults passed 3 of 3 on desktop-chromium and on mobile-chromium. That is a local pass, not a CI pass.

@Programcode

Copy link
Copy Markdown
Owner Author

Follow-up data migration for accounts that still have Opus 5.5 saved from the old default: #180. It is stacked on this PR and must be applied after this one is live in production.

@vercel

vercel Bot commented Oct 22, 2026

Copy link
Copy Markdown

Deployment failed for project debatelab-staging with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/adam-gaborjanis-projects?upgradeToPro=build-rate-limit

@Programcode
Programcode merged commit 988b870 into main Oct 22, 2026
4 of 17 checks passed
Programcode added a commit that referenced this pull request Oct 22, 2026
… (#180)

* Make Claude Sonnet 5.5 the Pro default and Opus opt-in only

New Pro accounts start on Sonnet 5.5. Auto Pro routes between Sonnet 5.5
and GPT-6.1 Sol and falls back to Sonnet, so it never picks Opus. Opus
runs only when someone selects it. Retired Opus IDs still move to Opus
5.5, since those were explicit picks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Move saved Opus 5.5 settings to Sonnet 5.5

Opus 5.5 was the Pro default, and a saved setting can't tell the default
from a pick. This data migration moves every saved Opus 5.5 tool setting
to Sonnet 5.5, backs the original rows up in private.opus_default_backup,
and skips users it has already migrated. A rollback script restores Opus
wherever the migrated Sonnet is still saved. A database test runs both
twice against seeded rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Cover more rollback and stale-client cases in the Opus migration test

The test now seeds a tool already on Sonnet before the migration, which the
rollback must keep, and an old updated_at, so it fails if the migration
stops bumping it. Clients only save their settings cleanup while updated_at
is unchanged, so the bump keeps an older client from writing Opus back.
agent-stack.sh test now runs the script too, like npm run test:db.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

2 active (1 outdated) deployments
Preview – debate-navigator — 0aad1e46 Deployed Oct 22, 2026 by vercel[bot]
Preview – debatelab-staging — f31ecb65 Deployed Oct 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants