Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions apps/server/src/provider/Layers/CodexProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface CodexAppServerProviderSnapshot {
}

const REASONING_EFFORT_LABELS: Record<CodexSchema.V2ModelListResponse__ReasoningEffort, string> = {
none: "None",
none: "Off",
minimal: "Minimal",
low: "Low",
medium: "Medium",
Expand Down Expand Up @@ -84,7 +84,14 @@ function codexAccountEmail(account: CodexSchema.V2GetAccountResponse["account"])
function mapCodexModelCapabilities(
model: CodexSchema.V2ModelListResponse__Model,
): ModelCapabilities {
const reasoningOptions = model.supportedReasoningEfforts.map(({ reasoningEffort }) =>
const supportedReasoningEfforts = model.supportedReasoningEfforts.map(
({ reasoningEffort }) => reasoningEffort,
);
const reasoningEfforts: ReadonlyArray<CodexSchema.V2ModelListResponse__ReasoningEffort> =
supportedReasoningEfforts.length === 0 || supportedReasoningEfforts.includes("none")
? supportedReasoningEfforts
: ["none", ...supportedReasoningEfforts];
const reasoningOptions = reasoningEfforts.map((reasoningEffort) =>
reasoningEffort === model.defaultReasoningEffort
? {
id: reasoningEffort,
Expand Down
Loading