Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

opencode-auth-kiro

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencode-auth-kiro

OpenCode plugin for Kiro and AWS CodeWhisperer authentication

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

Opencode Auth Kiro

npm version npm downloads license GitHub

OpenCode plugin for Kiro and AWS CodeWhisperer authentication. It registers Kiro models, provides Kiro login methods, and routes OpenAI-compatible requests through Kiro credentials.

Install

Add the plugin to your OpenCode config:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-auth-kiro"]
}

Restart OpenCode after changing plugin config. OpenCode loads plugins at startup.

After the plugin is loaded, select models as kiro/<model-id>, for example:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-auth-kiro"],
  "model": "kiro/claude-sonnet-4-5"
}

Authentication

Recommended flow when Kiro Desktop is already signed in:

  • Run opencode auth login.
  • Choose Kiro Desktop Session.
  • OpenCode imports ~/.aws/sso/cache/kiro-auth-token.json and the matching client registration from the Kiro Desktop cache.

Direct social login flow:

  • Run opencode auth login.
  • Choose Kiro Account Login.
  • Open the Kiro portal link and sign in with Google or GitHub.

Kiro CLI flow:

  • Run kiro-cli login if you already use the Kiro CLI.
  • Run opencode auth login.
  • Choose Kiro CLI Session to import the existing Kiro CLI session.

Kiro Account Login uses the same https://app.kiro.dev/signin portal flow as Kiro Desktop, but it can only exchange Google/GitHub social callbacks directly. For AWS Builder ID or IAM Identity Center accounts, use Kiro Desktop Session or Kiro CLI Session.

Models

Thinking mode is enabled automatically when you select a -thinking model. Thinking models expose reasoning: true, stream reasoning as reasoning_content, and include these variants:

VariantThinking budget
low8192
medium16384
max32768

If no variant is selected, -thinking models use a default thinking budget of 20000.

The outgoing Kiro request uses native model fields:

{
  "additionalModelRequestFields": {
    "thinking": {
      "type": "enabled",
      "budget_tokens": 20000
    }
  }
}

You can override the budget per request with either top-level thinkingConfig or OpenCode/OpenAI-compatible provider options:

{
  "thinkingConfig": { "thinkingBudget": 32768 },
  "providerOptions": {
    "openaiCompatible": {
      "thinkingConfig": { "thinkingBudget": 32768 }
    }
  }
}
Model IDNotes
autoKiro auto routing
claude-haiku-4-5Claude Haiku 4.5
claude-haiku-4-5-thinkingThinking alias
claude-sonnet-4Claude Sonnet 4.0
claude-sonnet-4-5Default model
claude-sonnet-4-5-thinkingThinking alias
claude-sonnet-4-61M context
claude-sonnet-4-6-thinking1M context, thinking alias
claude-opus-4-5Claude Opus 4.5
claude-opus-4-5-thinkingThinking alias
claude-opus-4-61M context
claude-opus-4-6-thinking1M context, thinking alias
claude-opus-4-71M context
claude-opus-4-7-thinking1M context, thinking alias
claude-opus-4-81M context
claude-opus-4-8-thinking1M context, thinking alias
claude-3-7-sonnetClaude 3.7 Sonnet
minimax-m2.5MiniMax M2.5
minimax-m2.1MiniMax M2.1
glm-5GLM 5
deepseek-3.2DeepSeek 3.2
qwen3-coder-nextQwen3 Coder Next

Endpoints

The plugin follows the same public Kiro Desktop endpoint families found in the installed Kiro extension:

PurposeEndpoint
Portal sign-inhttps://app.kiro.dev/signin
Social token exchangehttps://prod.{region}.auth.desktop.kiro.dev/oauth/token
Desktop/social refreshhttps://prod.{region}.auth.desktop.kiro.dev/refreshToken
Chat streaminghttps://q.{region}.amazonaws.com/generateAssistantResponse
Usage limitshttps://q.{region}.amazonaws.com/getUsageLimits
Builder ID / IdC OIDChttps://oidc.{region}.amazonaws.com/*
User infohttps://view.awsapps.com/api/user/info

Plugin Config

User config is loaded from ~/.config/opencode/kiro.json on macOS/Linux or %APPDATA%\opencode\kiro.json on Windows.

Project config is loaded from .opencode/kiro.json in the active OpenCode project directory. Project config overrides user config.

Supported options include:

{
  "$schema": "https://opencode.ai/config.json",
  "account_selection_strategy": "lowest-usage",
  "default_region": "us-east-1",
  "rate_limit_retry_delay_ms": 5000,
  "rate_limit_max_retries": 3,
  "request_timeout_ms": 120000,
  "token_expiry_buffer_ms": 60000,
  "usage_tracking_enabled": true,
  "auto_sync_kiro_cli": true,
  "auth_server_port_start": 19847,
  "auth_server_port_range": 10
}

Development

npm install
npm run typecheck
npm run build
npm test

npm test skips the live Kiro endpoint probe by default. Run it with KIRO_LIVE_PROBE=1 only when you intentionally want to hit the real endpoint.

The package published to npm contains dist, README.md, and package.json only. Source, tests, and build artifacts remain available in the GitHub repository.

ResourceURL
npm packagehttps://www.npmjs.com/package/opencode-auth-kiro
GitHub repositoryhttps://github.com/YeiHai/Opencode-Auth-Kiro
OpenCode config schemahttps://opencode.ai/config.json

Keywords

opencode

FAQs

Package last updated on 29 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts