
How to Set Up Kiro in OpenCode: Step-by-Step Guide (+ Claude Opus 5.5)
Use your Kiro subscription in OpenCode: install the plugin, configure the provider, sign in with AWS Builder ID, and unlock Claude Opus 5.5.
Want to use your Kiro subscription inside OpenCode? You can. With one community plugin and a few config files, Kiro's models (Claude Opus, Sonnet, Haiku and more) show up right in OpenCode's model picker.
This guide walks you through the whole setup, from an empty folder to your first answer. It also covers the one extra step you need for the newest models like Claude Opus 5.5, which the plugin doesn't support out of the box yet.
Tested with: OpenCode ·
@zhafron/opencode-kiro-auth 2.0.0 · macOS · AWS Builder ID · November 2026TL;DR
- Install the
opencode-kiro-authplugin into.opencode/.
- Configure a
kiroprovider inopencode.json(it needs anapiandbaseURL, or OpenCode crashes).
- Map new models like Opus 5.5 with a small adapter file.
- Sign in with
opencode auth login→ Other →kiro, and approve in your browser.
- Restart OpenCode and test with
opencode run -m kiro/claude-opus-5-5 "hi".
What you need
- OpenCode installed
- Node.js (for
npm)
- A Kiro account. This guide uses a free AWS Builder ID. IAM Identity Center works too.
How it works
OpenCode doesn't talk to Kiro directly. The community plugin
@zhafron/opencode-kiro-auth sits in the middle. It handles the Kiro sign-in, and translates each OpenCode request into Kiro's format.That translation uses a lookup table called
MODEL_MAPPING , which turns the ID you pick in OpenCode into the ID Kiro expects. If a model isn't in that table, the request never leaves your machine. Keep that in mind for Step 3.
Step 1: Install the plugin
In your project folder, create
.opencode/package.json :{ "private": true, "type": "module", "dependencies": { "@opencode-ai/plugin": "1.1.23", "@zhafron/opencode-kiro-auth": "2.0.0" }}Then install it:
npm --prefix .opencode install --ignore-scriptsStep 2: Configure the Kiro provider
Create (or update)
opencode.json in your project folder. If you already have one, merge this in rather than overwriting it:{ "$schema": "https://opencode.ai/config.json", "plugin": ["./.opencode/kiro.ts"], "provider": { "kiro": { "name": "Kiro", "npm": "@ai-sdk/openai-compatible", "api": "https://q.us-east-1.amazonaws.com", "options": { "baseURL": "https://q.us-east-1.amazonaws.com" }, "models": { "claude-opus-5-5": { "limit": { "context": 1000000, "output": 64000 } }, "claude-sonnet-5-5": { "limit": { "context": 1000000, "output": 64000 } }, "claude-haiku-5-5": { "limit": { "context": 1000000, "output": 64000 } } } } }}Three things matter here:
-
pluginpoints at the small adapter you'll create in Step 3, not at the npm package. Loading the package directly gives youfn3 is not a function.
-
npm,apiandoptions.baseURLare required. Without them, OpenCode crashes withTypeError: Invalid URLas soon as you send a message. This is not a public Kiro API. The URL only lets the SDK build a request, and the plugin rewrites it before anything is sent.
-
modelslists the IDs you want in the picker. Add others the same way, for example"claude-opus-5": {}or"claude-sonnet-5": {}.
Step 3: Map the newest models (Opus 5.5)
The plugin's
MODEL_MAPPING doesn't include the 5.5 models yet. Without this step, picking Opus 5.5 fails with Unsupported model , even though Kiro lists it:
The fix is two small files, with no fork needed.
3a. Create .opencode/latest-models.mjs
It holds the six new mappings (dashes in OpenCode, a dot for Kiro) and tells OpenCode how to show the models:
export const LATEST_MODEL_MAPPING = { "claude-opus-5-5": "claude-opus-5.5", "claude-opus-5-5-thinking": "claude-opus-5.5", "claude-sonnet-5-5": "claude-sonnet-5.5", "claude-sonnet-5-5-thinking": "claude-sonnet-5.5", "claude-haiku-5-5": "claude-haiku-5.5", "claude-haiku-5-5-thinking": "claude-haiku-5.5",}
// Published specs from https://kiro.dev/docs/models/available-models/export const LATEST_MODEL_SPECS = { "claude-opus-5-5": { name: "Claude Opus 5.5", rate: "2.0x" }, "claude-sonnet-5-5": { name: "Claude Sonnet 5.5", rate: "1.3x" }, "claude-haiku-5-5": { name: "Claude Haiku 5.5", rate: "0.06x" },}
const CONTEXT_1M = { context: 1000000, output: 64000 }const MULTIMODAL = { input: ["text", "image"], output: ["text"] }
export function latestRegistryEntries() { const models = {} for (const [id, spec] of Object.entries(LATEST_MODEL_SPECS)) { models[id] = { name: `${spec.name} (${spec.rate})`, limit: CONTEXT_1M, modalities: MULTIMODAL, } models[`${id}-thinking`] = { name: `${spec.name} Thinking (${spec.rate})`, limit: CONTEXT_1M, modalities: MULTIMODAL, reasoning: true, interleaved: { field: "reasoning_content" }, variants: { low: { thinkingConfig: { thinkingBudget: 16384 } }, medium: { thinkingConfig: { thinkingBudget: 32768 } }, high: { thinkingConfig: { thinkingBudget: 65536 } }, xhigh: { thinkingConfig: { thinkingBudget: 98304 } }, max: { thinkingConfig: { thinkingBudget: 128000 } }, }, } } return models}3b. Create .opencode/kiro.ts
This adapter loads the plugin, merges in the new mappings, and registers the models in the picker:
import { KiroOAuthPlugin } from "@zhafron/opencode-kiro-auth"import { MODEL_MAPPING } from "@zhafron/opencode-kiro-auth/dist/constants.js"import { buildModelRegistry } from "@zhafron/opencode-kiro-auth/dist/plugin/model-registry.js"import { LATEST_MODEL_MAPPING, latestRegistryEntries } from "./latest-models.mjs"
// Teach plugin 2.0.0 the newer Claude wire IDs it does not ship yet.Object.assign(MODEL_MAPPING, LATEST_MODEL_MAPPING)
export default async function kiro(input: any) { const hooks = await KiroOAuthPlugin(input) const configure = hooks.config return { ...hooks, config: async (config: any) => { await configure(config) const provider = config.provider.kiro const registry = { ...buildModelRegistry(), ...latestRegistryEntries() } for (const [id, wireId] of Object.entries(MODEL_MAPPING)) { if (registry[id]) continue const canonical = Object.keys(registry).find( (candidate) => MODEL_MAPPING[candidate] === wireId && candidate.endsWith("-thinking") === id.endsWith("-thinking"), ) registry[id] = canonical ? { ...registry[canonical], name: `${registry[canonical].name} [${id}]` } : { name: `${id} (legacy mapping)` } } for (const [id, model] of Object.entries(provider.models || {})) { registry[id] = { ...registry[id], ...(model as object) } } provider.models = registry provider.options = { ...provider.options, baseURL: provider.options?.baseURL || provider.api, } }, }}⚠️ Honest caveat: the 5.5 Kiro IDs are inferred from the plugin's naming pattern, not taken from an official plugin release. They worked first time in my test. If a future plugin version adds them officially, delete these local entries.
Check that it loaded:
opencode models kiroYou should see
kiro/claude-opus-5-5 in the list. If the 5.5 models are missing, the adapter isn't loading. Check the plugin path in opencode.json .Step 4: Sign in to Kiro
Run:
opencode auth loginThen answer the prompts:
- Select provider: choose Other
- Enter provider id: type
kiro
- IAM Identity Center Start URL: leave it blank if you use an AWS Builder ID
- IAM Identity Center region: leave it blank (defaults to
us-east-1)
OpenCode then prints a verification URL and a short code:

