fix(kiro): route requests through current runtime surfaces and fix 400 REQUEST_BODY_INVALID (#3776)
This commit is contained in:
1 parent
7fee56bacd
commit
35b950be81
7 files changed
+57
-31
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { openaiToKiroRequest } from "../../open-sse/translator/request/openai-to-kiro.js";
|
||||
import { claudeToKiroRequest } from "../../open-sse/translator/request/claude-to-kiro.js";
|
||||
|
||||
for (const [name, translate, body] of [
|
||||
["OpenAI", openaiToKiroRequest, { messages: [{ role: "user", content: "hello" }] }],
|
||||
["Claude", claudeToKiroRequest, { messages: [{ role: "user", content: "hello" }] }],
|
||||
]) {
|
||||
describe(`${name} Kiro minimal wire payload`, () => {
|
||||
it("omits unsupported agent fields", () => {
|
||||
const payload = translate("kiro/claude-sonnet-4.5", body, true, {});
|
||||
expect(payload).not.toHaveProperty("agentMode");
|
||||
expect(payload.conversationState).not.toHaveProperty("agentContinuationId");
|
||||
expect(payload.conversationState).not.toHaveProperty("agentTaskType");
|
||||
expect(payload.conversationState.chatTriggerType).toBe("MANUAL");
|
||||
expect(payload.conversationState.currentMessage.userInputMessage.origin).toBe("AI_EDITOR");
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user