Conversation
There was a problem hiding this comment.
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
ChatGptCodexProviderwith OAuth PKCE flow implementation for authentication - Backend API endpoint
/config/providers/{name}/oauthfor 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 |
ui/desktop/src/components/settings/providers/modal/ProviderConfiguationModal.tsx
Outdated
Show resolved
Hide resolved
* 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)
|
just to ack.. I am on this one |
Signed-off-by: Adrian Cole <[email protected]>
|
pushed some cleanups e.g. that singleton stuff feels more like sessionmanager and permissions manager |
ui/desktop/src/components/settings/providers/modal/ProviderConfiguationModal.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Adrian Cole <[email protected]>
codefromthecrypt
left a comment
There was a problem hiding this comment.
I've looked at the code and tidied up certain things that stood out. If this works for you after my changes, mergeroo
| export default function ChatGPT({ className = '' }) { | ||
| return ( |
There was a problem hiding this comment.
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>.
| await configureProviderOauth({ | ||
| path: { name: provider.name }, | ||
| }); |
There was a problem hiding this comment.
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.
| 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; | |
| } |
| {isConfigured && ( | ||
| <Button variant="destructive" onClick={handleDelete}> | ||
| Remove Configuration | ||
| </Button> | ||
| )} |
There was a problem hiding this comment.
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.
Signed-off-by: Adrian Cole <[email protected]> Co-authored-by: Adrian Cole <[email protected]> Signed-off-by: fbalicchia <[email protected]>
* 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
…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) ...



This lets goose work with codex subscriptions:
Will use system browser to auth to use the subscription: