Skip to content

Add Claude Opus 5 support#116

Closed
guidan-nick wants to merge 1 commit into
tickernelz:masterfrom
guidan-nick:feat/add-opus-5-support
Closed

Add Claude Opus 5 support#116
guidan-nick wants to merge 1 commit into
tickernelz:masterfrom
guidan-nick:feat/add-opus-5-support

Conversation

@guidan-nick

@guidan-nick guidan-nick commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

This PR adds support for Claude Opus 5, which is now available in Kiro according to https://kiro.dev/blog/opus-5/.

Changes

  • Added model mappings for claude-opus-5 and claude-opus-5-thinking in src/constants.ts
  • Registered claude-opus-5 as effort capable, in the xhigh tier alongside Opus 4.7 and 4.8
  • Added the two models to the README example config
  • Extended the effort test suite with Opus 5 cases

Effort support

Per https://kiro.dev/docs/cli/chat/effort/, Claude Opus 5 accepts the full five value effort enum (low, medium, high, xhigh, max), the same as Opus 4.7 and 4.8. Opus 4.6 is limited to four values, so Opus 5 goes in XHIGH_CAPABLE_MODELS rather than the four value set.

Without this the model was registered but got no effort field on the request, so Kiro never allocated a reasoning budget and no thinking output was produced.

Notes

No explicit -1m model IDs are added. Kiro does not expose separate long context IDs for Opus 5, so only the two base IDs are mapped. The 1M context is reflected in the limit.context value.

The docs list a max_tokens ceiling of 128000 for Opus 5. The README example keeps output: 64000 to stay consistent with how Opus 4.8 is already declared. Raising the declared output limit for both is left for a separate change.

Testing

  • Type checking passed (tsc --noEmit)
  • Build passed (tsc -p tsconfig.build.json plus the ESM import fixup)
  • Prettier formatting check passed
  • Effort resolution verified against the built output: supportsEffort, supportsXHighEffort, resolveEffort, budgetToEffort and getEffectiveEffort all return the expected values for claude-opus-5

Note: bun is not installed in my environment, so bun test was not run. The effort behaviour was verified directly against dist/ instead.

Reference

@guidan-nick
guidan-nick force-pushed the feat/add-opus-5-support branch 2 times, most recently from eafb7e5 to 61b82a4 Compare July 25, 2026 09:32
@guidan-nick

Copy link
Copy Markdown
Contributor Author

Superseded by #117, which contains this commit unchanged plus the fixes that make it actually work.

Worth flagging what this PR alone did not deliver: it registered claude-opus-5 in XHIGH_CAPABLE_MODELS, but budgetToEffort had no branch returning xhigh, so with auto_effort_mapping on by default that registration had no effect on the automatic path. It also added claude-opus-5-thinking to MODEL_MAPPING without adding it to the advertised model registry in plugin.ts, so the model was not selectable without hand-written user config.

Both are fixed in #117, along with the reason thinking blocks never rendered at all: Kiro streams reasoning as reasoningContentEvent, which the stream transformer was dropping.

Not deleting the branch, in case you would rather cherry-pick the Opus 5 commit separately.

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.

1 participant