No description
Find a file
2026-04-21 12:25:43 -07:00
.githooks merge: upstream/main (v0.4.0) — streaming improvements, social login, usage tracking 2026-03-17 19:02:47 +00:00
.github chore: remove release-please auto-release workflow 2026-04-21 12:25:43 -07:00
.prs chore: fix lint issues 2026-03-04 23:32:51 +00:00
scripts merge: upstream/main (v0.4.0) — streaming improvements, social login, usage tracking 2026-03-17 19:02:47 +00:00
src fix: replace shell-interpolated execSync with execFileSync in kiro-cli DB access 2026-04-18 19:16:05 -07:00
test Fix model filtering for non-Kiro providers 2026-03-20 10:48:12 -05:00
.gitignore feat: social login via kiro-cli, fix context percentage tracking 2026-03-15 03:39:48 +00:00
AGENTS.md feat: social login via kiro-cli, fix context percentage tracking 2026-03-15 03:39:48 +00:00
biome.json initial commit: pi-provider-kiro 2026-02-18 14:15:33 -06:00
CHANGELOG.md Release v0.4.2 2026-03-20 10:53:07 -05:00
Dockerfile.lint chore: fix lint issues 2026-03-04 23:32:51 +00:00
fix-lint-all-branches.sh chore: fix lint issues 2026-03-04 23:32:51 +00:00
package-lock.json fix: oauth refresh race, event parser trim, tool-pair truncation 2026-04-18 18:56:33 -07:00
package.json Release v0.4.2 2026-03-20 10:53:07 -05:00
ralph.yml initial commit: pi-provider-kiro 2026-02-18 14:15:33 -06:00
README.md delegate generic retries to pi-coding-agent 2026-03-19 11:46:24 -05:00
tsconfig.json initial commit: pi-provider-kiro 2026-02-18 14:15:33 -06:00
vitest.config.ts initial commit: pi-provider-kiro 2026-02-18 14:15:33 -06:00

pi-provider-kiro

A pi provider extension that connects pi to the Kiro API (AWS CodeWhisperer/Q), giving you access to 17 models through a single provider.

Models

Family Models Context Reasoning
Claude Opus 4.6 opus-4-6, opus-4-6-1m 200K / 1M
Claude Sonnet 4.6 sonnet-4-6, sonnet-4-6-1m 200K / 1M
Claude Opus 4.5 opus-4-5 200K
Claude Sonnet 4.5 sonnet-4-5, sonnet-4-5-1m 200K / 1M
Claude Sonnet 4 sonnet-4 200K
Claude Haiku 4.5 haiku-4-5 200K
DeepSeek 3.2 deepseek-3-2 128K
Kimi K2.5 kimi-k2-5 200K
MiniMax M2.1 minimax-m2-1 128K
GLM 4.7 glm-4-7, glm-4-7-flash 128K ✓ / ✗
Qwen3 Coder qwen3-coder-next, qwen3-coder-480b 128K
AGI Nova agi-nova-beta-1m 1M

All models are free to use through Kiro.

Setup

Install the provider:

pi install npm:pi-provider-kiro

Or install via npm directly:

npm install -g pi-provider-kiro

Then log in:

/login kiro

This opens a browser for authentication. You can choose from:

  • AWS Builder ID — Native device code flow (works in SSH/remote environments)
  • Google — Social login (requires local browser or SSH port forwarding)
  • GitHub — Social login (requires local browser or SSH port forwarding)

If you have kiro-cli installed and already logged in, credentials are picked up automatically — no second login needed.

Usage

Once logged in, select any Kiro model in pi:

/model claude-sonnet-4-6

Reasoning is automatically enabled for supported models. Use /reasoning to adjust the thinking budget.

Retry Behavior

Generic transient retries such as HTTP 429 and 5xx are handled by pi-coding-agent at the session layer.

This provider only keeps local recovery for Kiro-specific cases:

  • 403 auth races, where it can refresh credentials from kiro-cli
  • first-token / stalled-stream recovery
  • empty-stream retries
  • non-retryable Kiro body markers like MONTHLY_REQUEST_COUNT and INSUFFICIENT_MODEL_CAPACITY

Development

npm run build       # Compile TypeScript
npm run check       # Type check (no emit)
npm test            # Run all 248 tests
npm run test:watch  # Watch mode

Architecture

The extension is organized as one feature per file:

src/
├── index.ts            # Extension registration
├── models.ts           # 17 model definitions + ID resolution
├── oauth.ts            # Multi-provider auth (Builder ID / Google / GitHub)
├── kiro-cli.ts         # kiro-cli credential sharing
├── transform.ts        # Message format conversion
├── history.ts          # Conversation history management
├── thinking-parser.ts  # Streaming <thinking> tag parser
├── event-parser.ts     # Kiro stream event parser
└── stream.ts           # Main streaming orchestrator

See AGENTS.md for detailed development guidance and .agents/summary/ for full architecture documentation.

License

MIT