Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Sep 24, 2025

Closes #8049


Important

Add OpenAI Codex provider with new models and UI support, including localization updates.

  • Behavior:
    • Adds openai-native-codex provider to provider-settings.ts with new models gpt-5, gpt-5-codex, and codex-mini-latest.
    • Introduces openAiNativeCodexSchema for OAuth path configuration.
    • Implements OpenAiNativeCodexHandler in openai-native-codex.ts for API interactions.
  • UI Components:
    • Adds OpenAiNativeCodex component in OpenAiNativeCodex.tsx for UI settings.
    • Updates ApiOptions.tsx to include openai-native-codex settings.
  • Localization:
    • Updates localization files for multiple languages to include openai-native-codex related strings.
  • Misc:
    • Exports openai-codex.js in providers/index.ts.
    • Adds error handling and messages for OAuth in common.json across various locales.

This description was created by Ellipsis for bf0908d. You can customize this summary. It will automatically update as commits are pushed.

Copilot AI review requested due to automatic review settings September 24, 2025 07:04
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. documentation Improvements or additions to documentation labels Sep 24, 2025
@hannesrudolph hannesrudolph changed the title feat(codex): align validation with optional auth.json path; docs mapping; SSE parser cleanup OpenAI Codex provider Sep 24, 2025
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 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.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 24, 2025
@hannesrudolph hannesrudolph moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Sep 24, 2025
roomote[bot]

This comment was marked as outdated.

@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Sep 24, 2025
@RayBytes
Copy link

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.

@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Draft / In Progress] in Roo Code Roadmap Sep 25, 2025
@daniel-lxs daniel-lxs marked this pull request as draft September 25, 2025 20:17
…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)
@hannesrudolph hannesrudolph force-pushed the feat/openai-native-codex-polish branch from eacb436 to 4ba05da Compare September 25, 2025 22:31
…used const, strengthen typing for message transform and auth.json parsing, extract helpers for testability
@hannesrudolph
Copy link
Collaborator Author

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
@vercel
Copy link

vercel bot commented Sep 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
roo-code-website Error Error Sep 26, 2025 6:03am

…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.
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 26, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 27, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Sep 27, 2025
@hannesrudolph hannesrudolph reopened this Sep 27, 2025
@github-project-automation github-project-automation bot moved this from Done to New in Roo Code Roadmap Sep 27, 2025
@github-project-automation github-project-automation bot moved this from Done to Triage in Roo Code Roadmap Sep 27, 2025
@hannesrudolph
Copy link
Collaborator Author

@roomote-agent convert this to draft.

@hannesrudolph hannesrudolph moved this from Triage to PR [Draft / In Progress] in Roo Code Roadmap Sep 27, 2025
@hannesrudolph hannesrudolph added Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. and removed PR - Needs Preliminary Review labels Sep 27, 2025
"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.",
Copy link
Contributor

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".

Suggested change
"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",
Copy link
Contributor

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.

Suggested change
"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."
Copy link
Contributor

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".

Suggested change
"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."

@roomote
Copy link
Contributor

roomote bot commented Sep 27, 2025

Acknowledged. Converting this pull request to draft now.

@roomote roomote bot marked this pull request as draft September 27, 2025 18:34
@roomote
Copy link
Contributor

roomote bot commented Sep 27, 2025

Converted this pull request to draft as requested. No code changes were made; status now reflects "draft".

@hannesrudolph hannesrudolph added PR - Draft / In Progress and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Sep 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request lgtm This PR has been approved by a maintainer PR - Draft / In Progress size:XL This PR changes 500-999 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Status: PR [Draft / In Progress]

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Codex CLI provider with local login (no API key)

5 participants