mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
Adds long-lived API-key (ksk_) authentication for Kiro/AWS CodeWhisperer and a direct claude:kiro / kiro:claude translation route that avoids the lossy OpenAI two-hop pivot. - translator: claude-to-kiro request + kiro-to-claude response translators, registered on the exact source:target pair (direct route ahead of the OpenAI pivot in index.js). claude-to-kiro uses shared schema constants (ROLE/CLAUDE_BLOCK/DEFAULT_IMAGE_MIME) per app convention. - auth: POST /api/oauth/kiro/api-key imports + validates a key via ListAvailableProfiles, persists authMethod="api_key" (no refresh token). - executor: send tokentype: API_KEY header and try *.amazonaws.com hosts first for api-key creds; OAuth keeps kiro.dev first. - fix: never inject the default placeholder profileArn for api-key auth (CodeWhisperer 403s an ARN not owned by the key's account). - ui: API Key method in the Kiro connect modal; surface api-key accounts on the Quota Tracker and provider count. - stream: env-overridable TTFT vs stall timeouts + Kiro keepalive frame. - tests: claude-kiro-direct + kiro-profile-arn (11 tests). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
93 lines
3.4 KiB
JavaScript
93 lines
3.4 KiB
JavaScript
export default {
|
|
id: "kiro",
|
|
priority: 10,
|
|
alias: "kr",
|
|
uiAlias: "kr",
|
|
display: {
|
|
name: "Kiro AI",
|
|
icon: "psychology_alt",
|
|
color: "#FF6B35",
|
|
website: "https://kiro.dev",
|
|
notice: {
|
|
signupUrl: "https://kiro.dev",
|
|
},
|
|
deprecated: true,
|
|
deprecationNotice: "RISK_NOTICE",
|
|
},
|
|
category: "free",
|
|
transport: {
|
|
baseUrl: "https://runtime.us-east-1.kiro.dev/generateAssistantResponse",
|
|
baseUrls: [
|
|
"https://runtime.us-east-1.kiro.dev/generateAssistantResponse",
|
|
"https://codewhisperer.us-east-1.amazonaws.com/generateAssistantResponse",
|
|
"https://q.us-east-1.amazonaws.com/generateAssistantResponse",
|
|
],
|
|
format: "kiro",
|
|
retry: {
|
|
"429": 0,
|
|
},
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
Accept: "application/vnd.amazon.eventstream",
|
|
"X-Amz-Target": "AmazonCodeWhispererStreamingService.GenerateAssistantResponse",
|
|
"User-Agent": "AWS-SDK-JS/3.0.0 kiro-ide/1.0.0",
|
|
"X-Amz-User-Agent": "aws-sdk-js/3.0.0 kiro-ide/1.0.0",
|
|
},
|
|
tokenUrl: "https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",
|
|
authUrl: "https://prod.us-east-1.auth.desktop.kiro.dev",
|
|
usage: {
|
|
cwHost: "https://codewhisperer.us-east-1.amazonaws.com",
|
|
qHost: "https://q.us-east-1.amazonaws.com",
|
|
limitsPath: "/getUsageLimits",
|
|
},
|
|
},
|
|
models: [
|
|
{ id: "claude-sonnet-4.5", name: "Claude Sonnet 4.5" },
|
|
{ id: "claude-haiku-4.5", name: "Claude Haiku 4.5" },
|
|
{ id: "deepseek-3.2", name: "DeepSeek 3.2", strip: ["image","audio"] },
|
|
{ id: "qwen3-coder-next", name: "Qwen3 Coder Next", strip: ["image","audio"] },
|
|
{ id: "glm-5", name: "GLM 5" },
|
|
{ id: "MiniMax-M2.5", name: "MiniMax M2.5" },
|
|
{ id: "claude-sonnet-4.5-thinking", name: "Claude Sonnet 4.5 (Thinking)" },
|
|
{ id: "claude-haiku-4.5-thinking", name: "Claude Haiku 4.5 (Thinking)" },
|
|
{ id: "claude-sonnet-4.5-agentic", name: "Claude Sonnet 4.5 (Agentic)" },
|
|
{ id: "claude-haiku-4.5-agentic", name: "Claude Haiku 4.5 (Agentic)" },
|
|
{ id: "claude-sonnet-4.5-thinking-agentic", name: "Claude Sonnet 4.5 (Thinking + Agentic)" },
|
|
{ id: "claude-haiku-4.5-thinking-agentic", name: "Claude Haiku 4.5 (Thinking + Agentic)" },
|
|
],
|
|
oauth: {
|
|
ssoOidcEndpoint: "https://oidc.us-east-1.amazonaws.com",
|
|
registerClientUrl: "https://oidc.us-east-1.amazonaws.com/client/register",
|
|
deviceAuthUrl: "https://oidc.us-east-1.amazonaws.com/device_authorization",
|
|
tokenUrl: "https://oidc.us-east-1.amazonaws.com/token",
|
|
startUrl: "https://view.awsapps.com/start",
|
|
clientName: "kiro-oauth-client",
|
|
clientType: "public",
|
|
scopes: [
|
|
"codewhisperer:completions",
|
|
"codewhisperer:analysis",
|
|
"codewhisperer:conversations",
|
|
],
|
|
grantTypes: [
|
|
"urn:ietf:params:oauth:grant-type:device_code",
|
|
"refresh_token",
|
|
],
|
|
issuerUrl: "https://identitycenter.amazonaws.com/ssoins-722374e8c3c8e6c6",
|
|
socialAuthEndpoint: "https://prod.us-east-1.auth.desktop.kiro.dev",
|
|
socialLoginUrl: "https://prod.us-east-1.auth.desktop.kiro.dev/login",
|
|
socialTokenUrl: "https://prod.us-east-1.auth.desktop.kiro.dev/oauth/token",
|
|
socialRefreshUrl: "https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken",
|
|
authMethods: [
|
|
"builder-id",
|
|
"idc",
|
|
"google",
|
|
"github",
|
|
"import",
|
|
],
|
|
},
|
|
features: {
|
|
usage: true,
|
|
usageApikey: true,
|
|
},
|
|
};
|