feat: add Codex CLI provider with local login (WIP) #8050
Closed
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.
Description
This PR attempts to address Issue #8049 by adding a new Codex CLI provider that works like OpenAI but uses local login instead of API keys.
Current Implementation
✅ Added 'codex-cli' to provider types and schemas
✅ Created CodexCliHandler that extends OpenAI behavior with local auth
✅ Created UI component with sign in/out functionality
✅ Added support for the same models as OpenAI
✅ No API key management required - uses local session tokens
Status: Work in Progress
This implementation currently uses placeholder/mock authentication to demonstrate the UI flow. As noted in the issue comments, I need clarification on:
Related Issue
Closes #8049 (pending completion of actual CLI integration)
Testing
The basic structure compiles and passes type checks. Full testing will be added once the authentication implementation is finalized.
Next Steps
Awaiting feedback on the implementation questions posted in the issue before completing the actual CLI integration.
Note: This is a work-in-progress PR to share the current implementation structure. The authentication functionality uses mock implementations pending clarification of requirements.
Important
Introduces Codex CLI provider for local authentication, mimicking OpenAI, with UI and model support, but currently uses mock authentication.
CodexCliHandlerinsrc/api/providers/codex-cli.tsfor local CLI authentication, mimicking OpenAI behavior.codex-cli.ts.CodexCliinCodexCli.tsxfor sign in/out functionality.codexCliSchematoprovider-settings.tsfor provider settings.codexCliModelsincodex-cli.tswith model details.CodexCliHandlerinindex.tsandproviders/index.ts.useSelectedModel.tsto handle Codex CLI models.codex-clitoproviderNamesinprovider-settings.ts.CodexCli.tsxfor UI demonstration.This description was created by
for f12dcf9. You can customize this summary. It will automatically update as commits are pushed.