@sunerpy/kiro-provider 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +23 -1
  2. package/dist/cli.js +71 -62
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -18,12 +18,13 @@
18
18
  - [Proxy](#proxy)
19
19
  - [Security](#security)
20
20
  - [Using with an LLM](#using-with-an-llm)
21
+ - [Use with Codex CLI](#use-with-codex-cli)
21
22
  - [Development](#development)
22
23
  - [License](#license)
23
24
 
24
25
  ## Features
25
26
 
26
- - OpenAI-compatible `POST /v1/chat/completions` (streaming SSE and non-streaming JSON), `GET /v1/models`, and `GET /health`.
27
+ - OpenAI-compatible `POST /v1/chat/completions` (streaming SSE and non-streaming JSON), `POST /v1/responses` (OpenAI Responses API, streaming typed SSE and non-streaming JSON), `GET /v1/models`, and `GET /health`.
27
28
  - Bearer API-key gate that fails closed: the server refuses to start with no configured keys, and defaults to binding `127.0.0.1`.
28
29
  - Multi-account rotation with automatic token refresh and failover, backed by a local `bun:sqlite` account store with tombstone-based removal.
29
30
  - `accounts import` to reuse accounts already authenticated by [OpenCode's Kiro auth](https://opencode.ai/) instead of repeating device-code login.
@@ -203,6 +204,27 @@ Contract: human-readable status lines go to stdout, errors to stderr, non-zero e
203
204
 
204
205
  </details>
205
206
 
207
+ ## Use with Codex CLI
208
+
209
+ kiro-provider's `POST /v1/responses` endpoint speaks the OpenAI Responses wire format, so [Codex CLI](https://github.com/openai/codex) (verified against 0.144.6) can use it as a custom `model_provider` with `wire_api = "responses"`. Test it with an isolated `CODEX_HOME` so your real `~/.codex` config is never touched:
210
+
211
+ ```bash
212
+ export CODEX_HOME="$(mktemp -d)" # isolated; your real ~/.codex is untouched
213
+ export LOCALGW_KEY="sk-...your gateway api key..."
214
+ cat > "$CODEX_HOME/config.toml" <<'EOF'
215
+ model = "gpt-5.6-sol"
216
+ model_provider = "localgw"
217
+ [model_providers.localgw]
218
+ name = "Local Gateway"
219
+ base_url = "http://127.0.0.1:8787/v1"
220
+ env_key = "LOCALGW_KEY"
221
+ wire_api = "responses"
222
+ EOF
223
+ codex exec --skip-git-repo-check "say hi"
224
+ ```
225
+
226
+ Requires the gateway running (`kiro-provider serve`) with an account already imported or logged in. Reasoning models work through Codex the same way they do for `/v1/chat/completions` (Claude via your configured proxy, GPT direct). Full details, plus a ready-made isolated smoke test (`scripts/codex-smoke.sh`), live in [`docs/CODEX.md`](docs/CODEX.md).
227
+
206
228
  ## Development
207
229
 
208
230
  ```bash