← Back to Workflow
Sub-Workflow

Switch to Gemini 3.5 Flash (High)

This workflow triggers the automated engine handover to Gemini 3.5 Flash (High).

[!WARNING] INVOCATION GATE: Do NOT execute this workflow on your own initiative. It may ONLY be invoked in two cases: (1) another workflow's step explicitly references it (e.g., "Execute the steps in the switch-to-gemini-3.5-flash-high workflow"), or (2) the user explicitly types switch-to-gemini-3.5-flash-high workflow or equivalent. If the user casually says "switch to Flash", do NOT auto-invoke this workflow — the user will switch manually. When in doubt, ask.

[!CAUTION] The automated engine switch requires the Antigravity UI to be visible and in the foreground. ā—šŸ”“ Make absolutely SURE that NO other Antigravity windows (such as Agent Manager or other workspaces) are open, or the switch sequence WILL misfire. šŸ”“ā— If the window is hidden behind Chrome or minimized, the automation script will fail. Do not click away during the handover!

  1. Verify Current Engine: Check if you are already Gemini 3.5 Flash (High). If so, inform the user and abort. Check if a USER_SETTINGS_CHANGE appeared earlier in this conversation to determine your current engine. If none exists, check your self-knowledge (training identity). If still uncertain, ask the user.
  2. Verify CDP debugging port: Execute python switch_to_other.py --check synchronously.
    • If the port check succeeds (exit code 0):
      • Play audio alert: Run python audio_alert.py "Switching engine".
      • Run CDP switch script (Background): Execute python switch_to_other.py "Gemini 3.5 Flash (High)" with WaitMsBeforeAsync=5 to send it to the background.
      • End Turn immediately: Directly print the following safety warning and "Switching engines..." message to the chat screen: "\n\nā—šŸ”“ Make absolutely SURE that NO other Antigravity windows (such as Agent Manager or other workspaces) are open, or the switch sequence WILL misfire. šŸ”“ā—\n\nSwitching engines..." (Do NOT wait for the python script). The script will instantly pause the auto-clicker via the __switchHandoverActive flag, wait 15 seconds for the UI to finish syncing files, switch the engine, send a resume prompt, and unpause the auto-clicker.
    • If the port check fails (exit code 1):
      • Directly print the manual instruction alert: 🚨 CDP Debugging Port Offline — Manual Switch Required 🚨 "I cannot switch the model automatically because the IDE's remote debugging port is offline. Please manually switch the model to Gemini 3.5 Flash (High) in the top-right model selector dropdown of the IDE, type a message (e.g. 'resume'), and click send to continue the workflow under the new engine."
      • End Turn immediately (do NOT run the background script).

I. New Engine Wakes Up — Verification via Metadata

  1. Check for USER_SETTINGS_CHANGE: When the new engine wakes up from the auto-resume message, its very first action is to check whether a USER_SETTINGS_CHANGE block was injected into the metadata of the message it just received, and specifically verify that it changed the model to "Gemini 3.5 Flash (High)".
    • Present and verified → The switch succeeded. Proceed immediately to assigned tasks within the parent workflow.
    • Absent or wrong model → The direct switch failed (likely because you were already on Gemini Flash). Retry with trampoline: Run python switch_to_other.py "Gemini 3.5 Flash (High)" --trampoline with WaitMsBeforeAsync=5 to send it to the background. Print the same safety warning and "Switching engines..." message, then end your turn.
  2. Second verification: When the engine wakes up again after the trampoline retry, check for USER_SETTINGS_CHANGE again.
    • Present and verified → The switch succeeded. Proceed immediately to assigned tasks.
    • Absent or wrong model → The switch failed twice. Stop all work, run python audio_alert.py "Engine switch failed", and warn the user that the engine switch failed.

This is used in: