[codex-rs] auto-review model override #23767
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 58f0201cf8
ℹ️ 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".
dylan-hurd-oai
left a comment
There was a problem hiding this comment.
can we make auto_review_model_override a string instead of a bool?
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
ddr-oai
left a comment
There was a problem hiding this comment.
lgtm -- use basic override when present
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f42f7f988
ℹ️ 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".
| model_override | ||
| .unwrap_or(turn.model_info.slug.as_str()) |
There was a problem hiding this comment.
Fall back when override model is unavailable
When auto_review_model_override is set but that reviewer slug is not in the current available_models list (for example a stale/partial catalog, or a reviewer filtered out for the current auth mode), this fallback branch still sends the guardian request to the unavailable override model. The previous preferred-model path fell back to the parent model when the review model lookup failed; this branch should do the same instead of using model_override after review_model is already known to be None, otherwise strict auto-review can fail with an invalid/unavailable model.
Useful? React with 👍 / 👎.
Why
Guardian auto-review normally uses the provider-preferred review model when one is available. Some parent models need model-catalog metadata to select a different review model while keeping older
/modelspayloads compatible when that metadata is absent.What changed
ModelInfo::auto_review_model_overridemetadata to the public model payload as a review-model slug.auto_reviewcore integration suite test that loads override metadata from a remote model catalog path and asserts the strict auto-review/responsesrequest uses the catalog-selected review model.ModelInfofixtures and local catalog constructors for the new optional field.Validation
cargo test -p codex-protocol model_info_defaults_availability_nux_to_none_when_omittedcargo test -p codex-core guardian_review_uses_cargo test -p codex-core remote_model_override_uses_catalog_model_for_strict_auto_review --test alljust fix -p codex-protocoljust fix -p codex-corejust fmtgit diff --check