Skip to content

Add Codex OAuth LLM provider#401

Open
BBossss wants to merge 1 commit intoOpen-Less:betafrom
BBossss:beta
Open

Add Codex OAuth LLM provider#401
BBossss wants to merge 1 commit intoOpen-Less:betafrom
BBossss:beta

Conversation

@BBossss
Copy link
Copy Markdown

@BBossss BBossss commented May 10, 2026

User description

Summary

  • add Codex OAuth as an LLM provider backed by the local Codex auth file
  • route polish, translation, QA, validation, and model listing through the Codex provider when selected
  • keep Gemini provider support from latest beta and preserve loopback proxy bypass for local provider checks
  • switch Volcengine default resource to the duration-priced BigASR resource

Verification

  • npm run build
  • cargo test --manifest-path src-tauri/Cargo.toml --lib

Notes

  • origin is read-only for the current GitHub user, so this PR is opened from BBossss/openless:beta.

PR Type

Enhancement, Bug fix, Tests


Description

  • Add Codex OAuth provider support

    • Uses local ~/.codex/auth.json
    • Streams Codex Responses SSE
  • Route LLM actions through active provider

    • Covers polish, translation, and QA
    • Keeps OpenAI-compatible fallback path
  • Update provider UI and locales

    • Adds Codex preset and notice
    • Hides API key fields
  • Fix defaults, proxy handling, and tests

    • Switches Volcengine to BigASR
    • Adds Codex auth and stream tests

Diagram Walkthrough

flowchart LR
  UI["Settings UI"] -- "select Codex OAuth" --> Coord["Coordinator"]
  Coord -- "build active provider" --> Codex["Codex OAuth provider"]
  Codex -- "reads local auth.json" --> Auth["Codex auth file"]
  Codex -- "calls Responses SSE" --> API["Codex Responses API"]
  Coord -- "fallback" --> OpenAI["OpenAI-compatible provider"]
Loading

File Walkthrough

Relevant files
Formatting
3 files
download.rs
Reformat partial size parsing branch                                         
+3/-1     
whisper.rs
Reformat Whisper constructor and tests                                     
+5/-7     
persistence.rs
Reformat history retention calculation                                     
+1/-2     
Bug fix
1 files
volcengine.rs
Switch default Volcengine resource ID                                       
+2/-2     
Enhancement
5 files
commands.rs
Add Codex-aware provider commands                                               
+66/-11 
coordinator.rs
Route active polishing through provider                                   
+30/-36 
polish.rs
Implement Codex OAuth LLM client                                                 
+960/-3 
Overview.tsx
Map Codex provider to localized name                                         
+1/-0     
Settings.tsx
Add Codex OAuth preset to settings                                             
+19/-4   
Documentation
5 files
en.ts
Add Codex OAuth provider translation                                         
+2/-0     
ja.ts
Add Codex OAuth provider translation                                         
+2/-0     
ko.ts
Add Codex OAuth provider translation                                         
+2/-0     
zh-CN.ts
Add Codex OAuth provider translation                                         
+2/-0     
zh-TW.ts
Add Codex OAuth provider translation                                         
+2/-0     
Dependencies
1 files
Cargo.toml
Enable reqwest system proxy support                                           
+1/-1     

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 10, 2026

PR Reviewer Guide 🔍

(Review updated until commit 8391e56)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

BBossss added a commit to BBossss/openless that referenced this pull request May 10, 2026
Codex OAuth polishing should use the lighter Spark default for short dictation cleanup, and Windows builds need to locate Codex auth when HOME is absent in GUI sessions. This keeps the PR provider usable without requiring users to hand-copy auth files or choose a heavier model first.

Constraint: PR Open-Less#401 targets a forked beta branch and must append to the existing pull request.

Rejected: Keep gpt-5.5 as the default | it is overpowered for polishing and was observed timing out in the app.

Rejected: Use only HOME for Codex auth lookup | Windows GUI environments commonly expose USERPROFILE instead.

Confidence: high

Scope-risk: narrow

Directive: Keep Codex OAuth defaults optimized for short low-latency dictation polishing unless product requirements change.

Tested: cargo test --manifest-path src-tauri/Cargo.toml --lib

Tested: npm run build

Tested: git diff --check

Co-authored-by: OmX <omx@oh-my-codex.dev>
@github-actions
Copy link
Copy Markdown

Persistent review updated to latest commit 33f59c1

@BBossss BBossss marked this pull request as ready for review May 10, 2026 13:07
@BBossss
Copy link
Copy Markdown
Author

BBossss commented May 10, 2026

/review

@github-actions
Copy link
Copy Markdown

Persistent review updated to latest commit 963e906

Codex OAuth should let users spend their existing Codex subscription on short dictation polish, translation, and QA without storing another API key in OpenLess. The provider reads the local Codex auth file, keeps OpenAI-compatible providers on their existing path, uses a lighter Spark default for latency, and broadens Codex auth discovery for Windows GUI environments.

The same change keeps Volcengine on the duration-priced BigASR resource validated locally and preserves proxy behavior so Codex network paths can use system proxy settings while loopback/local provider checks avoid the proxy.

Constraint: Codex OAuth credentials must remain sourced from the Codex auth file and must not be copied into OpenLess credential storage.

Constraint: PR Open-Less#401 is a fork PR from BBossss/openless:beta to appergb/openless:beta.

Rejected: Require a separate OpenAI API key | the requested path was to reuse the existing Codex subscription.

Rejected: Keep gpt-5.5 as the default | it is unnecessarily heavy for short dictation polish and was observed timing out.

Rejected: Use only HOME for Codex auth lookup | Windows GUI sessions commonly expose USERPROFILE instead.

Confidence: high

Scope-risk: moderate

Reversibility: clean

Directive: Do not persist Codex OAuth tokens into OpenLess credentials; keep using the Codex auth file as the source of truth.

Directive: Keep Codex OAuth defaults optimized for short low-latency dictation polishing unless product requirements change.

Tested: git diff --cached --check

Tested: cargo test --manifest-path src-tauri/Cargo.toml --lib

Tested: npm run build

Tested: PR Open-Less#401 CI passed on Windows, macOS, and Linux before this history-only squash.

Co-authored-by: OmX <omx@oh-my-codex.dev>
@github-actions
Copy link
Copy Markdown

Persistent review updated to latest commit 8391e56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant