Commit Graph

5 Commits

Author SHA1 Message Date
Teknium 7e939af627 refactor(computer_use): compact permissions/vision_routing/backend/__init__ docstrings and spacing 2026-09-02 15:54:54 -07:00
Teknium 04de344f41 refactor(computer_use): compact backend/permissions/vision_routing/__init__ docs; tighten doctor helpers 2026-09-02 15:45:55 -07:00
Teknium 33ae442e94 refactor(tools/computer_use): split cua_backend into daemon/actions/... siblings; dispatch tables; compact doctor/tool 2026-09-02 14:45:15 -07:00
helix4u 591e6fb8f4 fix(computer_use): honor custom vision routing 2026-06-07 02:09:20 -07:00
xxxigm 531efe7208 fix(computer_use): add helper to decide capture vision routing
Add tools/computer_use/vision_routing.py with
should_route_capture_to_aux_vision(provider, model, cfg) — a small
policy helper that decides whether a captured screenshot should be
returned as a multimodal envelope (main model has native vision) or
pre-analysed through the auxiliary.vision pipeline so the main model
only sees text.

The decision mirrors agent.image_routing.decide_image_input_mode for
user-attached images, so the capture path and the user-turn path agree
on what counts as an explicit aux vision override:
  * provider/model/base_url under auxiliary.vision => explicit override
    => route through aux vision
  * provider+model accepts multimodal tool results AND main model
    reports supports_vision=True => keep multimodal envelope
  * everything else (no tool-result image support, non-vision model,
    metadata lookup failure) => fail closed and route through aux

No call sites are changed in this commit; the helper is added in
isolation so the routing decision can be unit-tested before it is
plumbed into _capture_response().
2026-05-21 17:38:19 -07:00