ThirdTimes (#842, #848): on one Builder ID account the plugin (0.1.32) was answered 429 USER_REQUEST_RATE_EXCEEDED on generateAssistantResponse, and Kiro IDE 1.4.121, 11s later, was answered. The IDE's log says "api=CreateResponse armSource=experiment callPath=main". The version strings the plugin sends already match the IDE (1.4.121, the update feed's latest, 2026-11-06). The difference is the call. Kiro puts accounts in a create_response_api experiment, and an account in its arm is asked at POST runtime.<region>.kiro.dev/v1/responses. The IDE's own generateAssistantResponse title call on that account was 429 too. All of this is read from the IDE's extension.js (kiro.kiro-agent, in the 1.4.121 linux tarball, which was not run): - The experiment is read as ExperimentConfigService reads it: GET /featureConfiguration?origin=AI_EDITOR&version=1.4.121 with x-amzn-kiro-profile-arn. The key is sha256hex("kiro-feature-config-key-salt-3e9b1d7a" + "create_response_api"), and the arm's value is "create_response". The result is kept 15 minutes per sign-in. A failed read is asked again after 60s and keeps the last good config, and the read has a 5s timeout. With no config the account stays on generateAssistantResponse, as the IDE's default does, so an account outside the arm is sent what 0.1.32 sent. - CreateResponse is sent with the IDE's headers: the plain IDE user agent (no aws-sdk prefix, no amz-sdk-*), x-amzn-kiro-origin AI_EDITOR, x-amzn-codewhisperer-optout, x-amzn-kiro-profile, TokenType and x-amzn-kiro-attempt "n;max=3". The body is {model, input, tools, stream, origin, profileArn, metadata kiro:agent_mode/kiro:conversation_id, reasoning}, made from the request built for generateAssistantResponse (history, tool calls and results, images as data: URLs). The system text stays at the head of the first message, as with the IDE's system_field_injection off. - The SSE reply is read into the same events the old frames gave: text, reasoning and its signature, refusals, function calls (pieces or whole), stop reason, context %, and credits. An error before any answer becomes the status generateAssistantResponse's would have, mapped through the IDE's reason table (rate_limit_exceeded is USER_REQUEST_RATE_EXCEEDED, context_length_exceeded is CONTENT_LENGTH_EXCEEDS_THRESHOLD, and so on). The 0.1.32 429 retry applies to both paths. Not done: the auxiliary path (create_response_api_auxiliary; the plugin has no auxiliary calls), the x-amzn-kiro-fallback header, documents as input_file, and reasoning items in history. Run on mote at base966cf717: packages/kiro bun test 168 pass 0 fail (HOME a temp dir). bun scripts/check.mjs kiro ok. Root bun test 6892 pass, 20 skip, 0 fail. Rebased ontoe7af7856(inkstone only) before pushing. Broken by hand: with the arm's value changed, 8 of the 11 new tests go red. image-size and refresh tests now leave the featureConfiguration GET out of what they count as a chat send. Not tried: a real Kiro account. No account in the CreateResponse arm was available, so the /v1/responses body and SSE are as the IDE's source writes and reads them, not as captured from Kiro.
13 lines
536 B
JSON
13 lines
536 B
JSON
{
|
|
"name": "@magpie-community/opencode-kiro-auth",
|
|
"version": "0.1.33",
|
|
"description": "Kiro subscriptions (Free, Pro, Pro+, Power) in OpenCode and magpie",
|
|
"type": "module",
|
|
"main": "./opencode.mjs",
|
|
"exports": { ".": "./opencode2.mjs" },
|
|
"files": ["index.mjs", "opencode.mjs", "opencode2.mjs", "README.md"],
|
|
"keywords": ["opencode", "opencode-plugin", "magpie", "kiro"],
|
|
"license": "MIT",
|
|
"repository": { "type": "git", "url": "git+https://github.com/magpie-community/plugins.git", "directory": "packages/kiro" }
|
|
}
|