Commit 0d684270 authored by Your Name's avatar Your Name

Remove vendor/kiro-gateway directory and update documentation

- Removed vendor/kiro-gateway submodule/directory as Kiro support is fully integrated into AISBF
- Updated KIRO_GATEWAY.md to reference external GitHub repository (https://github.com/jwadow/kiro-gateway)
- Updated AI.PROMPT to remove vendor directory reference
- Kiro integration remains fully functional through KiroProviderHandler
parent a3506741
# Kiro Gateway Integration Guide # Kiro Gateway Integration Guide
This guide explains how to use [kiro-gateway](vendor/kiro-gateway) with AISBF to access Claude models through Kiro (Amazon Q Developer / AWS CodeWhisperer) credentials. This guide explains how to use kiro-gateway with AISBF to access Claude models through Kiro (Amazon Q Developer / AWS CodeWhisperer) credentials.
## Table of Contents ## Table of Contents
...@@ -8,9 +8,10 @@ This guide explains how to use [kiro-gateway](vendor/kiro-gateway) with AISBF to ...@@ -8,9 +8,10 @@ This guide explains how to use [kiro-gateway](vendor/kiro-gateway) with AISBF to
- [What is Kiro Gateway?](#what-is-kiro-gateway) - [What is Kiro Gateway?](#what-is-kiro-gateway)
- [Prerequisites](#prerequisites) - [Prerequisites](#prerequisites)
- [Setup Instructions](#setup-instructions) - [Setup Instructions](#setup-instructions)
- [Step 1: Configure Kiro Gateway](#step-1-configure-kiro-gateway) - [Step 1: Install Kiro Gateway](#step-1-install-kiro-gateway)
- [Step 2: Start Kiro Gateway](#step-2-start-kiro-gateway) - [Step 2: Configure Kiro Gateway](#step-2-configure-kiro-gateway)
- [Step 3: Configure AISBF](#step-3-configure-aisbf) - [Step 3: Start Kiro Gateway](#step-3-start-kiro-gateway)
- [Step 4: Configure AISBF](#step-4-configure-aisbf)
- [Usage Examples](#usage-examples) - [Usage Examples](#usage-examples)
- [Available Models](#available-models) - [Available Models](#available-models)
- [Troubleshooting](#troubleshooting) - [Troubleshooting](#troubleshooting)
...@@ -27,7 +28,7 @@ Kiro Gateway is a proxy gateway that provides OpenAI and Anthropic-compatible AP ...@@ -27,7 +28,7 @@ Kiro Gateway is a proxy gateway that provides OpenAI and Anthropic-compatible AP
## What is Kiro Gateway? ## What is Kiro Gateway?
Kiro Gateway is a standalone FastAPI application located in [`vendor/kiro-gateway`](vendor/kiro-gateway) that: Kiro Gateway is a standalone FastAPI application that:
- Proxies requests to Kiro's backend API - Proxies requests to Kiro's backend API
- Provides OpenAI-compatible endpoints (`/v1/chat/completions`, `/v1/models`) - Provides OpenAI-compatible endpoints (`/v1/chat/completions`, `/v1/models`)
...@@ -35,67 +36,72 @@ Kiro Gateway is a standalone FastAPI application located in [`vendor/kiro-gatewa ...@@ -35,67 +36,72 @@ Kiro Gateway is a standalone FastAPI application located in [`vendor/kiro-gatewa
- Supports both Kiro IDE and kiro-cli authentication methods - Supports both Kiro IDE and kiro-cli authentication methods
- Includes features like extended thinking, tool calling, and streaming - Includes features like extended thinking, tool calling, and streaming
Kiro Gateway is maintained as a separate project. You can find it at: https://github.com/jwadow/kiro-gateway
## Prerequisites ## Prerequisites
Before setting up kiro-gateway with AISBF, ensure you have: Before setting up kiro-gateway with AISBF, ensure you have:
1. **Kiro Credentials**: Either Kiro IDE or kiro-cli configured and authenticated 1. **Kiro Credentials**: Either Kiro IDE or kiro-cli configured and authenticated
2. **Python 3.8+**: Required for running kiro-gateway 2. **Python 3.10+**: Required for running kiro-gateway
3. **AISBF Installed**: AISBF should be installed and configured 3. **AISBF Installed**: AISBF should be installed and configured
4. **Network Access**: Both services should be able to communicate (typically on localhost) 4. **Network Access**: Both services should be able to communicate (typically on localhost)
## Setup Instructions ## Setup Instructions
### Step 1: Configure Kiro Gateway ### Step 1: Install Kiro Gateway
1. Navigate to the kiro-gateway directory: Clone and install kiro-gateway from GitHub:
```bash
cd vendor/kiro-gateway
```
2. Install dependencies: ```bash
```bash # Clone the kiro-gateway repository
pip install -r requirements.txt git clone https://github.com/jwadow/kiro-gateway.git
``` cd kiro-gateway
3. Create a `.env` file with your configuration: # Install dependencies
```bash pip install -r requirements.txt
# Authentication method (choose one) ```
KIRO_AUTH_METHOD=ide # or 'cli'
# For IDE authentication ### Step 2: Configure Kiro Gateway
KIRO_IDE_CONFIG_PATH=/path/to/your/.kiro/config.json
# For CLI authentication 1. Create a `.env` file with your configuration:
KIRO_CLI_PATH=/path/to/kiro-cli
# API Key for securing the proxy ```bash
PROXY_API_KEY=your-secure-api-key-here # Authentication method (choose one)
KIRO_AUTH_METHOD=ide # or 'cli'
# Optional: Server configuration # For IDE authentication
HOST=0.0.0.0 KIRO_IDE_CONFIG_PATH=~/.config/Code/User/globalStorage/amazon.q/credentials.json
PORT=8000
LOG_LEVEL=INFO # For CLI authentication
``` KIRO_CLI_PATH=/path/to/kiro-cli
# API Key for securing the proxy
PROXY_API_KEY=your-secure-api-key-here
# Optional: Server configuration
HOST=127.0.0.1
PORT=8000
LOG_LEVEL=INFO
```
4. **Important**: Choose your authentication method: 2. **Important**: Choose your authentication method:
**Option A: Kiro IDE Authentication** **Option A: Kiro IDE Authentication**
- Set `KIRO_AUTH_METHOD=ide` - Set `KIRO_AUTH_METHOD=ide`
- Set `KIRO_IDE_CONFIG_PATH` to your Kiro IDE config location - Set `KIRO_IDE_CONFIG_PATH` to your Kiro IDE credentials location
- Default location: `~/.kiro/config.json` - Typical location: `~/.config/Code/User/globalStorage/amazon.q/credentials.json`
**Option B: kiro-cli Authentication** **Option B: kiro-cli Authentication**
- Set `KIRO_AUTH_METHOD=cli` - Set `KIRO_AUTH_METHOD=cli`
- Set `KIRO_CLI_PATH` to your kiro-cli executable - Set `KIRO_CLI_PATH` to your kiro-cli executable
- Ensure kiro-cli is authenticated: `kiro-cli auth login` - Ensure kiro-cli is authenticated: `kiro-cli auth login`
### Step 2: Start Kiro Gateway ### Step 3: Start Kiro Gateway
Start the kiro-gateway server: Start the kiro-gateway server:
```bash ```bash
cd vendor/kiro-gateway
python main.py python main.py
``` ```
...@@ -104,12 +110,12 @@ You should see output indicating the server is running: ...@@ -104,12 +110,12 @@ You should see output indicating the server is running:
INFO: Started server process INFO: Started server process
INFO: Waiting for application startup. INFO: Waiting for application startup.
INFO: Application startup complete. INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 Uvicorn running on http://127.0.0.1:8000
``` ```
**Tip**: Run kiro-gateway in a separate terminal or as a background service to keep it running while using AISBF. **Tip**: Run kiro-gateway in a separate terminal or as a background service to keep it running while using AISBF.
### Step 3: Configure AISBF ### Step 4: Configure AISBF
1. **Add Kiro Provider to `~/.aisbf/providers.json`**: 1. **Add Kiro Provider to `~/.aisbf/providers.json`**:
...@@ -121,6 +127,7 @@ INFO: Uvicorn running on http://0.0.0.0:8000 ...@@ -121,6 +127,7 @@ INFO: Uvicorn running on http://0.0.0.0:8000
"endpoint": "http://localhost:8000/v1", "endpoint": "http://localhost:8000/v1",
"type": "kiro", "type": "kiro",
"api_key_required": true, "api_key_required": true,
"api_key": "YOUR_KIRO_GATEWAY_API_KEY",
"rate_limit": 0, "rate_limit": 0,
"models": [ "models": [
{ {
...@@ -169,7 +176,6 @@ INFO: Uvicorn running on http://0.0.0.0:8000 ...@@ -169,7 +176,6 @@ INFO: Uvicorn running on http://0.0.0.0:8000
"providers": [ "providers": [
{ {
"provider_id": "kiro", "provider_id": "kiro",
"api_key": "YOUR_KIRO_GATEWAY_API_KEY",
"models": [ "models": [
{ {
"name": "claude-sonnet-4-5", "name": "claude-sonnet-4-5",
...@@ -189,12 +195,13 @@ INFO: Uvicorn running on http://0.0.0.0:8000 ...@@ -189,12 +195,13 @@ INFO: Uvicorn running on http://0.0.0.0:8000
``` ```
3. **Restart AISBF** to apply the configuration changes: 3. **Restart AISBF** to apply the configuration changes:
```bash ```bash
# If running as a service # If running as a daemon
sudo systemctl restart aisbf aisbf restart
# If running manually # If running manually
./aisbf.sh aisbf
``` ```
## Usage Examples ## Usage Examples
...@@ -204,9 +211,8 @@ INFO: Uvicorn running on http://0.0.0.0:8000 ...@@ -204,9 +211,8 @@ INFO: Uvicorn running on http://0.0.0.0:8000
Access kiro-gateway directly through AISBF: Access kiro-gateway directly through AISBF:
```bash ```bash
curl -X POST http://localhost:5000/api/kiro/chat/completions \ curl -X POST http://localhost:17765/api/kiro/chat/completions \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_AISBF_API_KEY" \
-d '{ -d '{
"model": "claude-sonnet-4-5", "model": "claude-sonnet-4-5",
"messages": [ "messages": [
...@@ -220,9 +226,8 @@ curl -X POST http://localhost:5000/api/kiro/chat/completions \ ...@@ -220,9 +226,8 @@ curl -X POST http://localhost:5000/api/kiro/chat/completions \
Use kiro-gateway through a rotation (with automatic model selection): Use kiro-gateway through a rotation (with automatic model selection):
```bash ```bash
curl -X POST http://localhost:5000/api/kiro-claude/chat/completions \ curl -X POST http://localhost:17765/api/kiro-claude/chat/completions \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_AISBF_API_KEY" \
-d '{ -d '{
"messages": [ "messages": [
{"role": "user", "content": "Explain quantum computing"} {"role": "user", "content": "Explain quantum computing"}
...@@ -235,9 +240,8 @@ curl -X POST http://localhost:5000/api/kiro-claude/chat/completions \ ...@@ -235,9 +240,8 @@ curl -X POST http://localhost:5000/api/kiro-claude/chat/completions \
Enable streaming for real-time responses: Enable streaming for real-time responses:
```bash ```bash
curl -X POST http://localhost:5000/api/kiro/chat/completions \ curl -X POST http://localhost:17765/api/kiro/chat/completions \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_AISBF_API_KEY" \
-d '{ -d '{
"model": "claude-sonnet-4-5", "model": "claude-sonnet-4-5",
"messages": [ "messages": [
...@@ -252,9 +256,8 @@ curl -X POST http://localhost:5000/api/kiro/chat/completions \ ...@@ -252,9 +256,8 @@ curl -X POST http://localhost:5000/api/kiro/chat/completions \
Use Claude's tool calling capabilities: Use Claude's tool calling capabilities:
```bash ```bash
curl -X POST http://localhost:5000/api/kiro/chat/completions \ curl -X POST http://localhost:17765/api/kiro/chat/completions \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_AISBF_API_KEY" \
-d '{ -d '{
"model": "claude-sonnet-4-5", "model": "claude-sonnet-4-5",
"messages": [ "messages": [
...@@ -283,8 +286,7 @@ curl -X POST http://localhost:5000/api/kiro/chat/completions \ ...@@ -283,8 +286,7 @@ curl -X POST http://localhost:5000/api/kiro/chat/completions \
Query available models through kiro-gateway: Query available models through kiro-gateway:
```bash ```bash
curl http://localhost:5000/api/kiro/models \ curl http://localhost:17765/api/kiro/models
-H "Authorization: Bearer YOUR_AISBF_API_KEY"
``` ```
## Available Models ## Available Models
...@@ -319,7 +321,7 @@ Kiro Gateway provides access to the following Claude models: ...@@ -319,7 +321,7 @@ Kiro Gateway provides access to the following Claude models:
**Solutions**: **Solutions**:
1. Verify `PROXY_API_KEY` in kiro-gateway's `.env` matches the API key in AISBF's configuration 1. Verify `PROXY_API_KEY` in kiro-gateway's `.env` matches the API key in AISBF's configuration
2. For IDE auth: Check that `KIRO_IDE_CONFIG_PATH` points to a valid config file 2. For IDE auth: Check that `KIRO_IDE_CONFIG_PATH` points to a valid credentials file
3. For CLI auth: Run `kiro-cli auth status` to verify authentication 3. For CLI auth: Run `kiro-cli auth status` to verify authentication
4. Try re-authenticating: `kiro-cli auth login` 4. Try re-authenticating: `kiro-cli auth login`
...@@ -395,7 +397,7 @@ Kiro Gateway provides access to the following Claude models: ...@@ -395,7 +397,7 @@ Kiro Gateway provides access to the following Claude models:
- **[`KiroProviderHandler`](aisbf/providers.py)**: Handler class in AISBF that manages kiro-gateway communication - **[`KiroProviderHandler`](aisbf/providers.py)**: Handler class in AISBF that manages kiro-gateway communication
- **OpenAI SDK**: Used to communicate with kiro-gateway's OpenAI-compatible endpoints - **OpenAI SDK**: Used to communicate with kiro-gateway's OpenAI-compatible endpoints
- **Kiro Gateway**: Standalone FastAPI proxy in [`vendor/kiro-gateway`](vendor/kiro-gateway) - **Kiro Gateway**: Standalone FastAPI proxy (external project)
- **Kiro Credentials**: IDE or CLI authentication for accessing Kiro API - **Kiro Credentials**: IDE or CLI authentication for accessing Kiro API
### Benefits of This Architecture ### Benefits of This Architecture
...@@ -409,17 +411,16 @@ Kiro Gateway provides access to the following Claude models: ...@@ -409,17 +411,16 @@ Kiro Gateway provides access to the following Claude models:
## Additional Resources ## Additional Resources
- [AISBF Documentation](DOCUMENTATION.md) - [AISBF Documentation](DOCUMENTATION.md)
- [Kiro Gateway README](vendor/kiro-gateway/README.md) - [Kiro Gateway GitHub](https://github.com/jwadow/kiro-gateway)
- [Kiro Gateway Architecture](vendor/kiro-gateway/ARCHITECTURE.md)
- [AISBF AI.PROMPT](AI.PROMPT) - Contains integration details and configuration examples - [AISBF AI.PROMPT](AI.PROMPT) - Contains integration details and configuration examples
## Support ## Support
For issues related to: For issues related to:
- **AISBF**: Check [DOCUMENTATION.md](DOCUMENTATION.md) and [DEBUG_GUIDE.md](DEBUG_GUIDE.md) - **AISBF**: Check [DOCUMENTATION.md](DOCUMENTATION.md) and [DEBUG_GUIDE.md](DEBUG_GUIDE.md)
- **Kiro Gateway**: Check [`vendor/kiro-gateway/README.md`](vendor/kiro-gateway/README.md) - **Kiro Gateway**: Check [Kiro Gateway GitHub](https://github.com/jwadow/kiro-gateway)
- **Kiro Credentials**: Refer to Amazon Q Developer / AWS CodeWhisperer documentation - **Kiro Credentials**: Refer to Amazon Q Developer / AWS CodeWhisperer documentation
--- ---
**Last Updated**: 2026-03-21 **Last Updated**: 2026-03-23
kiro-gateway @ e6f23c22
Subproject commit e6f23c22fc5e9aa7a22e4c31af56cdc6f859afbd
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment