feat(virtualmodels): route image requests to vision-capable targets - #1141
SantiagoDePolonia wants to merge 1 commit into
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 21 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (31)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
| meta.ContextWindow = model.ContextWindow | ||
| meta.MaxOutputTokens = model.MaxOutputTokens | ||
| meta.Capabilities = model.Capabilities | ||
| meta.Capabilities = catalogCapabilities(model) |
There was a problem hiding this comment.
If a catalog model lists image as an input modality and its provider-model entry has a capabilities map without vision, buildMetadata replaces the map that held the derived vision flag. When another target reports vision, image routing skips this image-capable model. Keep the derived flag unless the provider explicitly sets vision.
| if (form && form.vision_routing) { | ||
| payload.vision_routing = true; | ||
| } |
There was a problem hiding this comment.
Saved vision setting disappears
Saving or toggling a single-target virtual model drops its existing vision_routing: true setting. Both payload builders send the flag only when there are multiple targets, though the server accepts it for one target. The setting stays off if the user adds another target later. Keep the saved flag in single-target payloads too.
Could not complete testing for 1 flow, faced 1 obstacle. Obstacles faced
To reduce obstacles, configure your TREX environment. What we tested
|
Part of #1104 (item 9).
Adds an opt-in
vision_routingoption to virtual models (config.yaml,VIRTUAL_MODELS, admin API, dashboard editor). When a request carries images (chatimage_url, Responsesinput_image, Anthropicimageblocks), only targets whose effective metadata reportsvisionare considered, before any strategy picks. Chained virtual models inherit the decision.imageas an input modality now report thevisioncapability (an explicit flag still wins).balancedResolution; whichever merges second needs a small rebase.