fix(codex): avoid vision image tool loops#69551
Conversation
PR SummaryMedium Risk Overview Adjusts Reviewed by Cursor Bugbot for commit ffb218a. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR ports two targeted bug fixes from #65061 (rebased on current Confidence Score: 5/5Safe to merge — both fixes are small, well-scoped, and backed by new passing tests with no blocking issues found. All findings are P2 or lower. The vision-tool filter logic is correct (drop image tool only when both modelHasVision AND hasInboundImages), and the image-model provider inheritance correctly derives from the configured primary model. Tests cover both the positive and negative cases for each fix. No files require special attention. Reviews (1): Last reviewed commit: "test: expand codex image fallback covera..." | Re-trigger Greptile |
48132da to
a41b84e
Compare
|
Landed on main. Source head: Validation:
Thanks @zhulijin1991. I kept the original behavior, resolved the stale conflict, added extra regression coverage, and aligned the install-smoke timeout expectation that main had already changed to 900s. |
Replacement for #65061 because the contributor fork cannot be updated by maintainers and the original branch conflicts with current
main.Keeps @zhulijin1991's two fixes, rebased on current
main, with the run-attempt test hook conflict resolved and extra regression coverage added:imagetool only when the model already supports vision and the turn has inbound images.Validation run locally:
pnpm test extensions/codex/src/app-server/run-attempt.vision-tools.test.ts src/agents/model-fallback.image-provider.test.ts src/agents/model-fallback.test.tspnpm check:changed.profileOPENAI_API_KEY:gpt-5.4-nanoResponses API returnedOK.Thanks @zhulijin1991 for the original fix in #65061.