fix(media-generation): preserve trimmed default model flag#96430
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 25, 2026, 7:10 AM ET / 11:10 UTC. Summary PR surface: Source +1, Tests +23. Total +24 across 2 files. Reproducibility: yes. Source inspection on current main shows the trimmed row model is compared against raw Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land this narrow normalization fix after required CI so media-generation catalog row ids and default-model comparison share the same helper. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows the trimmed row model is compared against raw Is this the best way to solve the issue? Yes. Normalizing AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4ecb45bf7729. Label changesLabel justifications:
Evidence reviewedPR surface: Source +1, Tests +23. Total +24 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
2dc49de to
b2bae26
Compare
|
Merged via squash.
|
What Problem This Solves
Static media-generation catalog synthesis trims and de-duplicates provider model ids before emitting rows. However, the
defaultflag compared each trimmed row against the rawprovider.defaultModelstring.If provider metadata supplied a default model with harmless surrounding whitespace, the synthesized row used the trimmed model id but lost
default: true.Why This Change Was Made
The default comparison should use the same normalized model value as the generated rows. This patch normalizes
defaultModelthrough the same unique/trim helper before marking catalog entries.User Impact
Media generation provider catalogs keep the intended default model marker even when provider metadata includes surrounding whitespace on
defaultModel.Evidence
Live behavior proof from this branch:
Focused validation:
git diff --checkproduced no output.AI-assisted: OpenAI Codex helped inspect media-generation catalog normalization and add focused regression coverage.