Skip to content

feat(auth): OpenAI Codex Responses transport + OAuth login (PR-B4) - #24

Merged
perezdap merged 2 commits into
mainfrom
feat/b4-openai-codex-responses
Jul 12, 2026
Merged

feat(auth): OpenAI Codex Responses transport + OAuth login (PR-B4)#24
perezdap merged 2 commits into
mainfrom
feat/b4-openai-codex-responses

Conversation

@perezdap

Copy link
Copy Markdown
Owner

Summary

  • Hand-rolled AOT-safe OpenAI Codex Responses IChatClient (chatgpt.com/backend-api/codex/responses) with SSE streaming, function_call/function_call_output, usage, and reasoning effort
  • Factory routing for kind: openai-codex-responses + options validator support
  • OpenAiCodexOAuthFlow PKCE login (winharness login --provider openai) with JWT chatgpt_account_id extraction, loopback/paste fallback, static Codex catalog seed, and required request headers (originator, chatgpt-account-id, OpenAI-Beta)
  • Unit + integration tests; pi-parity roadmap marks PR-B4 done

Context

Track B finish line. Stacked on PR-B3 (Anthropic). Same ToS/breakage posture as ADR-0005.

Test plan

  • dotnet build -c Release clean
  • unit tests green (Codex OAuth helpers)
  • integration tests green (Responses SSE text/tools, factory/validator)
  • live winharness login --provider openai against ChatGPT Plus/Pro (manual)

Usage

winharness login --provider openai
winharness models use gpt-5.4 --provider-id openai
winharness chat

perezdap added 2 commits July 12, 2026 18:24
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
perezdap force-pushed the feat/b4-openai-codex-responses branch from 88e8c46 to 8281b99 Compare July 12, 2026 23:30
@perezdap
perezdap merged commit 87f6d5c into main Jul 12, 2026
1 check passed
@perezdap
perezdap deleted the feat/b4-openai-codex-responses branch July 12, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant