跳到主要内容
注册

第三方应用里用 ChatGPT 订阅报错:subscription_sharing 错误码对照

在 T3 Code、OpenCode、Pi 等应用里看到 subscription_sharing_usage_limit_exceeded 或 subscription_sharing_unsupported_capability,说明请求走的是 OpenAI「Sign in with ChatGPT」的订阅共享路径,用你的 ChatGPT 套餐额度调用 Responses API。按 OpenAI 错误与恢复文档(2026-11-30 核对),这类报错会直接中止推理,OpenAI 不会静默切到另一条计费路径("OpenAI does not silently switch the request to another billing path")。需按具体错误码处理——查看 ChatGPT Settings → Usage 里的应用单独限额、移除不支持的特性或速度档、重连失效授权、对 503 退避重试——或切到自己的 API Key。

什么是 ChatGPT 订阅共享,为什么报错会直接中断

按 OpenAI 的 Sign in with ChatGPT 文档(developers.openai.com,2026-11-30 核对),ChatGPT 套餐使用是 Sign in with ChatGPT 的可选能力:开源和本地部署的应用申请 chatgpt.tokens.use.direct 权限后,可以用你的 ChatGPT 套餐额度发符合条件的 Responses API 请求(POST /v1/responses,store: false、stream: true),不能访问你的 ChatGPT 聊天记录。出错时推理会停止,OpenAI 不会静默切到另一条计费路径。失败可能出现在建流之前(准入返回 HTTP 401/403/503,响应可能是 {"detail":"..."})、结构化的 Responses 错误(error.code 与 error.param)、流开始之后的 response.failed 事件,或 OAuth 刷新阶段。

OpenAI 订阅共享错误码对照表

按 OpenAI 的 Sign in with ChatGPT 错误与恢复文档(2026-11-30 核对),结构化 Responses 错误表共列出 9 个错误码(原文把两个 chatpass_v2_* 合并在一行共 8 行,并注明并非全部清单):

OpenAI 订阅共享错误码对照表
错误码HTTP含义(按 OpenAI 文档转述)你能做的
subscription_sharing_user_not_eligible403所选用户、工作区或策略不可使用套餐共享。核对共享策略或换计费路径;不要重试或循环 OAuth。
subscription_sharing_usage_limit_exceeded429共享路径用量限额已到(可能有单独的应用限额)。暂停套餐请求,打开 https://chatgpt.com/settings/usage;不要据此推断整个套餐已空或重置时间。
subscription_sharing_usage_unavailable503暂时无法检查用量可用性。保留凭据,稍后按有上限的退避间隔重试。
subscription_sharing_unsupported_capability400请求含不支持的输入、工具、执行特性、模型或服务档位覆写。检查 error.param 并移除不支持的项;不要原样重发。
subscription_sharing_route_not_supported403HTTP 方法或端点不在该流程允许范围内。核对客户端调用的是 POST https://api.openai.com/v1/responses。
subscription_sharing_invalid_user401无法校验订阅者上下文。保留 request ID;确认撤销授权或刷新彻底失败后再重登。
chatpass_v2_scope_not_authorized403签名权限上下文未授权该操作。检查客户端与授权配置,不要重试,也不要换计费。
chatpass_v2_invalid_authorization_context403签名权限上下文未授权该操作。检查客户端与授权配置,不要重试,也不要换计费。
subscription_sharing_user_unavailable503用户或工作区信息暂时不可用。保留凭据,稍后按有上限的退避间隔重试。
  • 建流前准入错误(OpenAI 文档,2026-11-30 核对):可能返回 HTTP 401(账号或权限范围被拒)、403(策略或允许的服务地区拦截)、503(直连路由不可用,保留凭据退避重试)。
  • OpenAI 的表没列、但这些应用会处理的错误码:T3 Code v0.1.13(CodexManagedErrors.ts)、OpenCode v2.4.3(to-session-error.ts)与 Pi v1.7.0 都处理 subscription_sharing_workplace_individual_usage_limit_exceeded(工作区给个人设的应用上限);T3 Code 还处理 subscription_sharing_v2_client_not_enabled 与 subscription_sharing_v2_* 别名。
  • 刷新与断开(OpenAI 文档,2026-11-30 核对):invalid_grant、invalid_refresh_token、token_expired、refresh_token_expired、refresh_token_invalidated、refresh_token_reused 需清除失效令牌后重走 OAuth(invalid_client 需修客户端配置)。在 ChatGPT 设置中断开应用时,OpenAI 目前不主动通知应用。

你看到的客户端原文 → 对应错误码

下方 T3 Code 句子逐字取自 pingdotgg/t3code v0.1.13(CodexManagedErrors.ts,2026-11-30 核对),OpenCode 取自 anomalyco/opencode issue #62529 与 v2.4.3(to-session-error.ts,2026-11-30 核对),Pi 取自 openai/codex issue #51043(2026-11-30 核对):

