-
Notifications
You must be signed in to change notification settings - Fork 2.6k
OpenAI Codex provider #8281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
OpenAI Codex provider #8281
Conversation
There was a problem hiding this 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 a new OpenAI Codex provider variant that uses ChatGPT web credentials instead of API keys. The implementation includes UI components, validation, and backend provider logic for the openai-native-codex provider.
Key Changes:
- Added new OpenAI Native Codex provider using local auth.json credentials
- Added UI components and validation for the optional OAuth credentials path
- Integrated the provider into settings, model selection, and request routing logic
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/api/providers/openai-native-codex.ts | New provider implementation with auth.json credentials and Codex API integration |
| packages/types/src/providers/openai-codex.ts | Type definitions for Codex models (gpt-5, gpt-5-codex) |
| webview-ui/src/components/settings/providers/OpenAiNativeCodex.tsx | React component for Codex provider settings UI |
| webview-ui/src/i18n/locales/en/settings.json | Added validation text for optional auth path |
| webview-ui/src/components/settings/ApiOptions.tsx | Added provider URL mapping and settings integration |
| Multiple configuration files | Updated provider registrations, model mappings, and type definitions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
I saw that the model codex-mini-latest is missing here, might also want to add it as a option to be used if people wish too, its a tuned version of o4-mini iirc. |
…ing; SSE parser cleanup - Validation text for OpenAiNativeCodex auth path now reflects optional with default to ~/.codex/auth.json - Provider Documentation link: map openai-native-codex -> openai to avoid 404 - Remove unused hasContent in SSE parser to satisfy lint - Verified: cd src && npx vitest run (all tests passed)
eacb436 to
4ba05da
Compare
…used const, strengthen typing for message transform and auth.json parsing, extract helpers for testability
|
Addressed @daniel-lxs suggestions focused on typing and structure:
If desired, unit specs can be added to cover buildCodexInput and id_token parsing in this PR. |
…e guard, remove previous_response_id, avoid as-any reasoning mutation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…or Codex - Added error message for oversized OAuth credential files in multiple languages (German, Spanish, French, Hindi, Indonesian, Italian, Japanese, Korean, Dutch, Polish, Portuguese, Russian, Turkish, Vietnamese, Chinese Simplified, Chinese Traditional). - Updated settings localization to include OAuth credential path descriptions and related information for Codex in multiple languages.
|
@roomote-agent convert this to draft. |
| "authenticationRequired": "El proveedor Roo requiere autenticación en la nube. Por favor, inicia sesión en Roo Code Cloud." | ||
| }, | ||
| "openaiNativeCodex": { | ||
| "oauthReadFailed": "Error al cargar las credenciales OAuth de ChatGPT en {{path}}: {{error}}. Consejo: auténticate con la CLI de Codex (ej., \"codex login\") para crear auth.json.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: In the message for "oauthReadFailed", "auténticate" should be corrected to "autentícate".
| "oauthReadFailed": "Error al cargar las credenciales OAuth de ChatGPT en {{path}}: {{error}}. Consejo: auténticate con la CLI de Codex (ej., \"codex login\") para crear auth.json.", | |
| "oauthReadFailed": "Error al cargar las credenciales OAuth de ChatGPT en {{path}}: {{error}}. Consejo: autentícate con la CLI de Codex (ej., \"codex login\") para crear auth.json.", |
| "oauthFileTooLarge": "Arquivo de credenciais OAuth em {{path}} é muito grande ({{size}} bytes). O máximo permitido é {{max}} bytes.", | ||
| "missingAccessToken": "Credenciais OAuth do ChatGPT estão faltando tokens.access_token.", | ||
| "httpError": "Codex HTTP {{status}} (req: {{requestId}}) model={{modelId}}: {{message}}", | ||
| "noResponseBody": "Erro de respostas do ChatGPT: Sem corpo de resposta", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor lexical note: In the string "Erro de respostas do ChatGPT: Sem corpo de resposta", the phrase "respostas" may sound odd. Consider revising it to "Erro de resposta do ChatGPT" or "Erro na resposta do ChatGPT" for clarity.
| "noResponseBody": "Erro de respostas do ChatGPT: Sem corpo de resposta", | |
| "noResponseBody": "Erro de resposta do ChatGPT: Sem corpo de resposta", |
| "profileInvalid": "Este perfil contiene un proveedor o modelo que no está permitido por su organización", | ||
| "qwenCodeOauthPath": "Debes proporcionar una ruta válida de credenciales OAuth" | ||
| "qwenCodeOauthPath": "Debes proporcionar una ruta válida de credenciales OAuth", | ||
| "openAiNativeCodexOauthPath": "Opcional: Ruta al auth.json de ChatGPT Codex. Cuando esté vacío, por defecto es ~/.codex/auth.json." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: In the message for "openAiNativeCodexOauthPath", the adjective "vacío" should be "vacía" to agree with the feminine noun "ruta".
| "openAiNativeCodexOauthPath": "Opcional: Ruta al auth.json de ChatGPT Codex. Cuando esté vacío, por defecto es ~/.codex/auth.json." | |
| "openAiNativeCodexOauthPath": "Opcional: Ruta al auth.json de ChatGPT Codex. Cuando esté vacía, por defecto es ~/.codex/auth.json." |
|
Acknowledged. Converting this pull request to draft now. |
|
Converted this pull request to draft as requested. No code changes were made; status now reflects "draft". |
Closes #8049
Important
Add OpenAI Codex provider with new models and UI support, including localization updates.
openai-native-codexprovider toprovider-settings.tswith new modelsgpt-5,gpt-5-codex, andcodex-mini-latest.openAiNativeCodexSchemafor OAuth path configuration.OpenAiNativeCodexHandlerinopenai-native-codex.tsfor API interactions.OpenAiNativeCodexcomponent inOpenAiNativeCodex.tsxfor UI settings.ApiOptions.tsxto includeopenai-native-codexsettings.openai-native-codexrelated strings.openai-codex.jsinproviders/index.ts.common.jsonacross various locales.This description was created by
for bf0908d. You can customize this summary. It will automatically update as commits are pushed.