default agent to hybrid mode

Merged
TK
7mo ago
+199-105

why

Dom mode has been deprecated for a while, and is now being replaced with hybrid as a default

what changed

  • When a hybrid capable model is provided, it is used with hybrid mode by default
  • When a non hybrid capable model is provided, it is used with dom mode
  • if dom or hybrid is explicitly provided, it will use the provided mode

test plan

tested locally + wrote tests


Summary by cubic

Set the default v3 agent mode to hybrid, with automatic routing to dom for models that aren’t hybrid-capable. Explicit mode settings are always respected; CUA behavior is unchanged.

  • New Features
    • Auto-selects "hybrid" for models matching HYBRID_CAPABLE_MODEL_PATTERNS (gemini-3, claude, gpt-5.4, gpt-5.5); otherwise uses "dom".
    • Routes using the provided agent model (string or config), or falls back to the Stagehand-level model when undefined.
    • Honors explicit mode (dom, hybrid, cua); if mode is unset, deprecated cua: true enables CUA.
    • Logs the resolved mode and warns when "hybrid" is used with non-hybrid-capable models.
    • Adds unit tests for routing and handler fallbacks.