mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-20 22:22:57 +03:00
fix(sse): reconciles rebase-onto-tip drift for 9006
Two categories of inherited base-branch breakage surfaced when
rebasing onto release/v3.8.50's latest tip, both confirmed unrelated
to this PR's own diff:
- check:file-size: base.ts and chat.ts drifted further past their
frozen caps via already-merged commits (7163081f5 and others) that
didn't rebaseline after growing them. Documented and bumped in
file-size-baseline.json.
- chat-helpers.test.ts: two gpt-5.5 routing assertions predate #9275
(fix(routing): bare model ids route to codex first), which
deliberately made gpt-5.5 route to codex unconditionally, regardless
of which other providers are active. Confirmed via #9275's own
commit message and code comments this is intentional, not a
regression; verified reproducible on the raw base tip alone, with
no changes from this PR involved. Updated both assertions and their
names to match the new, intentional default.
This commit is contained in:
@@ -160,7 +160,12 @@ test("resolveModelOrError routes Codex native compact gpt-5.5 requests to Codex"
|
||||
assert.equal(result.model, "gpt-5.5");
|
||||
});
|
||||
|
||||
test("resolveModelOrError keeps non-Codex gpt-5.5 Responses requests on OpenAI", async () => {
|
||||
test("resolveModelOrError routes bare gpt-5.5 Responses requests to Codex regardless of client user-agent", async () => {
|
||||
// #9275: gpt-5.5 is now in CODEX_NATIVE_UNPREFIXED_MODELS — bare-id requests
|
||||
// always route to codex, even from a non-Codex-CLI client, so the Codex CLI
|
||||
// default is honored deterministically instead of racing other providers
|
||||
// that also catalog the id. Prefix the model id (e.g. openai/gpt-5.5) to opt
|
||||
// into a different provider.
|
||||
const result = await resolveModelOrError(
|
||||
"gpt-5.5",
|
||||
{ model: "gpt-5.5", input: "hello" },
|
||||
@@ -168,7 +173,7 @@ test("resolveModelOrError keeps non-Codex gpt-5.5 Responses requests on OpenAI",
|
||||
{ "user-agent": "OpenAI/Node" }
|
||||
);
|
||||
|
||||
assert.equal(result.provider, "openai");
|
||||
assert.equal(result.provider, "codex");
|
||||
assert.equal(result.model, "gpt-5.5");
|
||||
});
|
||||
|
||||
@@ -187,7 +192,12 @@ test("resolveModelOrError routes bare gpt-5.5 to Codex medium when Codex is the
|
||||
assert.equal(result.targetFormat, "openai-responses");
|
||||
});
|
||||
|
||||
test("resolveModelOrError keeps bare gpt-5.5 on OpenAI when OpenAI is the only active account", async () => {
|
||||
test("resolveModelOrError routes bare gpt-5.5 to Codex even when OpenAI is the only active account", async () => {
|
||||
// #9275: the codex-first default for gpt-5.5 is unconditional — it does not
|
||||
// fall back to whichever OTHER provider happens to be active. If codex has
|
||||
// no active connection, execution surfaces a "No active credentials" error
|
||||
// with candidate-prefix hints (see handleNoCredentials, #9275) rather than
|
||||
// silently routing to openai here.
|
||||
await seedConnection("openai");
|
||||
|
||||
const result = await resolveModelOrError(
|
||||
@@ -197,7 +207,7 @@ test("resolveModelOrError keeps bare gpt-5.5 on OpenAI when OpenAI is the only a
|
||||
{ "user-agent": "OpenAI/Node" }
|
||||
);
|
||||
|
||||
assert.equal(result.provider, "openai");
|
||||
assert.equal(result.provider, "codex");
|
||||
assert.equal(result.model, "gpt-5.5");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user