Skip to content

Conversation

@aibrahim-oai
Copy link
Collaborator

@aibrahim-oai aibrahim-oai commented Dec 23, 2025

  • Send models etag
  • Refresh models on 412
  • This wires ModelsManager to ModelFamily so we don't mutate it mid-turn

@aibrahim-oai
Copy link
Collaborator Author

@codex review this

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

@aibrahim-oai aibrahim-oai changed the title Send models etag to responses endpoint Refresh on models etag mismatch Dec 23, 2025
@aibrahim-oai
Copy link
Collaborator Author

@codex fix this

let _ = tx_event.send(Ok(ResponseEvent::RateLimits(snapshot))).await;
}
if let Some(etag) = models_etag {
let _ = tx_event.send(Ok(ResponseEvent::ModelsEtag(etag))).await;
Copy link
Collaborator

Choose a reason for hiding this comment

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

bit annoying to have to push everything through events but that's how it is.

}

async fn get_etag(&self) -> Option<String> {
self.etag.read().await.clone()
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not great that etag and models are not updated atomically.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Only one method updates them though

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes, but one value can be updated while the other isn't

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok will see what I can change

.url
.query_pairs()
.any(|(k, _)| k == "client_version"),
"expected /models refresh to include client_version query param"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Reminder to decide on how we are sending client_version consistently across endpoints.

@chatgpt-codex-connector
Copy link
Contributor

Summary

  • Restored the dev-build client_version fallback to 99.99.99 when Cargo reports 0.0.0.

Testing

  • just fmt (warnings about unstable imports_granularity on stable toolchain)
  • just fix -p codex-core
  • cargo test -p codex-core (fails: models_manager::manager::tests::refresh_available_models_* with 403 “Loopback targets forbidden”; shell_snapshot::tests::linux_sh_snapshot_includes_sections; exec::tests::kill_child_process_group_kills_grandchildren_on_timeout)

View task →

@aibrahim-oai aibrahim-oai merged commit 66b7c67 into main Jan 1, 2026
26 checks passed
@aibrahim-oai aibrahim-oai deleted the wire-etag branch January 1, 2026 19:41
@github-actions github-actions bot locked and limited conversation to collaborators Jan 1, 2026
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