Skip to content

Conversation

@aibrahim-oai
Copy link
Collaborator

External (non-OpenAI) Pull Request Requirements

Before opening this Pull Request, please read the dedicated "Contributing" markdown file or your PR may be closed:
https://github.com/openai/codex/blob/main/docs/contributing.md

If your PR conforms to our contribution guidelines, replace this text with a detailed and high quality description of your changes.

Include a link to a bug report or enhancement request.

Copy link
Contributor

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

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.

ℹ️ 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 57 to 60
/// Refresh remote models and emit AppReady once the list is available.
RemoteModels,
/// Refresh remote models and emit AppReady once the list is available.
RemoteModels,
Copy link
Contributor

Choose a reason for hiding this comment

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

P0 Badge Remove duplicate RemoteModels variant

The Feature enum defines RemoteModels twice in a row. Rust enums cannot contain two variants with the same name, so this crate will not compile in its current form until one of these entries is removed.

Useful? React with 👍 / 👎.

Comment on lines 66 to 68
let response = client
.list_models(env!("CARGO_PKG_VERSION"), HeaderMap::new())
.list_models("99.99.99", HeaderMap::new())
.await
Copy link
Contributor

Choose a reason for hiding this comment

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

P1 Badge Use real client version when listing models

refresh_available_models now calls list_models with a hard-coded version string "99.99.99" instead of the actual package version. When the server filters models by minimum client version, this misreports the client as much newer, so incompatible models may be returned (or telemetry becomes inaccurate) even though the client code has not been upgraded.

Useful? React with 👍 / 👎.

@aibrahim-oai aibrahim-oai changed the title progress Add remote models feature flag Dec 5, 2025
@aibrahim-oai
Copy link
Collaborator Author

@codex review this


/// Persist the event to rollout and send it to clients.
pub(crate) async fn send_event(&self, turn_context: &TurnContext, msg: EventMsg) {
pub(crate) async fn send_event(&self, sub_id: &str, msg: EventMsg) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this was intentionally taking turn_context: &TurnContext to later be able to emit events with turn_id, in addition to submtion id. Is this change necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no old changes polluted that

Copy link
Contributor

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

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.

ℹ️ 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 49 to 51
let response = client
.list_models(env!("CARGO_PKG_VERSION"), HeaderMap::new())
.list_models("99.99.99", HeaderMap::new())
.await
Copy link
Contributor

Choose a reason for hiding this comment

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

P2 Badge Misreports client version when fetching remote models

The new RemoteModels refresh hard-codes the client version as "99.99.99" when calling list_models, whereas before it sent the actual build version. This tells the server we support the latest capabilities, so it will return models whose minimal_client_version might exceed what this client actually implements. With the flag enabled we cache that list and promote the highest-priority model to default, which can expose users to models the client cannot handle (e.g., incompatible shell types or missing features), leading to runtime failures once selected.

Useful? React with 👍 / 👎.

info!("Turn error: {e:#}");
let event = EventMsg::Error(e.to_error_event(None));
sess.send_event(&turn_context, event).await;
sess.send_event(turn_context.as_ref(), event).await;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: use &

.refresh_available_models(&config.model_provider)
.await
{
error!("failed to refresh available models: {err}");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we test the fact that we are loading models?

@aibrahim-oai aibrahim-oai enabled auto-merge (squash) December 6, 2025 00:52
@aibrahim-oai aibrahim-oai disabled auto-merge December 6, 2025 05:31
@aibrahim-oai aibrahim-oai merged commit 53a486f into main Dec 7, 2025
45 of 47 checks passed
@aibrahim-oai aibrahim-oai deleted the codex-auto branch December 7, 2025 17:47
@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants