Files
OmniRoute/tests/unit/codex-reasoning-suffix.test.ts
Nguyễn Viết Tuấn d5452d03e7 feat(codex): safely discover compatible models (#12933)
* feat(codex): safely discover compatible models

* docs(changelog): add fragment for #12933

* fix(codex): drop the duplicate GPT-6 Astra registry entries from the merge

release/v3.8.51 had already landed the seven gpt-6-astra* models, and the
merge kept both copies, so the Codex registry listed every Astra id twice.
Keep the release's entries (same ids, capabilities and timeouts) and drop
this branch's copies.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>

---------

Co-authored-by: TheDemonTuan <nguyenviettuanbp@gmail.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-09-18 12:22:50 -03:00

26 lines
824 B
TypeScript

import test from "node:test";
import assert from "node:assert/strict";
import {
CODEX_MAX_ALIAS_MODELS,
CODEX_ULTRA_ALIAS_MODELS,
splitCodexReasoningSuffix,
} from "../../open-sse/executors/codex/reasoningSuffix.ts";
test("Codex Astra supports max and ultra aliases without widening other models", () => {
assert.equal(CODEX_MAX_ALIAS_MODELS.has("gpt-6-astra"), true);
assert.equal(CODEX_ULTRA_ALIAS_MODELS.has("gpt-6-astra"), true);
assert.deepEqual(splitCodexReasoningSuffix("gpt-6-astra-max"), {
baseModel: "gpt-6-astra",
effort: "max",
});
assert.deepEqual(splitCodexReasoningSuffix("gpt-6-astra(ultra)"), {
baseModel: "gpt-6-astra",
effort: "ultra",
});
assert.deepEqual(splitCodexReasoningSuffix("gpt-6-other-max"), {
baseModel: "gpt-6-other-max",
effort: null,
});
});