๐ป Kiro Gateway
Proxy gateway for Kiro API (Amazon Q Developer / AWS CodeWhisperer)
๐ฌ๐ง English โข ๐ท๐บ ะ ัััะบะธะน โข ๐จ๐ณ ไธญๆ โข ๐ช๐ธ Espaรฑol โข ๐ฎ๐ฉ Indonesia โข ๐ง๐ท Portuguรชs โข ๐ฏ๐ต ๆฅๆฌ่ช โข ๐ฐ๐ท ํ๊ตญ์ด
Made with โค๏ธ by @Jwadow
Use Claude models from Kiro with Claude Code, OpenCode, OpenClaw, Claw Code, Codex app, Cursor, Cline, Roo Code, Kilo Code, Obsidian, OpenAI SDK, LangChain, Continue and other OpenAI or Anthropic compatible tools
Models โข Features โข Quick Start โข Configuration โข ๐ Sponsor
๐ค Available Models (Free List)
โ ๏ธ Important: Model availability depends on your Kiro tier (free/paid). The gateway provides access to whatever models are available in your IDE or CLI based on your subscription. The list below shows models commonly available on the free tier.
๐ Claude Opus 4.5 was removed from the free tier on January 17, 2026. It may be available on paid tiers โ check your IDE/CLI model list.
๐ Claude Sonnet 4.5 โ Balanced performance. Great for coding, writing, and general-purpose tasks.
โก Claude Haiku 4.5 โ Lightning fast. Perfect for quick responses, simple tasks, and chat.
๐ฆ Claude Sonnet 4 โ Previous generation. Still powerful and reliable for most use cases.
๐ค GLM-5 โ Open MoE model (744B params, 40B active). Advanced model for complex systems engineering and long-horizon agentic tasks.
๐ DeepSeek-V3.2 โ Open MoE model (685B params, 37B active). Balanced performance for coding, reasoning, and general tasks.
๐งฉ MiniMax M2.5 โ Open MoE model (230B params, 10B active). Enhanced version with improved reasoning and task handling.
๐งฉ MiniMax M2.1 โ Open MoE model (230B params, 10B active). Great for complex tasks, planning, and multi-step workflows.
๐ค Qwen3-Coder-Next โ Open MoE model (80B params, 3B active). Coding-focused. Excellent for development and large projects.
๐ก Smart Model Resolution: Use any model name format โ
claude-sonnet-4-5,claude-sonnet-4.5, or even versioned names likeclaude-sonnet-4-5-20250929. The gateway normalizes them automatically.
โจ Features
| Feature | Description |
|---|---|
| ๐ OpenAI-compatible API | Works with any OpenAI-compatible tool |
| ๐ Anthropic-compatible API | Native /v1/messages endpoint |
| ๐ Multi-Account Support | Intelligent failover between multiple accounts |
| ๐ VPN/Proxy Support | HTTP/SOCKS5 proxy for restricted networks |
| ๐ง Extended Thinking | Reasoning is exclusive to our project |
| ๐๏ธ Vision Support | Send images to model |
| ๐ Web Search | Search the web for current information |
| ๐ ๏ธ Tool Calling | Supports function calling |
| ๐ฌ Full message history | Passes complete conversation context |
| ๐ก Streaming | Full SSE streaming support |
| ๐ Retry Logic | Automatic retries on errors (403, 429, 5xx) |
| ๐ Extended model list | Including versioned models |
| ๐ Smart token management | Automatic refresh before expiration |
๐ Quick Start
Choose your deployment method:
- ๐ Native Python - Full control, easy debugging
- ๐ณ Docker - Isolated environment, easy deployment โ jump to Docker
Prerequisites
- Python 3.10+
- One of the following:
Installation
# Clone the repository (requires Git)
git clone https://github.com/Jwadow/kiro-gateway.git
cd kiro-gateway
# Or download ZIP: Code โ Download ZIP โ extract โ open kiro-gateway folder
# Install dependencies
pip install -r requirements.txt
# Configure (see Configuration section)
cp .env.example .env
# Copy and edit .env with your credentials
# Start the server
python main.py
# Or with custom port (if 8000 is busy)
python main.py --port 9000
The server will be available at http://localhost:8000
โ๏ธ Configuration
๐ก Advanced users: Looking for multi-account support? See Account System below.
Option 1: JSON Credentials File (Kiro IDE / Enterprise)
Specify the path to the credentials file:
Works with:
- Kiro IDE (standard) - for personal accounts
- Enterprise - for corporate accounts with SSO
KIRO_CREDS_FILE="~/.aws/sso/cache/kiro-auth-token.json"
# Password to protect YOUR proxy server (make up any secure string)
# You'll use this as api_key when connecting to your gateway
PROXY_API_KEY="my-super-secret-password-123"
๐ JSON file format
{
"accessToken": "eyJ...",
"refreshToken": "eyJ...",
"expiresAt": "2025-01-12T23:00:00.000Z",
"profileArn": "arn:aws:codewhisperer:us-east-1:...",
"region": "us-east-1",
"clientIdHash": "abc123..." // Optional: for corporate SSO setups
}
Note: If you have two JSON files in
~/.aws/sso/cache/(e.g.,kiro-auth-token.jsonand a file with a hash name), usekiro-auth-token.jsoninKIRO_CREDS_FILE. The gateway will automatically load the other file.
Option 2: Environment Variables (.env file)
Create a .env file in the project root:
# Required
REFRESH_TOKEN="your_kiro_refresh_token"
# Password to protect YOUR proxy server (make up any secure string)
PROXY_API_KEY="my-super-secret-password-123"
# Optional
PROFILE_ARN="arn:aws:codewhisperer:us-east-1:..."
KIRO_REGION="us-east-1"
Option 3: AWS SSO Credentials (kiro-cli / Enterprise)
If you use kiro-cli or Kiro IDE with AWS SSO (AWS IAM Identity Center), the gateway will automatically detect and use the appropriate authentication.
Works with both free Builder ID accounts and corporate accounts.
KIRO_CREDS_FILE="~/.aws/sso/cache/your-sso-cache-file.json"
# Password to protect YOUR proxy server
PROXY_API_KEY="my-super-secret-password-123"
# Note: PROFILE_ARN is NOT needed for AWS SSO (Builder ID and corporate accounts)
# The gateway will work without it
๐ AWS SSO JSON file format
AWS SSO credentials files (from ~/.aws/sso/cache/) contain:
{
"accessToken": "eyJ...",
"refreshToken": "eyJ...",
"expiresAt": "2025-01-12T23:00:00.000Z",
"region": "us-east-1",
"clientId": "...",
"clientSecret": "..."
}
Note: AWS SSO (Builder ID and corporate accounts) users do NOT need profileArn. The gateway will work without it (if specified, it will be ignored).
๐ How it works
The gateway automatically detects the authentication type based on the credentials file:
Kiro Desktop Auth (default): Used when
clientIdandclientSecretare NOT present- Endpoint:
https://prod.{region}.auth.desktop.kiro.dev/refreshToken
- Endpoint:
AWS SSO (OIDC): Used when
clientIdandclientSecretARE present- Endpoint:
https://oidc.{region}.amazonaws.com/token
- Endpoint:
No additional configuration is needed โ just point to your credentials file!
Option 4: kiro-cli SQLite Database
If you use kiro-cli and prefer to use its SQLite database directly:
KIRO_CLI_DB_FILE="~/.local/share/kiro-cli/data.sqlite3"
# Password to protect YOUR proxy server
PROXY_API_KEY="my-super-secret-password-123"
# Note: PROFILE_ARN is NOT needed for AWS SSO (Builder ID and corporate accounts)
# The gateway will work without it
๐ Database locations
| CLI Tool | Database Path |
|---|---|
| kiro-cli | ~/.local/share/kiro-cli/data.sqlite3 |
| amazon-q-developer-cli | ~/.local/share/amazon-q/data.sqlite3 |
The gateway reads credentials from the auth_kv table which stores:
kirocli:odic:tokenorcodewhisperer:odic:tokenโ access token, refresh token, expirationkirocli:odic:device-registrationorcodewhisperer:odic:device-registrationโ client ID and secret
Both key formats are supported for compatibility with different kiro-cli versions.
Getting Credentials
For Kiro IDE users:
- Log in to Kiro IDE and use Option 1 above (JSON credentials file)
- The credentials file is created automatically after login
For Kiro CLI users:
- Log in