mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 13:38:31 +00:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user