Enable Gemini-3.5-flash cua

Merged
MI
4mo ago
+360-53

why

New model dropped

what changed

Added support for the Gemini 3.5 Flash Computer Use updated toolset in GoogleCUAClient.ts, with all new tool formats correctly mapped.

test plan


Summary by cubic

Adds support for the google/gemini-3.5-flash computer-use agent. Normalizes Gemini 3.x tool names/args to 2.5 handlers, preserves click semantics, validates coordinates (rejects missing/NaN/Infinity), always returns a fresh screenshot, and surfaces reasoning/cached tokens.

  • New Features

    • Enable google/gemini-3.5-flash in agent/LLM provider maps and public types; update tests.
    • Map 3.x functions to 2.5 handlers and accept new arg shapes: coordinate-less type, keys array or single key, magnitude_in_pixels for scroll, drag start/end pairs; recognize screenshot/take_screenshot; coordinate-less scroll falls back to PageUp/PageDown; alias wait to wait_5_seconds.
    • Always return a screenshot function response even when no executable actions are produced.
  • Bug Fixes

    • Track reasoning_tokens and cached_input_tokens in Google CUA usage (per step and aggregated).
    • Preserve 3.x click-family semantics (double_click, triple_click, right_click, middle_click, move) and drop calls with missing or non‑finite coordinates; add explicit click_at guard and a shared finite-number check; add unit tests for conversion/guards.
    • Guard required args and log custom‑tool collisions: reject navigate without url and type/type_text_at without text (empty allowed); log when a custom tool name conflicts with a predefined function (predefined wins).