Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fixes/8997-gpt56-max-reasoning.plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- **fix(translator):** the Responses-to-Chat promotion path called `normalizeResponsesReasoningEffort` without the model argument, so GPT-5.6 Sol/Terra/Luna requests with `reasoning.effort: "max""` were downgraded to `"xhigh"`. The model is now threaded through, preserving `max` for GPT-5.6 while keeping the legacy downgrade for older models ([#8997](https://github.com/diegosouzapw/OmniRoute/pull/8997))
2 changes: 1 addition & 1 deletion open-sse/translator/request/openai-responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ export function openaiResponsesToOpenAIRequest(
const reasoningRec = toRecord(root.reasoning);
const effort = toString(reasoningRec.effort);
if (effort && result.reasoning_effort === undefined) {
result.reasoning_effort = normalizeResponsesReasoningEffort(effort, model);
result.reasoning_effort = normalizeResponsesReasoningEffort(effort, model ?? root.model);
}
if (
credentialRecord._copilotClient === true &&
Expand Down
46 changes: 46 additions & 0 deletions tests/unit/triage-bugs-2026-08-02.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,50 @@ test("#8853 proxyConfigToUrl accepts ProxyRegistryRecord-shaped object", () => {
test("#8853 proxyConfigToUrl returns null for partial config (no host)", () => {
const url = proxyConfigToUrl({ type: "http", port: 8080 } as Record<string, unknown>);
assert.equal(url, null, "proxyConfigToUrl must return null for partial config without host");
});

import test from "node:test";
import assert from "node:assert/strict";
import { openaiResponsesToOpenAIRequest } from "../../open-sse/translator/request/openai-responses.ts";

function asRecord(value: unknown): Record<string, unknown> {
return value as Record<string, unknown>;
}

for (const variant of ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"]) {
test(`#8997 ${variant} nested reasoning.effort max survives promotion`, () => {
const translated = asRecord(
openaiResponsesToOpenAIRequest(
variant,
{ model: variant, input: "hello", reasoning: { effort: "max" } },
false,
{}
)
);
assert.equal(translated.reasoning_effort, "max");
});

test(`#8997 ${variant} flat reasoning_effort max survives promotion`, () => {
const translated = asRecord(
openaiResponsesToOpenAIRequest(
variant,
{ model: variant, input: "hello", reasoning_effort: "max" },
false,
{}
)
);
assert.equal(translated.reasoning_effort, "max");
});
}

test("non-GPT-5.6 models still get max downgraded to xhigh", () => {
const translated = asRecord(
openaiResponsesToOpenAIRequest(
"gpt-4o",
{ model: "gpt-4o", input: "hello", reasoning: { effort: "max" } },
false,
{}
)
);
assert.equal(translated.reasoning_effort, "xhigh");
});
Loading