feat(kiro): enable multi-endpoint failover for GenerateAssistantResponse
Wire the Kiro provider into BaseExecutor baseUrls fallback so a request advances across the three CodeWhisperer surfaces (runtime kiro.dev, codewhisperer, q) on 429 and network/5xx errors. - providers.js: add baseUrls[] (newest endpoint first); keep baseUrl as default - kiro.js: replace the hand-rolled single-endpoint loop with super.execute() delegation plus EventStream to SSE transform on success Note: the three hosts are alternate DNS surfaces of one regional service. AWS throttles per authenticated identity (token plus profileArn), not per hostname, so this is edge-level failover, not extra 429 quota. Co-authored-by: thienpv <pvtcwd@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -195,7 +195,19 @@ export const PROVIDERS = {
|
||||
clientId: "Iv1.b507a08c87ecfe98"
|
||||
},
|
||||
kiro: {
|
||||
baseUrl: "https://codewhisperer.us-east-1.amazonaws.com/generateAssistantResponse",
|
||||
// All three hosts resolve to the same regional CodeWhisperer streaming service
|
||||
// (GenerateAssistantResponse). They are alternate DNS surfaces, NOT separate quota
|
||||
// buckets — AWS throttles per authenticated identity (token + profileArn), not per
|
||||
// hostname. Listing them enables edge-level failover (5xx / connect timeout / a
|
||||
// degraded surface); it does NOT multiply 429 headroom. To actually spread 429 load,
|
||||
// add multiple Kiro accounts — account rotation in sse/handlers/chat.js handles that.
|
||||
// Order: newest Kiro IDE endpoint first, legacy AWS domains as fallback.
|
||||
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: 2 },
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user