Open the URL in your browser and confirm the code. AWS then asks: "Allow Kiro IDE to access your data?" That's normal. The plugin signs in through the same flow as the Kiro IDE. Click Allow access:

You'll see "Request approved". Close the tab and head back to the terminal, which now shows Login successful:

Step 5: Restart OpenCode and test
Quit OpenCode completely and reopen it. A running session keeps the old config and will keep showing old errors.
Then send something tiny:
opencode run -m kiro/claude-opus-5-5 "Reply with exactly OK."If you get OK back, you're done. 🎉 Kiro's models are now in your OpenCode model picker.
Which Kiro models work in OpenCode?
I sent one short prompt to every Kiro model ID in my setup. 33 of 44 answered, including all the 5.5 models:

The ones that failed, and what to do:
Model ID | What Kiro said | What to do |
|---|---|---|
claude-opus-4-5-thinking, claude-sonnet-4-5-thinking | additionalModelRequestFields is not supported | Use the non-thinking version |
claude-sonnet-4, claude-sonnet-4-5-1m, claude-sonnet-4-5-1m-thinking | Invalid model | Not served anymore |
claude-sonnet-5-1m, claude-sonnet-5-1m-thinking | Invalid model | Use claude-sonnet-5 |
nova-swe, gpt-oss-120b, minimax-m2, kimi-k2-thinking | Invalid model | Legacy IDs, skip |
Not mapped yet: Fable 5.1, the GPT-5.6 tiers, Grok 4.7 and Kimi K3. GPT-5.6 needs a different request format, so a guessed mapping would look supported and then fail.
Troubleshooting
You see | Fix |
|---|---|
TypeError: Invalid URL | Add npm , api and options.baseURL to the kiro provider, then restart |
fn3 is not a function | Point plugin at ./.opencode/kiro.ts , not the npm package |
Unsupported model | The model is missing from MODEL_MAPPING . Do Step 3 |
Invalid model (400) | Kiro declined the ID. Probably retired or not on your plan |
additionalModelRequestFields not supported | Use the non-thinking version of that model |
403 · This version of Kiro is no longer supported | Wait and retest before changing anything. Mine was temporary and worked the next morning on the same version |
Old errors after fixing config | Quit OpenCode fully and reopen it |
FAQ
Can I use my Kiro subscription in OpenCode?
Yes. Install the
@zhafron/opencode-kiro-auth plugin, add a kiro provider to opencode.json , and sign in with opencode auth login .Which provider do I pick in
opencode auth login ?
Choose Other and enter kiro as the provider id.What do I enter for the IAM Identity Center Start URL?
Leave it blank if you sign in with an AWS Builder ID. Fill it in only if your company uses IAM Identity Center.
Why does AWS say "Allow Kiro IDE to access your data"?
The plugin uses the same sign-in flow as the Kiro IDE. Click Allow access.
Why does Opus 5.5 say "Unsupported model"?
The plugin's model table doesn't include the 5.5 models yet. Add the mappings from Step 3.
Do I need to fork the plugin?
No. The adapter adds the new models when the plugin loads, so you can still update the plugin normally.
What does Opus 5.5 cost in Kiro?
Kiro lists it with a 2.0x credit multiplier and a 1M-token context window.
Sources
Got it working? Give this a like and share it with a teammate who uses Kiro. Stuck on a step? Drop a comment with the exact error text and I'll help. 🚀
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article