fix(openai): align Codex fallback with GPT-5.5

This commit is contained in:
Peter Steinberger
2026-04-23 21:02:21 +01:00
parent 956350bb9c
commit 058e6f588a
8 changed files with 24 additions and 19 deletions

View File

@@ -13,9 +13,9 @@ const DEFAULT_MAX_TOKENS = 128_000;
export const FALLBACK_CODEX_MODELS = [
{
id: "gpt-5.4",
model: "gpt-5.4",
displayName: "gpt-5.4",
id: "gpt-5.5",
model: "gpt-5.5",
displayName: "gpt-5.5",
description: "Latest frontier agentic coding model.",
isDefault: true,
inputModalities: ["text", "image"],

View File

@@ -17,7 +17,7 @@ function expectStaticFallbackCatalog(
result: Awaited<ReturnType<typeof buildCodexProviderCatalog>>,
) {
expect(result.provider.models.map((model) => model.id)).toEqual([
"gpt-5.4",
"gpt-5.5",
"gpt-5.4-mini",
"gpt-5.2",
]);
@@ -241,7 +241,7 @@ describe("codex provider", () => {
expect(
result && "provider" in result ? result.provider.models.map((model) => model.id) : [],
).toEqual(["gpt-5.4", "gpt-5.4-mini", "gpt-5.2"]);
).toEqual(["gpt-5.5", "gpt-5.4-mini", "gpt-5.2"]);
});
it("adds the GPT-5 prompt overlay to Codex provider runs", () => {

View File

@@ -110,7 +110,7 @@ export async function buildCodexProviderCatalog(
};
}
function resolveCodexDynamicModel(modelId: string): ProviderRuntimeModel | undefined {
function resolveCodexDynamicModel(modelId: string) {
const id = modelId.trim();
if (!id) {
return undefined;
@@ -191,5 +191,7 @@ function isKnownXHighCodexModel(modelId: string): boolean {
function isModernCodexModel(modelId: string): boolean {
const lower = modelId.trim().toLowerCase();
return lower === "gpt-5.4" || lower === "gpt-5.4-mini" || lower === "gpt-5.2";
return (
lower === "gpt-5.5" || lower === "gpt-5.4" || lower === "gpt-5.4-mini" || lower === "gpt-5.2"
);
}