Repository navigation
fix(qa): model-switch proof accepts served model reroutes - #127281
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
83b9623 to
73b1d42
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 4:51 PM ET / 20:51 UTC. ClawSweeper reviewWhat this changesThe PR updates model-switch QA assertions and evaluator coverage so a provider-served response model may differ from the requested or assistant-reported model. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open. Current main still requires the effective model and provider response model to match, while the terminal-receipt producer deliberately records them independently; this PR aligns both affected QA scenarios and resolves the prior sibling tool-continuity finding. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherQA Lab model-switch scenarios run an agent twice and validate its terminal receipt, reply, and delivery evidence. The receipt is produced by the embedded agent runtime and passed into YAML scenario evaluation as model-switch proof. flowchart LR
A[Configured primary and alternate models] --> B[Agent runs]
B --> C[Terminal receipt]
C --> D[QA scenario evaluator]
D --> E[Model-switch evidence]
E --> F[Pass or failure report]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +39, Other 0. Total +39 across 4 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the receipt-contract-aligned QA assertions once exact-head CI completes, retaining the evaluator-level reroute cases as regression coverage. Do we have a high-confidence way to reproduce the issue? Yes—source reproducible: current main rejects a receipt whose independently recorded response model differs, and the new evaluator fixtures exercise that exact shape. The read-only review did not execute the test command. Is this the best way to solve the issue? Yes. Updating the QA consumer to validate the producer’s recorded reroute invariant is narrower and more accurate than changing the terminal-receipt producer or suppressing served-model evidence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d0db8a9241bc. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
73b1d42 to
e2ef0e0
Compare
|
Merged via squash.
|
…27281) * fix(qa): accept response model reroutes * fix(qa): accept tool continuity response reroutes --------- Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
The model-switch QA scenario required
effective.model === effective.responseModel, but the terminal-receipt producer deliberately records the assistant's reported model and provider response model as independent facts. A provider response-model reroute therefore could fail the proof before the alternate-model handoff was evaluated.Why This Change Was Made
The scenario now validates the exact producer contract: requested identity, non-empty effective identities, and
reroutedequal to any difference between the receipt's requested and effective provider/model/response model. It still requires run ownership, visible terminal disposition, distinct alternate served identity, and sent delivery evidence.Evidence
src/agents/embedded-agent-runner/run/terminal-preparation.tscomputesreportedModelReffrom assistant provider/model, computesresponseModelindependently, and marks a reroute for any requested/effective difference.packages/ai/src/transports/openai-responses-stream-terminal-internal.tsrecords the provider response's model inresponseModel; transport parity fixtures preserve separate model and response-model fields.LOC
No Codex runtime/protocol behavior is involved.