fix(kiro): map GPT reasoning effort fields

GPT-5.6 via Kiro needs reasoning.effort while Claude uses output_config.effort.
Resolve the effort path per-model schema (like Kiro CLI/KAS) so GPT-5.6
receives the correct structured thinking level. Claude path unchanged.

- Add resolveKiroEffortPath returning "reasoning" | "output_config" | null
- buildKiroAdditionalModelRequestFields emits schema-specific shape
- Keep prompt tags for backward compatibility
- Add OpenAI/Claude translator coverage for GPT-5.6 effort mapping
This commit is contained in:
Edison42
2026-07-19 13:53:30 +07:00
committed by decolua
parent 43d4abbcf2
commit eb00222c4f
4 changed files with 74 additions and 13 deletions
@@ -112,6 +112,17 @@ describe("Claude → Kiro (direct route)", () => {
expect(out.systemPrompt).toContain("<max_thinking_length>24576</max_thinking_length>");
});
it("maps Claude-format effort to GPT-5.6 Kiro CLI reasoning fields", () => {
const out = C2K({
output_config: { effort: "low" },
messages: [{ role: "user", content: "think lightly" }],
}, null, "gpt-5.6-sol");
expect(out.additionalModelRequestFields).toEqual({
reasoning: { effort: "low" },
});
});
it("sends Claude system as top-level systemPrompt and keeps a user-content fallback", () => {
const out = C2K({
system: "system-only instruction",