Skip to content

fix(codex): run newly available models through the existing Codex account - #127322

Merged
pash-openai merged 1 commit into
mainfrom
pash/codex-native-unlisted-models
Aug 21, 2026
Merged

pash-openai merged 1 commit into
mainfrom
pash/codex-native-unlisted-models

Conversation

@pash-openai

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users explicitly choosing the Codex runtime cannot use a newly available first-party model until the OpenClaw catalog learns its route, even though their Codex account already supports it.

Why This Change Was Made

The Codex app-server owns its model discovery and authentication. Let its explicitly selected native runtime resolve an unobserved first-party model only when there is no authored endpoint, transport override, forwarded credential, or conflicting provider policy. Automatic runtime selection and existing security boundaries remain unchanged.

User Impact

Newly available Codex models work immediately with an already authenticated native account instead of failing or silently falling back to an older model.

Evidence

280 focused tests pass across Codex harness selection, provider routing, and authentication planning, including explicit coverage for authored endpoints, owner-selected credentials, and automatic selection. Verified the upstream model/list and thread/start contracts in codex-rs/app-server-protocol/src/protocol/v2/model.rs and codex-rs/app-server-protocol/src/protocol/v2/thread.rs.

@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@pash-openai
pash-openai marked this pull request as ready for review August 21, 2026 17:48
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-21T17:52:08.756708Z 91b08ee Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 91b08ee4df

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +216 to +217
ctx.modelProvider?.api === undefined &&
ctx.modelProvider?.baseUrl === undefined &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Make the native-account exception reachable

When an explicit Codex run reaches the production selection boundary, buildHarnessModelProvider always sets modelProvider.api and modelProvider.baseUrl from the required Model fields (src/agents/embedded-agent-runner/run/model-harness.ts:74-76, packages/llm-core/src/types.ts:657-663), even when neither value was authored by the operator. Requiring both fields to be undefined therefore makes this exception unreachable: pre-auth selection lacks preparedAuth, finalized selection retains api/baseUrl, and the model is still rejected as having undeclared route compatibility. The new direct supports() test passes only by constructing a context production cannot produce; carry an authored-route fact from the owning producer instead.

AGENTS.md reference: AGENTS.md:L47-L47

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant