Observed since 20 Oct, 16:33 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
AI SDK provider that lets OpenCode use Claude models through Kiro CLI's free-tier credits
AI SDK provider that lets OpenCode use Claude models through Kiro CLI's free-tier credits.
Kiro is Amazon's AI IDE. It comes with free credits for Claude models. When you sign in to Kiro, it stores auth tokens locally. This package reads those tokens and routes OpenCode requests through the same backend — so you can use your Kiro free-tier credits directly inside OpenCode.
| Model | Config ID | Status |
|---|---|---|
| Claude Sonnet 4 | claude-sonnet-4 | Working |
| Claude Sonnet 4.5 | claude-sonnet-4-5 | Working |
| Claude Haiku 4.5 | claude-haiku-4-5 | Working |
| Claude Opus 4.5 | claude-opus-4-5 | Currently disabled by Kiro (capacity limits) |
Opus 4.5 note: Kiro's servers have disabled Opus 4.5 due to capacity constraints on their end. The config is included so it works automatically whenever Kiro re-enables it — no update needed on your side.
All working models support streaming, tool use, and multi-turn conversations.
brew install --cask kiro
Or download from kiro.dev.
Open Kiro, sign in with your AWS Builder ID (create one at profile.aws if needed), then you can close it. The credentials stay on your machine.
curl -fsSL https://opencode.ai/install | bash
Edit ~/.config/opencode/opencode.json:
{
"provider": {
"kiro": {
"npm": "00bx-kiro-gateway",
"name": "Kiro Gateway",
"models": {
"claude-sonnet-4": {
"name": "Claude Sonnet 4",
"limit": { "context": 200000, "output": 8192 }
},
"claude-sonnet-4-5": {
"name": "Claude Sonnet 4.5",
"limit": { "context": 200000, "output": 8192 }
},
"claude-haiku-4-5": {
"name": "Claude Haiku 4.5",
"limit": { "context": 200000, "output": 8192 }
},
"claude-opus-4-5": {
"name": "Claude Opus 4.5",
"limit": { "context": 200000, "output": 8192 }
}
}
}
}
}
If you already have other providers configured, add the "kiro" block inside your existing "provider" object.
# Interactive
opencode -m kiro/claude-sonnet-4
# Single command
opencode run -m kiro/claude-sonnet-4 "explain this codebase"
If you have more than one AWS Builder ID, you can switch between them in Kiro IDE at any time. The gateway detects the account change automatically on the next request — it re-reads Kiro's local database before every API call. When it sees a different refresh token, it drops the old session and starts using the new account's credentials.
This means you can rotate between accounts to use each account's free-tier credits without restarting OpenCode.
| Problem | Fix |
|---|---|
Kiro refresh token not found | Open Kiro IDE and sign in. |
| Empty or no response | You may have hit a rate limit. Try claude-haiku-4-5 — it has the highest limits. |
| Token/auth errors | Reopen Kiro IDE to refresh your session. |
| Opus 4.5 not responding | Kiro has it disabled for now due to capacity. Use Sonnet 4 or 4.5 instead. |
| OpenCode doesn't show Kiro models | Check your opencode.json for valid JSON (no trailing commas). |
bun:sqlite → better-sqlite3 → sqlite3 CLI fallback)Zero runtime dependencies. Works with Bun and Node.js.
MIT — 00bx
Download counts and popularity will appear here as the collector receives them.
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 16:33 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:ca6225fe0591dc9213ddde4334b6f1cd6f510a928fa3e13127898ee019de0537