feat(auth): OpenAI Codex Responses transport + OAuth login (PR-B4) - #24
Merged
Conversation
Hand-roll an AOT-safe Codex Responses IChatClient over the ChatGPT backend with SSE streaming, function_call mapping, usage, and reasoning effort. Route kind: openai-codex-responses through the provider factory and options validator. Add OpenAiCodexOAuthFlow (PKCE + loopback/paste fallback) for ChatGPT Plus/Pro, extract chatgpt_account_id from the access JWT, wire winharness login --provider openai, seed a static Codex model catalog, and store tokens under WinHarness:oauth:openai. Cover the Responses client and OAuth helpers with unit/integration tests; mark PR-B4 done in the pi-parity roadmap.
Harden OAuth refresh/provider-id handling, tighten Responses client behavior, and update docs/tests.
perezdap
force-pushed
the
feat/b4-openai-codex-responses
branch
from
July 12, 2026 23:30
88e8c46 to
8281b99
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IChatClient(chatgpt.com/backend-api/codex/responses) with SSE streaming, function_call/function_call_output, usage, and reasoning effortkind: openai-codex-responses+ options validator supportOpenAiCodexOAuthFlowPKCE login (winharness login --provider openai) with JWTchatgpt_account_idextraction, loopback/paste fallback, static Codex catalog seed, and required request headers (originator,chatgpt-account-id,OpenAI-Beta)Context
Track B finish line. Stacked on PR-B3 (Anthropic). Same ToS/breakage posture as ADR-0005.
Test plan
dotnet build -c Releasecleanwinharness login --provider openaiagainst ChatGPT Plus/Pro (manual)Usage