fix(kiro): route requests through current runtime surfaces and fix 400 REQUEST_BODY_INVALID (#3776)

This commit is contained in:
mrnim94
2026-09-09 10:45:44 +07:00
parent 7fee56bacd
commit 35b950be81
7 changed files with 57 additions and 31 deletions

View File

@@ -20,26 +20,26 @@ describe("Kiro auth-aware endpoint routing", () => {
]);
});
it("keeps Builder ID OAuth on the Kiro runtime surface", () => {
it("routes Builder ID OAuth through Amazon Q first (runtime path deprecated)", () => {
expect(executor.getOrderedBaseUrls(credentials("builder-id"))).toEqual([
RUNTIME,
CODEWHISPERER,
Q,
CODEWHISPERER,
RUNTIME,
]);
});
it("keeps external IdP on CodeWhisperer before Amazon Q", () => {
it("routes external IdP through Amazon Q first", () => {
expect(executor.getOrderedBaseUrls(credentials("external_idp"))).toEqual([
CODEWHISPERER,
Q,
CODEWHISPERER,
RUNTIME,
]);
});
it("regionalizes AWS endpoints for IDC without changing Kiro runtime", () => {
it("regionalizes AWS endpoints for IDC with Q first", () => {
expect(executor.getOrderedBaseUrls(credentials("idc", "eu-west-1"))).toEqual([
"https://codewhisperer.eu-west-1.amazonaws.com/generateAssistantResponse",
"https://q.eu-west-1.amazonaws.com/generateAssistantResponse",
"https://codewhisperer.eu-west-1.amazonaws.com/generateAssistantResponse",
RUNTIME,
]);
});