你看到的客户端原文 → 对应错误码
应用与你看到的原文对应错误码
T3 Code: "Codex used a feature that ChatGPT sharing does not support. Use another provider for this request."subscription_sharing_unsupported_capability
T3 Code: "Your ChatGPT usage limit was reached. Check ChatGPT Usage settings for your available allowance."subscription_sharing_usage_limit_exceeded
T3 Code: "You reached your workspace's limit for using ChatGPT in other apps. Ask your workspace admin to increase it."subscription_sharing_workplace_individual_usage_limit_exceeded
T3 Code: "ChatGPT sharing is unavailable for this account or workspace. Use another provider or check its sharing policy."subscription_sharing_user_not_eligible
T3 Code: "ChatGPT usage is temporarily unavailable. Try again shortly."subscription_sharing_usage_unavailable
T3 Code: "This app is not enabled for this ChatGPT connection. Use your existing CLI or another provider."subscription_sharing_v2_client_not_enabled
T3 Code: "ChatGPT does not support this request route."subscription_sharing_route_not_supported
T3 Code: "ChatGPT could not validate this connection. Check the selected account and sharing permissions."subscription_sharing_invalid_user
T3 Code: "ChatGPT is temporarily unavailable. Try again shortly."subscription_sharing_user_unavailable
T3 Code: "This ChatGPT grant does not authorize the request. Check the connection's sharing permissions."chatpass_v2_scope_not_authorized
T3 Code: "ChatGPT could not authorize this connection. Check the client and sharing permissions."chatpass_v2_invalid_authorization_context
OpenCode: "ChatGPT usage limit reached. Check ChatGPT Settings → Usage for details."subscription_sharing_usage_limit_exceeded
Pi / 原始流原文:「The ChatGPT user has reached their Subscription Sharing usage limit. Ask the user to try again after their usage limit resets or use an API key instead.」subscription_sharing_usage_limit_exceeded
  • T3 Code v0.1.13(CodexManagedErrors.ts,2026-11-30 核对)另有两条细分 subscription_sharing_unsupported_capability 原文:"Codex sent a tool namespace that ChatGPT sharing does not support. Use another provider for this request."(含 tool 'namespace')与 "Codex sent an input item that ChatGPT sharing does not support. Use another provider for this request."(含 additional_tools)。
  • OpenCode v2.4.3(to-session-error.ts,2026-11-30 核对)对 subscription_sharing_unsupported_capability 显示 "This request uses a feature ChatGPT token sharing doesn't support. Remove the unsupported feature and try again.";Pi v1.7.0 遇到 subscription_sharing_usage_limit_exceeded 时还会附上 Check your ChatGPT usage: https://chatgpt.com/settings/usage。

分情况处理办法

额度用完

打开 https://chatgpt.com/settings/usage 查看该应用单独的共享限额。按 OpenAI 错误与恢复文档(2026-11-30 核对),不要从 subscription_sharing_usage_limit_exceeded 推断整个套餐已用完,也不要推断重置时间。在 anomalyco/opencode #62529 与 openai/codex #51043(2026-11-30 核对)中,有用户反馈主套餐仍有余量但共享路径已报错;重新登录是否有用,各人说法不一。等待重置;如果报的是 subscription_sharing_workplace_individual_usage_limit_exceeded,请工作区管理员调高你的限额;或改用 API Key。

能力不支持:要移除什么

检查 error.param,移除订阅共享不接受的内容。按 OpenAI 预览限制文档(2026-11-30 核对),不接受的有:显式的 role: "system" 消息;background、conversation、max_output_tokens、max_tool_calls、metadata、prompt、temperature、top_p、user 等字段(文档还列了更多);托管工具(image_generation、file_search、Code Interpreter、原生 computer use、托管 MCP、Responses tool_search,以及写在顶层 tools 里的 programmatic_tool_calling);音视频输入。

T3 Code:速度档

按 T3 Code 的文档(docs/user/providers-codex.md,v0.1.13,2026-11-30 核对),加速速度档不能通过 ChatGPT 订阅共享使用,文档建议改用本机已有的 Codex 登录:先运行 codex login,再在 Settings → Providers → Configure manually 添加。

T3 Code:子代理

pingdotgg/t3code issue #39101(未关闭,#42726 作为它的重复问题关闭;2026-11-30 核对)里,用户反馈 Codex 调用原生子代理(collaboration.spawn_agent)后,线程里留下 agent_message,之后每轮都会失败。可以新开线程且不用原生子代理、回退掉触发的那一轮,或改用本机 Codex CLI 登录 / API Key。

账号不符合条件、鉴权失败或路由不支持

subscription_sharing_user_not_eligible(403)要查工作区的共享策略或改走 API Key,不要循环登录 OAuth。subscription_sharing_invalid_user(401)先保留 request ID,确认授权已撤销或刷新令牌彻底失效后再重新登录;暂时的网络故障不要清掉凭据,invalid_client 要改客户端配置。chatpass_v2_*(403)要核对客户端与 chatgpt.tokens.use.direct 授权。subscription_sharing_route_not_supported(403)要确认客户端发往 POST https://api.openai.com/v1/responses,而不是 ChatGPT 的 backend-api。

服务暂时不可用(503)

