Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ccf7466
fix: last character(s) missing at end of streamed response
RvVeen May 19, 2026
5d0bc56
feat: stable conversationId scoped to workspace and thread
RvVeen May 19, 2026
3163ada
fix: IDC re-auth kept adding duplicate accounts to kiro.db
RvVeen May 19, 2026
9ee5110
chore: log HTTP errors to plugin.log for easier diagnosis
RvVeen May 19, 2026
51731f5
fix: auth reliability (reauth, bearer token, single account)
RvVeen May 20, 2026
26eba2a
feat: agentContinuationId, isNewThread detection, and tool call strea…
RvVeen May 20, 2026
f939d15
chore: debug logging for request lifecycle and credits
RvVeen May 20, 2026
e8e1de4
fix: tool name length limit, input sanitization, and response dedup
RvVeen May 20, 2026
b636d83
fix: payload size guard, schema sanitization, strip empty toolUses
RvVeen May 21, 2026
4507899
fix: reset stale conversationId on ValidationException 400
RvVeen May 21, 2026
dff010f
fix: payload trim, schema sanitization, tool name edge cases
RvVeen May 21, 2026
0bdca61
fix: rate-limit amplification and reauth lock race
RvVeen May 21, 2026
cff6358
chore: refresh bun.lock
RvVeen May 22, 2026
3915957
fix: restore green typecheck over the test suite
RvVeen Jun 1, 2026
d9a041a
fix: destroy stale SDK client on token rotation, pass parsed body to …
RvVeen Jun 1, 2026
0ccda36
feat: report Kiro usage in credits and refresh it at startup
RvVeen Jun 1, 2026
5703be6
fix: restore compatibility with OpenCode >=1.15 and update models (#97)
ursuscamp May 27, 2026
3bc6de1
feat: serve both kiro and kiro-auth provider ids
RvVeen Jun 1, 2026
7c8fcc7
feat: add Claude Opus 4.8 model
RvVeen Jun 1, 2026
48cdf02
chore: record upstream #97 as merged (already integrated via cherry-p…
RvVeen Jun 1, 2026
ed9859b
docs: simplify install example and document the kiro fallback
RvVeen Jun 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 17 additions & 147 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,165 +30,35 @@ Add the plugin to your `opencode.json` or `opencode.jsonc`:

```json
{
"plugin": ["@zhafron/opencode-kiro-auth"],
"provider": {
"kiro": {
"models": {
"claude-sonnet-4-5": {
"name": "Claude Sonnet 4.5",
"limit": { "context": 200000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
},
"claude-sonnet-4-5-thinking": {
"name": "Claude Sonnet 4.5 Thinking",
"limit": { "context": 200000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
"variants": {
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
"medium": { "thinkingConfig": { "thinkingBudget": 16384 } },
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
}
},
"claude-sonnet-4-6": {
"name": "Claude Sonnet 4.6",
"limit": { "context": 1000000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
},
"claude-sonnet-4-6-thinking": {
"name": "Claude Sonnet 4.6 Thinking",
"limit": { "context": 1000000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
"variants": {
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
"medium": { "thinkingConfig": { "thinkingBudget": 16384 } },
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
}
},
"claude-haiku-4-5": {
"name": "Claude Haiku 4.5",
"limit": { "context": 200000, "output": 64000 },
"modalities": { "input": ["text", "image"], "output": ["text"] }
},
"claude-opus-4-5": {
"name": "Claude Opus 4.5",
"limit": { "context": 200000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
},
"claude-opus-4-5-thinking": {
"name": "Claude Opus 4.5 Thinking",
"limit": { "context": 200000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
"variants": {
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
"medium": { "thinkingConfig": { "thinkingBudget": 16384 } },
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
}
},
"claude-opus-4-6": {
"name": "Claude Opus 4.6",
"limit": { "context": 1000000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
},
"claude-opus-4-6-thinking": {
"name": "Claude Opus 4.6 Thinking",
"limit": { "context": 1000000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
"variants": {
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
"medium": { "thinkingConfig": { "thinkingBudget": 16384 } },
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
}
},
"claude-opus-4-6-1m": {
"name": "Claude Opus 4.6 (1M Context)",
"limit": { "context": 1000000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
},
"claude-opus-4-6-1m-thinking": {
"name": "Claude Opus 4.6 (1M Context) Thinking",
"limit": { "context": 1000000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
"variants": {
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
"medium": { "thinkingConfig": { "thinkingBudget": 16384 } },
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
}
},
"claude-opus-4-7": {
"name": "Claude Opus 4.7",
"limit": { "context": 1000000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
},
"claude-opus-4-7-thinking": {
"name": "Claude Opus 4.7 Thinking",
"limit": { "context": 1000000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
"variants": {
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
"medium": { "thinkingConfig": { "thinkingBudget": 16384 } },
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
}
},
"claude-sonnet-4-5-1m": {
"name": "Claude Sonnet 4.5 (1M Context)",
"limit": { "context": 1000000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
},
"claude-sonnet-4-6-1m": {
"name": "Claude Sonnet 4.6 (1M Context)",
"limit": { "context": 1000000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
},
"claude-sonnet-4-6-1m-thinking": {
"name": "Claude Sonnet 4.6 (1M Context) Thinking",
"limit": { "context": 1000000, "output": 64000 },
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
"variants": {
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
"medium": { "thinkingConfig": { "thinkingBudget": 16384 } },
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
}
},
"auto": { "name": "Auto (1.0x)" },
"claude-sonnet-4": {
"name": "Claude Sonnet 4.0 (1.3x)",
"limit": { "context": 200000, "output": 64000 }
},
"deepseek-3.2": {
"name": "DeepSeek 3.2 (0.25x)",
"limit": { "context": 128000, "output": 64000 }
},
"glm-5": { "name": "GLM-5 (0.5x)", "limit": { "context": 200000, "output": 64000 } },
"minimax-m2.5": {
"name": "MiniMax 2.5 (0.25x)",
"limit": { "context": 200000, "output": 64000 }
},
"minimax-m2.1": {
"name": "MiniMax 2.1 (0.15x)",
"limit": { "context": 200000, "output": 64000 }
},
"qwen3-coder-next": {
"name": "Qwen3 Coder Next (0.05x)",
"limit": { "context": 256000, "output": 64000 }
}
}
}
}
"plugin": ["@zhafron/opencode-kiro-auth"]
}
```

That's all you need — the plugin registers the `kiro-auth` provider and its
models automatically.

**Provider id — `kiro-auth` (with a `kiro` fallback):** use `kiro-auth` for new
setups. If you previously configured this plugin under the old `kiro` id, it
keeps working — the plugin also registers `kiro` as a fallback alias, routing it
through the same backend. `kiro-auth` is recommended going forward because
OpenCode is expected to ship a built-in `kiro` provider that would otherwise
clash with this plugin.

You only need a `provider` block if you want to override the defaults — for
example a custom model list or your own thinking budgets.

## Setup

1. **Authentication via Kiro CLI (Recommended)**:
- Perform login directly in your terminal using `kiro-cli login`.
- The plugin automatically bootstraps a minimal `kiro` placeholder in
- The plugin automatically bootstraps a minimal `kiro-auth` placeholder in
OpenCode's `auth.json` when it detects the Kiro CLI database, then imports
and synchronizes your active session on startup.
- For AWS IAM Identity Center (SSO/IDC), the plugin imports both the token and device
registration (OIDC client credentials) from the `kiro-cli` database.
2. **Direct Authentication**:
- Run `opencode auth login`.
- Select `Other`, type `kiro`, and press enter.
- Select `Other`, type `kiro-auth`, and press enter.
- You'll be prompted for your **IAM Identity Center Start URL** and **IAM Identity
Center region** (`sso_region`).
- Leave it blank to sign in with **AWS Builder ID**.
Expand Down Expand Up @@ -262,7 +132,7 @@ It will replace it with the real email once usage/email lookup succeeds.
### Kiro CLI (Google/GitHub OAuth) users: plugin sync does not start

If you authenticated via `kiro-cli login` using Google or GitHub OAuth (not AWS Builder
ID or IAM Identity Center), OpenCode still needs a stored `kiro` auth entry before it
ID or IAM Identity Center), OpenCode still needs a stored `kiro-auth` auth entry before it
will call the plugin loader.

The plugin now creates that minimal placeholder automatically when it detects the local
Expand Down
Loading