diff --git a/apps/server/src/provider/CodexManagedErrors.test.ts b/apps/server/src/provider/CodexManagedErrors.test.ts index 753fad49d0d0..16791c36b707 100644 --- a/apps/server/src/provider/CodexManagedErrors.test.ts +++ b/apps/server/src/provider/CodexManagedErrors.test.ts @@ -36,6 +36,10 @@ it("distinguishes unsupported tools from input items without exposing the raw re for (const [detail, expected] of [ ["tool 'namespace' is not supported", "tool namespace"], ["input item 'additional_tools' is not supported", "input item"], + [ + "User subscription sharing currently supports only text, image, and file messages, item references, additional tools, compaction summaries, reasoning items, Web Search call items, developer function and custom tool call items, and programmatic tool calling items. Remove unsupported input items or use an API key instead.", + "input item", + ], ]) { const response = { error: { code, message: `${detail}; dummy-sensitive` } }; for (const value of [response, JSON.stringify(response)]) { diff --git a/apps/server/src/provider/CodexManagedErrors.ts b/apps/server/src/provider/CodexManagedErrors.ts index 4cad5709d2eb..b8388e375144 100644 --- a/apps/server/src/provider/CodexManagedErrors.ts +++ b/apps/server/src/provider/CodexManagedErrors.ts @@ -105,7 +105,8 @@ export function classifyCodexManagedError(value: unknown) { message: "Codex sent a tool namespace that ChatGPT sharing does not support. Use another provider for this request.", }; - if (text.includes("additional_tools")) + // ChatGPT lists `additional tools` as supported and says "Remove unsupported input items". + if (text.includes("input item")) return { ...failure, message: