mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-22 07:02:16 +03:00
fix(combo): clear stale sticky pins when stickiness is disabled (#10907)
Validado + reconciliado: 86/86 testes focados (combo-disable-session-stickiness, base-executor-sanitize-effort, command-code-executor) passando. Incluí o rebaseline do file-size (commandCode.ts 1023→1038, crescimento legítimo deste PR) diretamente no branch — evitando o erro que cometi antes (rebaseline só na worktree local, nunca chegando ao branch real). Correção real de bug com repro ao vivo documentada. CI vermelho é o base-red já rastreado em #9985. Obrigado!
This commit is contained in:
@@ -230,6 +230,32 @@ test("Command Code executor honors body.model rewrite from payload rules", async
|
||||
assert.equal(posted.params.reasoning_effort, "max");
|
||||
});
|
||||
|
||||
test("Command Code executor maps unsupported minimal reasoning_effort to low (upstream 400 regression)", async () => {
|
||||
const calls: FetchCall[] = [];
|
||||
globalThis.fetch = async (url, init = {}) => {
|
||||
calls.push({ url: String(url), init });
|
||||
return commandCodeStream([{ type: "text-delta", text: "ok" }, { type: "finish" }]);
|
||||
};
|
||||
|
||||
// Live upstream rejection: "Validation error: Invalid option: expected one of
|
||||
// \"low\"|\"medium\"|\"high\"|\"xhigh\"|\"max\" at \"params.reasoning_effort\"" —
|
||||
// `minimal` (a Muse Spark catalog tier) must be downgraded to `low` before
|
||||
// the wire body is built, on BOTH the combo and single-model paths.
|
||||
await getExecutor("command-code").execute({
|
||||
model: "poolside/laguna-s-2.1-free",
|
||||
stream: false,
|
||||
credentials: { apiKey: "cc_test_key" },
|
||||
body: {
|
||||
stream: false,
|
||||
messages: [{ role: "user", content: "Hi" }],
|
||||
reasoning_effort: "minimal",
|
||||
},
|
||||
});
|
||||
|
||||
const posted = JSON.parse(String(calls[0].init.body));
|
||||
assert.equal(posted.params.reasoning_effort, "low", "minimal must map to low");
|
||||
});
|
||||
|
||||
test("Command Code raw NDJSON stream becomes OpenAI chat SSE chunks", async () => {
|
||||
const calls: FetchCall[] = [];
|
||||
globalThis.fetch = async (url, init = {}) => {
|
||||
|
||||
Reference in New Issue
Block a user