























@@ -52,25 +52,6 @@ vi.mock("../model-suppression.js", () => {
5252return undefined;
5353}
545455-const staleOpenAICodexModelIds = new Set([
56-"gpt-5.1",
57-"gpt-5.1-codex",
58-"gpt-5.1-codex-mini",
59-"gpt-5.1-codex-max",
60-"gpt-5.2",
61-"gpt-5.2-codex",
62-"gpt-5.2-pro",
63-"gpt-5.3",
64-"gpt-5.3-codex",
65-"gpt-5.3-chat-latest",
66-]);
67-68-function isStaleOpenAICodexModel(provider?: string, id?: string): boolean {
69-return (
70-provider === "openai-codex" && staleOpenAICodexModelIds.has(id?.trim().toLowerCase() ?? "")
71-);
72-}
73-7455return {
7556shouldSuppressBuiltInModel: ({
7657 provider,
@@ -83,9 +64,6 @@ vi.mock("../model-suppression.js", () => {
8364baseUrl?: string;
8465config?: unknown;
8566}) => {
86-if (isStaleOpenAICodexModel(provider, id)) {
87-return true;
88-}
8967if (
9068(provider === "openai" ||
9169provider === "azure-openai-responses" ||
@@ -101,9 +79,6 @@ vi.mock("../model-suppression.js", () => {
10179);
10280},
10381shouldUnconditionallySuppress: ({ provider, id }: { provider?: string; id?: string }) => {
104-if (isStaleOpenAICodexModel(provider, id)) {
105-return true;
106-}
10782if (
10883(provider === "openai" ||
10984provider === "azure-openai-responses" ||
@@ -130,10 +105,6 @@ vi.mock("../model-suppression.js", () => {
130105) {
131106return "Unknown model: qwen/qwen3.6-plus. qwen3.6-plus is not supported on the Qwen Coding Plan endpoint; use a Standard pay-as-you-go Qwen endpoint or choose qwen/qwen3.5-plus.";
132107}
133-if (isStaleOpenAICodexModel(provider, id)) {
134-const modelId = id?.trim().toLowerCase() ?? "";
135-return `Unknown model: openai-codex/${modelId}. ${modelId} is no longer supported for ChatGPT/Codex OAuth accounts. Use openai/gpt-5.5 through the Codex runtime.`;
136-}
137108if (
138109(provider === "openai" ||
139110provider === "azure-openai-responses" ||
@@ -1954,7 +1925,7 @@ describe("resolveModel", () => {
19541925});
19551926});
195619271957-it("rejects stale exact openai-codex gpt-5.3-codex registry metadata", () => {
1928+it("accepts available exact openai-codex gpt-5.3-codex registry metadata", () => {
19581929vi.mocked(discoverModels).mockReturnValue({
19591930find: vi.fn((provider: string, modelId: string) => {
19601931if (provider !== "openai-codex") {
@@ -1974,10 +1945,12 @@ describe("resolveModel", () => {
1974194519751946const result = resolveModelForTest("openai-codex", "gpt-5.3-codex", "/tmp/agent");
197619471977-expect(result.model).toBeUndefined();
1978-expect(result.error).toBe(
1979-"Unknown model: openai-codex/gpt-5.3-codex. gpt-5.3-codex is no longer supported for ChatGPT/Codex OAuth accounts. Use openai/gpt-5.5 through the Codex runtime.",
1980-);
1948+expect(result.error).toBeUndefined();
1949+expectRecordFields(result.model, {
1950+provider: "openai-codex",
1951+id: "gpt-5.3-codex",
1952+contextWindow: 272000,
1953+});
19811954});
1982195519831956it("canonicalizes the legacy openai-codex gpt-5.4-codex alias at runtime", () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。