fix(kiro): honor thinking effort budgets

Resolve the Kiro thinking budget from client intent (OpenAI reasoning_effort,
OpenAI Responses reasoning.effort, Claude output_config.effort, and Claude
thinking.budget_tokens) by reusing the shared thinkingUnified extractThinking
parser, then inject the resolved budget into the Kiro thinking system prefix.
Explicit none/off/disabled stops the prefix injection; synthetic -thinking
aliases keep the default budget.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
EdisonPVE
2026-06-18 15:14:42 +07:00
committed by decolua
co-authored by Cursor
parent 3f9382dee4
commit 2ff11246ae
5 changed files with 147 additions and 61 deletions
@@ -64,6 +64,17 @@ describe("Claude → Kiro (direct route)", () => {
"<thinking_mode>enabled</thinking_mode>"
);
});
it("maps output_config.effort high to Kiro max_thinking_length 24576", () => {
const out = C2K({
output_config: { effort: "high" },
messages: [{ role: "user", content: "think with adaptive effort" }],
});
expect(out.conversationState.currentMessage.userInputMessage.content).toContain(
"<max_thinking_length>24576</max_thinking_length>"
);
});
});
describe("Kiro → Claude (direct route, OpenAI-shaped chunks from executor)", () => {