feat(agent): default to Claude Opus 5 - #768
Draft
scottschreckengaust wants to merge 1 commit into
Draft
Conversation
Flip the platform default model from us.anthropic.claude-opus-4-8 to us.anthropic.claude-opus-5 at all four call sites — the agent's ANTHROPIC_MODEL fallback, the TaskConfig field default, the CLI's PLATFORM_REPO_DEFAULTS (which also drives what `platform doctor` probes for access), and the documented default. The IAM grant and workflow allowlist already carry Opus 5 (#744, merged and deployed), so nothing fails at turn 0. Opus 4.8 stays granted because blueprints may pin it per repo. Per-token rate is unchanged at $5.00/MTok; the ~1.17x difference on an identical prompt is token volume, not price. Closes #745 Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Flip the platform default model from
us.anthropic.claude-opus-4-8tous.anthropic.claude-opus-5at all four call sites, in one commit.Closes #745
Why this is safe now
The prerequisite #744 (additive IAM grant + workflow allowlist for Opus 5) is merged AND deployed:
deploy.ymlrun on3412f4cb(feat(cdk): grant Claude Opus 5 (additive IAM + workflow allowlist, no default change) #744's merge commit) completed successfully.cdk/src/constructs/bedrock-models.tsonorigin/maincarries theanthropic.claude-opus-5entry.aws bedrock-runtime invoke-model --model-id us.anthropic.claude-opus-5inus-east-1returned HTTP 200.So the grant exists in the account and the new default cannot fail at turn 0 with
AccessDenied.us.anthropic.claude-opus-5andglobal.anthropic.claude-opus-5are both ACTIVE/invocable; the bare idanthropic.claude-opus-5is not (ValidationException: … on-demand throughput isn't supported). This PR uses theus.-prefixed form everywhere. The pinned toolchain (claude-agent-sdk==0.2.110, bundled CLI2.1.191) passes the prefixed forms through, so no SDK/CLI bump is needed.Opus 4.8 is not removed from any grant or allowlist — blueprints may pin it per repo.
The four call sites
agent/src/config.py:563ANTHROPIC_MODELenv fallback:us.anthropic.claude-opus-4-8→us.anthropic.claude-opus-5agent/src/models.py:157TaskConfig.anthropic_modelfield default: same flipcli/src/repo-display.ts:48PLATFORM_REPO_DEFAULTS.model_id: same flipdocs/guides/DEVELOPER_GUIDE.md,agent/README.md,docs/guides/USER_GUIDE.md,docs/design/REPO_ONBOARDING.md+ regenerated Starlight mirrorscli/src/repo-display.tsis load-bearing beyond display:platform doctorderives the model it probes for ACCESS from this value. A partial flip is worse than none — ifconfig.pyandrepo-display.tsdisagree, doctor probes the wrong model and can report a healthy stack while every task fails at turn 0.Testing
cdk/test/contracts/model-default-docs-parity.test.ts(#742's guard) was used as the executable spec. It was not edited, weakened, or skipped.Baseline GREEN on the untouched tree:
cd cdk && npx jest test/contracts/model-default-docs-parity.test.ts→ 5 passed.RED after changing only
config.py— this is the reproduction, and it named exactly which docs had gone stale:MISE_EXPERIMENTAL=1 mise //docs:sync(never hand-edited) → 5 passed.Gates run from the worktree:
mise //agent:qualitymise //cdk:eslint,mise //cli:eslintmise run buildcdk:test,cli:test,agent:test,cdk:synth:quiet,docs:build,docs:link-check, drift checks)prek run --files <changed>docs-sync,astro check)Cost framing
The per-token rate is unchanged — a one-turn smoke prompt implies exactly $5.00/MTok on both Opus 4.8 and Opus 5. Opus 5 used ~1.17x the input tokens on an identical prompt (37,584 vs 32,145), so the delta is token volume, not price. Re-baseline volume, not rates.
Worth flagging for reviewers:
max_turnsdefaults to 100 andmax_budget_usdhas no platform default (unset means unlimited), so a token-volume increase is not capped by default. The documented mitigation is a lighter-token model per repo/task (blueprintagent.modelId/ payloadmodel_id).The measured Opus 4.8 vs Opus 5 cost comparison table in
docs/guides/DEVELOPER_GUIDE.md(added by #742) is left numerically untouched — those are historical measurements of two models, not a claim about which is the default.Notes for the reviewer
--no-verify.security:sast:maskingis RED on pristinemain(~25 pre-existingts-silent-success-maskingfindings acrossagent/src,cdk/src/handlers,cli/src) and it gates the pre-push hook. Reproduced on a clean tree to confirm pre-existence and verified none of the findings are in the files this PR touches. Nonosemgrepsuppression was added.docs/abca-plugin/skills/onboard-repo/SKILL.md:119-127still claims the stack grants only "Sonnet 4.6, Opus 4, and Haiku 4.5" and uses Opus 4.8 as the example of a model that "will fail at invoke with a 403". That doc is stale independently of this change (it predates feat(cdk): grant Claude Opus 5 (additive IAM + workflow allowlist, no default change) #744) and is outside the parity test's guarded set. Worth a follow-up issue.cdk synthneedsec2:DescribeAvailabilityZones, which the dev role lacks, so the gitignoredcdk/cdk.context.jsonAZ cache was seeded locally to complete the synth gate. It is not committed (confirmed gitignored).Dependencies / related
cdk/src/constructs/bedrock-models.ts,cdk/src/stacks/agent.ts, andcdk/src/constructs/ecs-agent-cluster.ts. I deliberately stayed entirely out of those three files to avoid a conflict — this PR introduces nobedrockGeoRegion.global.; the geo staysushere.cdk/test/contracts/model-default-docs-parity.test.ts, which is untouched.ANTHROPIC_DEFAULT_HAIKU_MODEL(the auxiliary model) is unchanged, per scope.No new dependency, tool, or GitHub Action was introduced — this is a value flip.
🤖 Generated with Claude Code