Support signing in to subscription-only LLM providers (OpenAI Codex) #5264
Replies: 1 comment
|
Confirmed on the published 0.1.5 RC packages: the built-in Web Models editor exposes Environment
This was an existing Web profile with additional plugins, not an isolated clean-profile reproduction. No dedicated Codex OAuth UI plugin was installed. The versions above are the actual resolved local package versions. Observed steps and failure
The session reports: The failed attempts recorded zero input/output tokens. The error does not direct the user to a supported authorization path. End-to-end validation of the existing backend capabilityA temporary local helper mounted the installed DSH
This supports the missing integration described above; it does not prove long-term token refresh behavior or availability of every model in the selector. User-facing improvementPlease connect the built-in Web settings surface to the authorization flow, with sign-in status and actionable prompts. If OAuth-only providers are intentionally not supported in the shipped profile yet, the editor should explicitly explain that limitation instead of presenting only an API key field and allowing an apparently configured route to fail at first use. No account identifiers, tokens, authorization URLs/codes, private conversation contents, or credential-file contents are included in this report. |
Uh oh!
There was an error while loading. Please reload this page.
English | 中文
llm-pi-aiexposes the installed pi-ai catalog, which includes providers whose only credential is an OAuth grant.openai-codexis the one people ask about: a ChatGPT Plus/Pro subscription has no API key, and a route is configured withapiKeyEnv, so today there is no way to use one.Most of the machinery is already in the repo, which makes this smaller than it sounds:
dsh-authorizationdefines the flow seam (registerFlow/begin/describe/list).packages/llm/llm-pi-ai/src/login.tsalready registers one flow per installed provider that ships a login.modify().Three things are missing:
dsh-authorizationis mounted in no shipped composition. Registration is gated behindctx.inject(['authorization'], …), so in every shipped profile those flows are never registered. The path is dormant rather than broken.LlmConfigurableProviderhas no field naming the credential a sign-in writes, so a configuration surface cannot tell a sign-in-only route from a key-configured one.The benefit is that this is one seam, not one provider. A fact-driven predicate — the catalog entry offers OAuth and offers no API key — covers every OAuth-only provider at once, and it would give
dsh-authorizationits first production consumer; today it has none outside its own tests. Which of those providers to actually offer is a separate policy call, since some vendors' subscription flows authenticate as their own first-party client.I have this working locally against a real Codex subscription (the grant lands as an
llm-pi-ai/openai-codexrecord of kindgrant), so the approach holds up end to end. Happy to share details if that is useful — I understand external PRs are not being accepted right now.中文
English | 中文
llm-pi-ai暴露的是已安装的 pi-ai catalog,其中有一些 provider 唯一的凭据形式是 OAuth grant。大家问得最多的是openai-codex:ChatGPT Plus/Pro 订阅没有 API key,而一条路由是用apiKeyEnv配置的,所以目前无法使用订阅额度。绝大部分机制其实已经在仓库里了,所以这件事比听起来小:
dsh-authorization定义了流程 seam(registerFlow/begin/describe/list)。packages/llm/llm-pi-ai/src/login.ts已经为每个自带登录的已安装 provider 各注册了一条流程。modify()内部完成刷新。缺的是三件事:
dsh-authorization没有被挂载进任何出厂 composition。 注册被ctx.inject(['authorization'], …)门控,因此在所有出厂 profile 里这些流程从未被注册。这条路是休眠,而不是坏了。LlmConfigurableProvider没有字段来命名一次登录所写入的凭据,于是配置界面无法区分"只能登录"的路由和"用 key 配置"的路由。它的收益在于这是一个 seam,而不是一个 provider。一个基于事实的判定——catalog 条目提供 OAuth 且不提供 API key——一次性覆盖所有仅支持 OAuth 的 provider,并且会让
dsh-authorization拥有第一个生产消费者;目前它除了自己的测试之外没有任何消费者。至于其中哪些 provider 真的要开放,是另一个层面的政策判断,因为某些厂商的订阅流程是以其自家第一方客户端的身份进行认证的。我已经在本地用真实的 Codex 订阅把这条路跑通了(grant 会落成一条 kind 为
grant的llm-pi-ai/openai-codex记录),所以这个方案是端到端成立的。如果有帮助,我很乐意提供细节——我知道目前不接受外部 PR。All reactions