fix(kiro): intercept chat via x-amz-target and prepend initial-response frame
Kiro IDE 1.0.228+ moved GenerateAssistantResponse from path /generateAssistantResponse to POST / + x-amz-target header, so chat turns bypassed MITM. The SmithyMessageDecoderStream also now requires an initial-response frame at stream start, and agent/vibe mode sends modelId "auto" which had no mappable slot. - Add isChatRequest() header-based match for kiro in mitm/config.js - Add buildInitialResponseFrame/withInitialFrame to emit the mandatory initial-response once per stream (kiro.js) - Add "auto" model slot and update mitmDomain to runtime.us-east-1.kiro.dev
This commit is contained in:
@@ -14,6 +14,13 @@ describe("Kiro MITM model slots", () => {
|
||||
expect(Array.isArray(kiro.defaultModels)).toBe(true);
|
||||
});
|
||||
|
||||
it("offers a mappable slot for the agent default model id 'auto'", () => {
|
||||
// اسلات auto برای vibe mode لازمه — وگرنه درخواست میره AWS
|
||||
const auto = kiro.defaultModels.find((m) => m.id === "auto");
|
||||
expect(auto).toBeTruthy();
|
||||
expect(auto.alias).toBe("auto");
|
||||
});
|
||||
|
||||
it("offers a mappable slot for Claude Sonnet 5", () => {
|
||||
const sonnet5 = kiro.defaultModels.find((m) => m.id === "claude-sonnet-5");
|
||||
expect(sonnet5).toBeTruthy();
|
||||
|
||||
Reference in New Issue
Block a user