opencode-proxy-api
Health Gecti
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 16 GitHub stars
Code Gecti
- Code scan — Scanned 5 files during light audit, no dangerous patterns found
Permissions Gecti
- Permissions — No dangerous permissions requested
This tool acts as a local proxy server that translates standard OpenAI-compatible API requests into the native Kiro AWS Event Stream protocol. It includes a web dashboard to manage multiple Kiro accounts, authenticate via OAuth, and track usage quotas.
Security Assessment
Risk Rating: Medium
The proxy inherently handles sensitive data. It intercepts, reads, and processes all AI chat completions routed through it, meaning your code queries and prompts will pass through this local server. It manages highly sensitive OAuth tokens and saves them locally in an automatically generated file (`profiles.json`). While the automated light code scan found no hardcoded secrets or dangerous execution patterns, the tool's core design requires monitoring token lifespans and constantly making external network requests to AWS and Kiro backend infrastructure. The shell and subprocess management features used to control the server from the web dashboard also warrant careful network isolation.
Quality Assessment
The project is actively maintained, with its most recent code push happening today. It operates under the standard, permissive MIT license. Community trust is currently very low. With only 16 GitHub stars, the tool has not yet been broadly vetted by a large user base or extensive peer review, which is typical for new or niche utilities.
Verdict
Use with caution. The tool passes basic code safety scans, but because it intercepts chat data and manages sensitive authentication tokens locally, developers should carefully inspect the source code and limit its use to non-critical environments.
Use OpenCode / Claude Code For Free
Kiro Agent Proxy 🚀
A robust local proxy bridging OpenAI-compatible editors with the native Kiro AWS Event Stream protocol.
📖 Overview
The Kiro Agent Proxy enables advanced AI IDEs (like Opencode) that expect standard OpenAI-compatible API responses to communicate seamlessly with Kiro's backend infrastructure.
It accomplishes this by translating standard JSON-based chat completions into AWS Binary Event Streams, injecting custom tool definitions, and converting the resulting streams back into OpenAI-compatible Server-Sent Events (SSE).
Additionally, it features a Web Dashboard for managing multiple Kiro accounts, handling OAuth PKCE flows, dynamic proxy controlling, and automatic token refreshing.

✨ Features
- Multi-Account Dashboard: Easily manage and switch between different Kiro authenticated profiles.
- Dynamic Active Switching: The proxy automatically routes requests through whichever account is currently marked "Active" in the dashboard.
- Auto-Refreshing Tokens: Background monitoring of token lifespans. Automatically hits the
/refreshTokenendpoint when an active token is within 5 minutes of expiring. - Detailed Quota Tracking: Real-time visibility into usage metrics, properly aggregating standard allocations and Free Trial limits.
- Native Tool Translation: Transparently maps generic OpenAI tool calls into the Kiro
toolSpecschema. - Subprocess Management: Start and stop the proxy server directly from the web interface without touching the terminal.
📂 Project Structure
.
├── auth_capture_v2.py # Main Web Dashboard & Profile Manager (Run this!)
├── proxy.py # FastAPI proxy server (Auto-managed by dashboard)
├── kiro_api.py # Core AWS binary event stream parsing client
├── profiles.json # Local database for OAuth tokens & limits (Auto-generated)
├── tools.json # Kiro-native tool definitions
├── opencode.json # Example IDE connection config
├── requirements.txt # Python dependencies
└── LICENSE # MIT License
🚀 Usage Guide
1. Installation
Clone the repository and install the required dependencies:
git clone https://github.com/sionex-code/opencode-proxy-api.git
cd opencode-proxy-api
pip install -r requirements.txt
2. Start the Dashboard
Run the main management script. This acts as both your OAuth handler and your proxy controller.
python auth_capture_v2.py
3. Add an Account
- Open http://localhost:3128 in your browser.
- Click + Add Account.
- Copy the provided authentication URL and open it in your preferred browser to log in via Kiro.
- Your account will appear on the dashboard with its active token, refresh token, and accurate usage limits.
4. Start the Proxy
From the dashboard interface, click the green Start Proxy button. The proxy server will spin up on port 8000.
5. Configure Your IDE
Configure your AI editor (like Opencode) to point to the local proxy. An exact copy-paste JSON configuration is provided at the bottom of the dashboard page.
It will look something like this:
{
"provider": {
"kiro": {
"npm": "@ai-sdk/openai-compatible",
"name": "Kiro Backend Proxy",
"options": {
"baseURL": "http://127.0.0.1:8000/v1",
"apiKey": "dummy-key-not-used-by-proxy"
},
"models": {
"claude-sonnet-4.5": {
"name": "Claude Sonnet 4.5 (via Kiro)",
"limit": {
"context": 200000,
"output": 65536
}
}
}
}
}
}
📈 Star History
📄 License
This project is licensed under the MIT License.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi