Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(codex): honor configured provider model defaults #8913

ClosedSunkenInTime(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/8913/headopened View on GitHub

Showing 4 changed files with 206 additions and 1 deletion (loading 3).

x
0 of 4 viewed, 4 left
206 additions and 1 deletionapps/server/src/provider/Layers/CodexProvider.test.tsModified
View file
@@ -1,6 +1,11 @@
import { assert, it } from "@effect/vitest";
+import type { ServerProviderModel } from "@t3tools/contracts";
​
-import { applyPreferredCodexDefaultModel, mapCodexModelCapabilities } from "./CodexProvider.ts";
+import {
+ applyCodexConfigModelDefaults,
+ applyPreferredCodexDefaultModel,
+ mapCodexModelCapabilities,
+} from "./CodexProvider.ts";
​
it("maps current Codex model capability fields", () => {
const capabilities = mapCodexModelCapabilities({
@@ -144,3 +149,203 @@
​
assert.deepStrictEqual(models.find((model) => model.isDefault)?.slug, "gpt-5.4");
});
+​
+it("uses an explicitly configured custom Codex model", () => {
+ const models = applyCodexConfigModelDefaults(
+ [
+ { slug: "gpt-5.6-sol", name: "GPT-5.6 Sol", isCustom: false, capabilities: null },
+ { slug: "custom-codex", name: "custom-codex", isCustom: true, capabilities: null },
+ ],
+ { model: "custom-codex" },
+ );
+​
+ assert.deepStrictEqual(models.find((model) => model.isDefault)?.slug, "custom-codex");
+});
+​