| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
OpenAI-compatible proxy for CodeBuddy and Kiro (Amazon Q Developer) — access Claude Opus 4.7, Sonnet 4.5, GLM-5, Qwen3, and more via a single local API.
git clone https://github.com/nopperabbo/codebuddy2api.git
cd codebuddy2apipython3 -m venv venv
source venv/bin/activate # macOS/Linux
# or: venv\Scripts\activate # Windowspip install -r requirements.txtcp .env.example .envEdit .env and set your password:
CODEBUDDY_PASSWORD=your_secret_password_hereCreate kiro_keys.json in the project root:
[
{"api_key": "ksk_YOUR_FIRST_KEY_HERE"},
{"api_key": "ksk_YOUR_SECOND_KEY_HERE"}
]💡 How to get your ksk_ key: Open Kiro IDE, sign in, then find your API key in Settings → API Keys. It starts with ksk_.
bash start.shThe server will start on http://localhost:8003.
| Model ID | Description | Status |
|---|---|---|
| claude-opus-4.7 | Claude Opus 4.7 — Latest & most capable | ✅ |
| claude-opus-4.5 | Claude Opus 4.5 | ✅ |
| claude-sonnet-4.5 | Claude Sonnet 4.5 | ✅ |
| claude-haiku-4.5 | Claude Haiku 4.5 — Fast & light | ✅ |
| claude-sonnet-4 | Claude Sonnet 4 | ✅ |
| glm-5 | GLM-5 (via Kiro) | ✅ |
| qwen3-coder-next | Qwen3 Coder Next (via Kiro) | ✅ |
| minimax-m2.5 | Minimax M2.5 (via Kiro) | ✅ |
| minimax-m2.1 | Minimax M2.1 (via Kiro) | ✅ |
| auto | Let Kiro pick the best model | ✅ |
| Method | Endpoint | Description |
|---|---|---|
| GET | /kiro/v1/models | List available Kiro models |
| POST | /kiro/v1/chat/completions | Chat completions (OpenAI-compatible) |
| GET | /kiro/v1/keys | List configured API keys (masked) |
| POST | /kiro/v1/keys | Add a new API key |
| Method | Endpoint | Description |
|---|---|---|
| GET | /codebuddy/v1/models | List CodeBuddy models |
| POST | /codebuddy/v1/chat/completions | Chat completions |
| GET | /codebuddy/v1/credentials | List credentials |
# List models
curl -s -H "Authorization: Bearer YOUR_PASSWORD" \
http://localhost:8003/kiro/v1/models | python3 -m json.tool
# Chat with Opus 4.7
curl -s -X POST http://localhost:8003/kiro/v1/chat/completions \
-H "Authorization: Bearer YOUR_PASSWORD" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4.7",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": false
}'
# Streaming
curl -N -X POST http://localhost:8003/kiro/v1/chat/completions \
-H "Authorization: Bearer YOUR_PASSWORD" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4.7",
"messages": [{"role": "user", "content": "Write a haiku about coding"}],
"stream": true
}'Add this to your ~/.config/opencode/opencode.json under the "provider" section:
"kiro": {
"models": {
"claude-opus-4.7": {
"limit": { "context": 200000, "output": 64000 },
"name": "Claude Opus 4.7 (Kiro/AWS)",
"modalities": {
"input": ["text", "image", "pdf"],
"output": ["text"]
},
"variants": {
"low": { "thinkingConfig": { "thinkingBudget": 16384 } },
"medium": { "thinkingConfig": { "thinkingBudget": 32768 } },
"high": { "thinkingConfig": { "thinkingBudget": 65536 } },
"max": { "thinkingConfig": { "thinkingBudget": 128000 } }
}
},
"claude-opus-4.5": {
"limit": { "context": 200000, "output": 64000 },
"name": "Claude Opus 4.5 (Kiro/AWS)",
"modalities": {
"input": ["text", "image", "pdf"],
"output": ["text"]
},
"variants": {
"low": { "thinkingConfig": { "thinkingBudget": 16384 } },
"medium": { "thinkingConfig": { "thinkingBudget": 32768 } },
"high": { "thinkingConfig": { "thinkingBudget": 65536 } },
"max": { "thinkingConfig": { "thinkingBudget": 128000 } }
}
},
"claude-sonnet-4": {
"limit": { "context": 200000, "output": 64000 },
"name": "Claude Sonnet 4 (Kiro/AWS)",
"modalities": {
"input": ["text", "image", "pdf"],
"output": ["text"]
},
"variants": {
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
"medium": { "thinkingConfig": { "thinkingBudget": 16384 } },
"high": { "thinkingConfig": { "thinkingBudget": 24576 } },
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
}
},
"auto": {
"limit": { "context": 200000, "output": 64000 },
"name": "Auto (Kiro/AWS Best Pick)",
"modalities": {
"input": ["text", "image", "pdf"],
"output": ["text"]
},
"variants": {
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
"medium": { "thinkingConfig": { "thinkingBudget": 16384 } },
"high": { "thinkingConfig": { "thinkingBudget": 24576 } },
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
}
}
},
"name": "Kiro (Amazon Q)",
"npm": "@ai-sdk/openai-compatible",
"options": {
"apiKey": "YOUR_PASSWORD",
"baseURL": "http://127.0.0.1:8003/kiro/v1"
}
}Then select kiro/claude-opus-4.7 as your model in OpenCode.
Use these settings in any OpenAI-compatible client:
| Setting | Value |
|---|---|
| Base URL | http://localhost:8003/kiro/v1 |
| API Key | Your CODEBUDDY_PASSWORD from .env |
| Model | claude-opus-4.7 (or any from the list above) |
codebuddy2api/ ├── src/ │ ├── __init__.py │ ├── auth.py # Authentication middleware │ ├── codebuddy_router.py # CodeBuddy proxy router │ ├── kiro_api_client.py # Kiro API client & model mapping │ ├── kiro_router.py # Kiro gateway router │ └── ... ├── kiro_keys.json # Your ksk_ API keys (gitignored) ├── .env # Environment config (gitignored) ├── .env.example # Example environment file ├── requirements.txt # Python dependencies ├── start.sh # Startup script └── web.py # Main application entry point
MIT
| Back | FazBrowse Home | New Git URL |