Catalog npm
PACKAGE EXPLORERView in registry

00bx-kiro-gateway

npm

AI SDK provider that lets OpenCode use Claude models through Kiro CLI's free-tier credits

ai-sdkclaudecodewhispererfreekiroopencodeprovider
Versions collected10
Direct dependencies4From release 1.0.9
Last observed20 Oct, 16:33 UTC

README

Current package documentation

00bx-kiro-gateway

AI SDK provider that lets OpenCode use Claude models through Kiro CLI's free-tier credits.

How it works

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.

Models

ModelConfig IDStatus
Claude Sonnet 4claude-sonnet-4Working
Claude Sonnet 4.5claude-sonnet-4-5Working
Claude Haiku 4.5claude-haiku-4-5Working
Claude Opus 4.5claude-opus-4-5Currently 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.

Setup

1. Install and sign in to Kiro

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.

2. Install OpenCode

curl -fsSL https://opencode.ai/install | bash

3. Add the provider config

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.

4. Run

# Interactive
opencode -m kiro/claude-sonnet-4

# Single command
opencode run -m kiro/claude-sonnet-4 "explain this codebase"

Multiple accounts

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.

Troubleshooting

ProblemFix
Kiro refresh token not foundOpen Kiro IDE and sign in.
Empty or no responseYou may have hit a rate limit. Try claude-haiku-4-5 — it has the highest limits.
Token/auth errorsReopen Kiro IDE to refresh your session.
Opus 4.5 not respondingKiro has it disabled for now due to capacity. Use Sonnet 4 or 4.5 instead.
OpenCode doesn't show Kiro modelsCheck your opencode.json for valid JSON (no trailing commas).

Technical details

  1. Reads Kiro CLI's refresh token from its local SQLite database (bun:sqlite → better-sqlite3 → sqlite3 CLI fallback)
  2. Exchanges it for a short-lived access token via Kiro's auth endpoint
  3. Sends prompts to the AWS CodeWhisperer streaming API
  4. Parses the AWS binary event stream protocol into AI SDK V2 stream format
  5. Handles token refresh, 403 retry, 429/5xx backoff, idle stream timeouts, and tool-call accumulation

Zero runtime dependencies. Works with Bun and Node.js.

License

MIT — 00bx

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 10

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.9Registry latest9 Feb 20264
1.0.89 Feb 20264
1.0.79 Feb 20264
1.0.69 Feb 20264
1.0.59 Feb 20264
1.0.49 Feb 20264
1.0.39 Feb 20264
1.0.29 Feb 20264
1.0.19 Feb 20264
1.0.09 Feb 20264

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
00bx/00bx-kiro-gateway

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 16:33 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:ca6225fe0591dc9213ddde4334b6f1cd6f510a928fa3e13127898ee019de0537