遇到 subscription_sharing_usage_unavailable、subscription_sharing_user_unavailable 或建流前 503,按 OpenAI 文档(2026-11-30 核对)保留登录凭据,按有上限的退避间隔稍后重试,不要清掉登录态。

用自己的 API Key(含 Router One 接入)

OpenAI 错误与恢复文档(2026-11-30 核对)和报错原句("use an API key instead")都把 API Key 列为另一条付费路径。Router One 是其中一种选择:一个 OpenAI 兼容地址(https://api.router.one/v1,Anthropic Messages 地址为 https://api.router.one)、一把 sk-... Key 和 /models 目录里的模型 ID(如 openai/gpt-6.2-sol、anthropic/claude-sonnet-5、deepseek-v4.1-flash、grok-4.7),其中 GPT 系列、DeepSeek 与 Grok 对话模型原生支持 POST /v1/responses。用 Router One 的 Key 不消耗你的 ChatGPT 套餐额度:计费的请求,套餐覆盖该模型且还有剩余次数时扣套餐次数,否则扣钱包。控制台 → 日志记录网关转发给模型的请求,显示模型、Token、钱包扣费或套餐扣减次数、耗时和状态;在输出任何内容之前就失败的流式请求可能没有记录。Router One 不提高也不绕过 ChatGPT 订阅限额,不替代 ChatGPT 网页或 Codex cloud。接入指南见 https://router.one/zh/integrations/opencode 、 https://router.one/zh/integrations/pi 、 https://router.one/zh/codex-responses-api 与 /docs/guides/cli-setup 。

~/.codex/config.toml
# ~/.codex/config.toml
model = "gpt-6.2-sol"
model_provider = "router"

[model_providers.router]
name = "router"
base_url = "https://api.router.one/v1"
env_key = "ROUTER_ONE_API_KEY"
wire_api = "responses"

# 在 shell 里导出:
# export ROUTER_ONE_API_KEY=sk-your-router-one-key

常见问题

ChatGPT 用量页还有剩余额度,为什么仍报 subscription_sharing_usage_limit_exceeded?

按 OpenAI 错误与恢复文档(2026-11-30 核对),第三方应用可以有单独的共享限额,不要仅凭这个错误码假定整个套餐用完或推断重置时间。anomalyco/opencode #62529 与 openai/codex #51043(2026-11-30 核对)也有同类反馈。请去 https://chatgpt.com/settings/usage 查看对应应用限额、等重置,或改用 API Key。

T3 Code 报「Codex used a feature that ChatGPT sharing does not support. Use another provider for this request.」怎么办?

在 T3 Code v0.1.13(CodexManagedErrors.ts)里,这句对应 subscription_sharing_unsupported_capability。按 OpenAI 文档(HTTP 400,2026-11-30 核对),它指请求里有不支持的输入、工具、执行特性、模型或服务档位覆写;issue #39101 的用户是在 Codex 起了原生子代理之后遇到的。去掉该特性后新开线程,或改用本机 codex login(Settings → Providers → Configure manually),或改用 API Key。

为什么会看到「stream disconnected before completion: The ChatGPT user has reached their Subscription Sharing usage limit」?

按 OpenAI 模型与推理文档(2026-11-30 核对),subscription_sharing_usage_limit_exceeded 可能在流建立后通过 response.failed 返回。Codex 会把它不认识的 response.failed 消息拼在 stream disconnected before completion: 后面(openai/codex rust-v0.172.0);Pi 是在 Error: 后面打印原句(openai/codex #51043)。两种写法都是订阅共享限额,不是断网:去 https://chatgpt.com/settings/usage 核对,或改用 API Key。

OpenCode 报「ChatGPT usage limit reached. Check ChatGPT Settings → Usage for details.」怎么处理?

按 anomalyco/opencode v2.4.3(to-session-error.ts)与 issue #62529(2026-11-30 核对),OpenCode 收到 subscription_sharing_usage_limit_exceeded 时显示这句并停止重试。到 https://chatgpt.com/settings/usage 查看应用限额;重新登录是否有用,那条 issue 里的说法不一。想走独立计费路径,可以在 opencode.jsonc 配置自定义 API Key 供应商(见 https://router.one/zh/integrations/opencode )。

ChatGPT 订阅可以用在 API 或第三方应用里吗?

可以用在接入 Sign in with ChatGPT 的第三方应用里,但不能当通用的 OpenAI API Key。按 OpenAI 文档(2026-11-30 核对),开源或本地部署的应用经 OAuth 授权后,可以发符合条件的 POST https://api.openai.com/v1/responses 请求(store: false、stream: true),输入、参数和工具都有限制;常规 API 调用要用单独计费的 API Key。

报错后 OpenAI 会自动切到 API Key 吗?改用 Router One 会扣 ChatGPT 订阅吗?

都不会。按 OpenAI 错误与恢复文档(2026-11-30 核对),"OpenAI does not silently switch the request to another billing path"。用 Router One Key 发往 https://api.router.one/v1 完全不碰 ChatGPT 订阅:计费的请求,套餐覆盖该模型且还有剩余次数时扣套餐次数,否则扣钱包。