Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(codex): preserve reasoning controls for account-only models #27790

Closedchai-in(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/27790/headopened View on GitHub

Showing 3 changed files with 200 additions and 12 deletions (loading 1).

x
0 of 3 viewed, 3 left
151 additions and 0 deletionsapps/server/src/provider/CodexChatGptModels.test.tsModified
View file
@@ -1,8 +1,159 @@
import { assert, it } from "@effect/vitest";
+import type { ServerProviderModel } from "@t3tools/contracts";
+import {
+ buildExplicitProviderOptionSelectionsFromDescriptors,
+ getProviderOptionDescriptors,
+} from "@t3tools/shared/model";
import * as Effect from "effect/Effect";
import { HttpClient, HttpClientResponse } from "effect/http";
import { chatGptModels } from "./CodexChatGptModels.ts";
​
+it.effect("fills missing reasoning from the account catalog without replacing native options", () =>
+ Effect.gen(function* () {
+ const reasoning = {
+ id: "reasoningEffort",
+ label: "Reasoning",
+ type: "select" as const,
+ options: [
+ { id: "low", label: "Low" },
+ { id: "xhigh", label: "Extra High", isDefault: true },
+ { id: "future-effort", label: "future-effort" },
+ ],
+ currentValue: "xhigh",
+ };
+ const native: ServerProviderModel[] = [
+ {
+ slug: "native-reasoning",
+ name: "Native",
+ isCustom: false,
+ capabilities: {
+ optionDescriptors: [