Repository navigation
Add experimental ChatGPT OAuth login for OpenAI - #1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a66a98178d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| continue | ||
| } | ||
| if b.Kind == BlockText && b.Text != "" { | ||
| appendJSON(map[string]any{"role": "assistant", "content": []map[string]string{{"type": "output_text", "text": b.Text}}}) |
There was a problem hiding this comment.
Preserve Responses assistant output items
For any OpenAI follow-up after a normal assistant text turn, this serializes prior assistant text as an easy input message containing output_text. The Responses input schema treats output_text as part of prior response.output message items, while easy input messages use input content; because parseOAIResponse discards the raw message item, the next request can be rejected or lose fields such as id/phase that must be replayed for multi-turn state. Preserve the raw message output item and replay it like the reasoning/function-call items instead.
Useful? React with 👍 / 👎.
- Revert the synthetic assistant-text fallback in oaiResponseInput to output_text (d282f95 had switched it to input_text): the Responses API rejects input_text under the assistant role, and the only history that takes this path is the locally-built /compact ack, which live testing did not exercise. Added TestOpenAIReplaysSyntheticAssistantText and a ROADMAP live-check item to re-confirm on the Codex backend. - Wire Options.OpenAIAuth only for the ChatGPT credential: API keys are static, so the post-401 refresh retry was a wasted duplicate request (and the adapter comment promised API-key callers never take it). - Surface the real error when a ChatGPT token refresh fails at startup instead of the misleading "no credentials" message. - Note the cross-process refresh-token rotation limit on chatGPTCredential.Token. - Fix the broken sentence in the CLI usage text. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Mergiata in main (a112090) con alcuni follow-up dalla review — uno merita la tua attenzione: Revert Altri follow-up minori (dettagli nel commit):
Restano nel ROADMAP come live-check da fare con credenziali reali: Bel lavoro sulla parte OAuth: PKCE + state su listener loopback, salvataggio atomico del config e pulizia della history al cambio di sign-in sono tutti dettagli giusti. |
Experimental ChatGPT login for OpenAI
Adds an experimental OAuth login option for ChatGPT Plus/Pro subscribers, while preserving API-key authentication.
The ChatGPT path remains experimental because OpenAI does not publish a third-party OAuth contract.