mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:01:01 +00:00
fix(openai): align Codex fallback with GPT-5.5
This commit is contained in:
@@ -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"],
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
@@ -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"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user