Skip to content

[codex] Align JCode OpenAI base URL with Codex config#95

Open
Cloudymap1e wants to merge 2 commits into1jehuang:masterfrom
Cloudymap1e:codex/align-jcode-codex-base-url
Open

[codex] Align JCode OpenAI base URL with Codex config#95
Cloudymap1e wants to merge 2 commits into1jehuang:masterfrom
Cloudymap1e:codex/align-jcode-codex-base-url

Conversation

@Cloudymap1e
Copy link
Copy Markdown

@Cloudymap1e Cloudymap1e commented May 2, 2026

Summary

  • read the active Codex CLI model_provider from ~/.codex/config.toml
  • when that provider uses wire_api = "responses" and requires_openai_auth = true, route JCode OpenAI Responses traffic to its base_url
  • apply the same base URL override to sidecar OpenAI calls
  • add regression coverage for config parsing and response URL selection
  • keep session reasoning_effort persisted so overnight session cloning compiles with the existing field usage
  • update OpenRouter test constructors for existing provider fields

Why

JCode could trust Codex auth, but its OpenAI provider still hard-coded OpenAI/ChatGPT base URLs. If Codex was configured to use a Responses-compatible gateway, JCode would send the stale API key to the wrong endpoint and fail with invalid key errors.

Impact

This enables JCode to reuse any active Codex-configured HTTP(S) Responses-compatible base URL that explicitly requires OpenAI auth. It does not treat arbitrary chat-completions providers as OpenAI Responses endpoints.

Validation

  • cargo test configured_responses_base_url
  • cargo test responses_url_uses_active_codex_provider_base_url

View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

@Cloudymap1e Cloudymap1e marked this pull request as ready for review May 2, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant