Skip to content

feat: codex subscription support#6600

Merged
michaelneale merged 14 commits intomainfrom
micn/codex-subscription
Jan 23, 2026
Merged

feat: codex subscription support#6600
michaelneale merged 14 commits intomainfrom
micn/codex-subscription

Conversation

@michaelneale
Copy link
Collaborator

@michaelneale michaelneale commented Jan 21, 2026

This lets goose work with codex subscriptions:

image Screenshot 2026-01-22 at 1 52 01 pm

Will use system browser to auth to use the subscription:

image

@michaelneale michaelneale marked this pull request as ready for review January 21, 2026 02:58
Copilot AI review requested due to automatic review settings January 21, 2026 02:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for ChatGPT Codex subscriptions (ie. ChatGPT Plus/Pro) through OAuth authentication, allowing users to access GPT-5 Codex models using their existing ChatGPT subscription.

Changes:

  • New ChatGptCodexProvider with OAuth PKCE flow implementation for authentication
  • Backend API endpoint /config/providers/{name}/oauth for triggering OAuth flows
  • UI updates to support OAuth provider configuration with a sign-in button instead of manual API key entry

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
crates/goose/src/providers/chatgpt_codex.rs Complete new provider implementation with OAuth PKCE flow, token management, and Codex API integration
crates/goose/src/providers/mod.rs Added chatgpt_codex module export
crates/goose/src/providers/factory.rs Registered ChatGptCodexProvider in the provider registry
crates/goose-server/src/routes/config_management.rs Added configure_provider_oauth endpoint to trigger OAuth flows
crates/goose-server/src/openapi.rs Added configure_provider_oauth to OpenAPI documentation
ui/desktop/openapi.json Auto-generated OpenAPI schema for the new OAuth endpoint
ui/desktop/src/api/types.gen.ts Auto-generated TypeScript types for OAuth endpoint
ui/desktop/src/api/sdk.gen.ts Auto-generated SDK function for OAuth endpoint
ui/desktop/src/api/index.ts Auto-generated exports for OAuth endpoint
ui/desktop/src/components/settings/providers/modal/ProviderConfiguationModal.tsx Added OAuth flow UI with sign-in button and loading states

* main:
  increase worker threads for ci (#6614)
  docs: todo tutorial update (#6613)
  Added goose doc map md file for goose agent to find relevant doc easily. (#6598)
  add back goose branding to home (#6617)
  fix: actually set the working dir for extensions from session (#6612)
  Multi chat (#6428)
  Lifei/fixed accumulated token count (#6587)
  Dont show MCP UI/Apps until tool is approved (#6492)
Copilot AI review requested due to automatic review settings January 21, 2026 23:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 12 comments.

* main:
  chore: tweak release docs (#6571)
  fix(goose): propagate session_id across providers and MCP (#6584)
Copilot AI review requested due to automatic review settings January 22, 2026 02:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

@codefromthecrypt
Copy link
Collaborator

just to ack.. I am on this one

Signed-off-by: Adrian Cole <[email protected]>
Copilot AI review requested due to automatic review settings January 22, 2026 06:18
@codefromthecrypt
Copy link
Collaborator

pushed some cleanups e.g. that singleton stuff feels more like sessionmanager and permissions manager

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 12 comments.

Signed-off-by: Adrian Cole <[email protected]>
Copy link
Collaborator

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've looked at the code and tidied up certain things that stood out. If this works for you after my changes, mergeroo

@codefromthecrypt
Copy link
Collaborator

p.s. I did actually use it too, so wasn't just running the tests. nice work!

Screenshot 2026-01-22 at 6 44 59 PM Screenshot 2026-01-22 at 6 45 12 PM Screenshot 2026-01-22 at 6 45 30 PM

Copilot AI review requested due to automatic review settings January 23, 2026 03:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 25 changed files in this pull request and generated 4 comments.

Comment on lines +1 to +2
export default function ChatGPT({ className = '' }) {
return (
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ChatGPT component props are implicitly any, which will fail TypeScript compilation with noImplicitAny: true; type the props (e.g., { className?: string } or React.SVGProps<SVGSVGElement>) and pass through to the <svg>.

Copilot uses AI. Check for mistakes.
Comment on lines +81 to +83
await configureProviderOauth({
path: { name: provider.name },
});
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handleOAuthLogin calls configureProviderOauth without throwOnError: true (and without checking the returned { error }), so a 400 response will be treated as success and the modal will close; pass throwOnError: true or explicitly handle the returned error/result before continuing.

Suggested change
await configureProviderOauth({
path: { name: provider.name },
});
const result = await configureProviderOauth({
path: { name: provider.name },
});
if (result && 'error' in result && result.error) {
setError(
`OAuth login failed: ${formatErrorMessage(
(result as { error: unknown }).error
)}`
);
return;
}

Copilot uses AI. Check for mistakes.
Comment on lines +262 to +266
{isConfigured && (
<Button variant="destructive" onClick={handleDelete}>
Remove Configuration
</Button>
)}
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For OAuth providers, removing configuration here only deletes the provider’s config keys, but the backend marks OAuth configuration via a separate "{provider}_configured" flag (see check_provider_configured), so the provider may remain "configured" after removal; also clear that marker when removing OAuth configuration.

Copilot uses AI. Check for mistakes.
@michaelneale michaelneale merged commit e78a1e7 into main Jan 23, 2026
19 checks passed
@michaelneale michaelneale deleted the micn/codex-subscription branch January 23, 2026 06:12
fbalicchia pushed a commit to fbalicchia/goose that referenced this pull request Jan 23, 2026
Signed-off-by: Adrian Cole <[email protected]>
Co-authored-by: Adrian Cole <[email protected]>
Signed-off-by: fbalicchia <[email protected]>
tlongwell-block added a commit that referenced this pull request Jan 23, 2026
* origin/main:
  Fix GCP Vertex AI global endpoint support for Gemini 3 models (#6187)
  fix: macOS keychain infinite prompt loop    (#6620)
  chore: reduce duplicate or unused cargo deps (#6630)
  feat: codex subscription support (#6600)
  smoke test allow pass for flaky providers (#6638)
  feat: Add built-in skill for goose documentation reference (#6534)
  Native images (#6619)
  docs: ml-based prompt injection detection (#6627)
  Strip the audience for compacting (#6646)
  chore(release): release version 1.21.0 (minor) (#6634)
  add collapsable chat nav (#6649)
  fix: capitalize Rust in CONTRIBUTING.md (#6640)
  chore(deps): bump lodash from 4.17.21 to 4.17.23 in /ui/desktop (#6623)
  Vibe mcp apps (#6569)
  Add session forking capability (#5882)
  chore(deps): bump lodash from 4.17.21 to 4.17.23 in /documentation (#6624)
  fix(docs): use named import for globby v13 (#6639)
  PR Code Review (#6043)
  fix(docs): use dynamic import for globby ESM module (#6636)

# Conflicts:
#	Cargo.lock
#	crates/goose-server/src/routes/session.rs
katzdave added a commit that referenced this pull request Jan 26, 2026
…o dkatz/canonical-context

* 'dkatz/canonical-provider' of github.com:block/goose: (27 commits)
  docs: add Remotion video creation tutorial (#6675)
  docs: export recipe and copy yaml (#6680)
  Test against fastmcp (#6666)
  docs: mid-session changes (#6672)
  Fix MCP elicitation deadlock and improve UX (#6650)
  chore: upgrade to rmcp 0.14.0 (#6674)
  [docs] add MCP-UI to MCP Apps blog (#6664)
  ACP get working dir from args.cwd (#6653)
  Optimise load config in UI (#6662)
  Fix GCP Vertex AI global endpoint support for Gemini 3 models (#6187)
  fix: macOS keychain infinite prompt loop    (#6620)
  chore: reduce duplicate or unused cargo deps (#6630)
  feat: codex subscription support (#6600)
  smoke test allow pass for flaky providers (#6638)
  feat: Add built-in skill for goose documentation reference (#6534)
  Native images (#6619)
  docs: ml-based prompt injection detection (#6627)
  Strip the audience for compacting (#6646)
  chore(release): release version 1.21.0 (minor) (#6634)
  add collapsable chat nav (#6649)
  ...
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.

2 participants