| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | import { Schema } from "effect"; | 1 | import { Schema } from "effect"; |
| | 2 | import { ProviderKind } from "./orchestration"; |
| 2 | | 3 | |
| 3 | export const CODEX_REASONING_EFFORT_OPTIONS = ["xhigh", "high", "medium", "low"] as const; | 4 | export const CODEX_REASONING_EFFORT_OPTIONS = ["xhigh", "high", "medium", "low"] as const; |
| 4 | export type CodexReasoningEffort = (typeof CODEX_REASONING_EFFORT_OPTIONS)[number]; | 5 | export type CodexReasoningEffort = (typeof CODEX_REASONING_EFFORT_OPTIONS)[number]; |
| ... | @@ -27,15 +28,14 @@ export const MODEL_OPTIONS_BY_PROVIDER = { | ... | @@ -27,15 +28,14 @@ export const MODEL_OPTIONS_BY_PROVIDER = { |
| 27 | { slug: "gpt-5.2-codex", name: "GPT-5.2 Codex" }, | 28 | { slug: "gpt-5.2-codex", name: "GPT-5.2 Codex" }, |
| 28 | { slug: "gpt-5.2", name: "GPT-5.2" }, | 29 | { slug: "gpt-5.2", name: "GPT-5.2" }, |
| 29 | ], | 30 | ], |
| 30 | } as const satisfies Record<"codex", readonly ModelOption[]>; | 31 | } as const satisfies Record<ProviderKind, readonly ModelOption[]>; |
| 31 | | 32 | |
| 32 | type BuiltInModelSlug = | 33 | type BuiltInModelSlug = (typeof MODEL_OPTIONS_BY_PROVIDER)[ProviderKind][number]["slug"]; |
| 33 | (typeof MODEL_OPTIONS_BY_PROVIDER)[keyof typeof MODEL_OPTIONS_BY_PROVIDER][number]["slug"]; | | |
| 34 | export type ModelSlug = BuiltInModelSlug | (string & {}); | 34 | export type ModelSlug = BuiltInModelSlug | (string & {}); |
| 35 | | 35 | |
| 36 | export const DEFAULT_MODEL_BY_PROVIDER = { | 36 | export const DEFAULT_MODEL_BY_PROVIDER = { |
| 37 | codex: "gpt-5.3-codex", | 37 | codex: "gpt-5.4", |
| 38 | } as const satisfies Record<keyof typeof MODEL_OPTIONS_BY_PROVIDER, ModelSlug>; | 38 | } as const satisfies Record<ProviderKind, ModelSlug>; |
| 39 | | 39 | |
| 40 | // Backward compatibility for existing Codex-only call sites. | 40 | // Backward compatibility for existing Codex-only call sites. |
| 41 | export const MODEL_OPTIONS = MODEL_OPTIONS_BY_PROVIDER.codex; | 41 | export const MODEL_OPTIONS = MODEL_OPTIONS_BY_PROVIDER.codex; |
| ... | @@ -49,15 +49,12 @@ export const MODEL_SLUG_ALIASES_BY_PROVIDER = { | ... | @@ -49,15 +49,12 @@ export const MODEL_SLUG_ALIASES_BY_PROVIDER = { |
| 49 | "5.3-spark": "gpt-5.3-codex-spark", | 49 | "5.3-spark": "gpt-5.3-codex-spark", |
| 50 | "gpt-5.3-spark": "gpt-5.3-codex-spark", | 50 | "gpt-5.3-spark": "gpt-5.3-codex-spark", |
| 51 | }, | 51 | }, |
| 52 | } as const satisfies Record<keyof typeof MODEL_OPTIONS_BY_PROVIDER, Record<string, ModelSlug>>; | 52 | } as const satisfies Record<ProviderKind, Record<string, ModelSlug>>; |
| 53 | | 53 | |
| 54 | export const REASONING_EFFORT_OPTIONS_BY_PROVIDER = { | 54 | export const REASONING_EFFORT_OPTIONS_BY_PROVIDER = { |
| 55 | codex: CODEX_REASONING_EFFORT_OPTIONS, | 55 | codex: CODEX_REASONING_EFFORT_OPTIONS, |
| 56 | } as const satisfies Record< | 56 | } as const satisfies Record<ProviderKind, readonly CodexReasoningEffort[]>; |
| 57 | keyof typeof MODEL_OPTIONS_BY_PROVIDER, | | |
| 58 | readonly CodexReasoningEffort[] | | |
| 59 | >; | | |
| 60 | | 57 | |
| 61 | export const DEFAULT_REASONING_EFFORT_BY_PROVIDER = { | 58 | export const DEFAULT_REASONING_EFFORT_BY_PROVIDER = { |
| 62 | codex: "high", | 59 | codex: "high", |
| 63 | } as const satisfies Record<keyof typeof MODEL_OPTIONS_BY_PROVIDER, CodexReasoningEffort | null>; | 60 | } as const satisfies Record<ProviderKind, CodexReasoningEffort | null>; |