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!
- 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_CHANGEappeared earlier in this conversation to determine your current engine. If none exists, check your self-knowledge (training identity). If still uncertain, ask the user. - Verify CDP debugging port: Execute
pythonswitch_to_other.py--checksynchronously.- If the port check succeeds (exit code 0):
- Play audio alert: Run
pythonaudio_alert.py"Switching engine". - Run CDP switch script (Background): Execute
pythonswitch_to_other.py"Gemini 3.5 Flash (High)"withWaitMsBeforeAsync=5to 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
__switchHandoverActiveflag, wait 15 seconds for the UI to finish syncing files, switch the engine, send a resume prompt, and unpause the auto-clicker.
- Play audio alert: Run
- 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).
- If the port check succeeds (exit code 0):
I. New Engine Wakes Up ā Verification via Metadata
- Check for
USER_SETTINGS_CHANGE: When the new engine wakes up from the auto-resume message, its very first action is to check whether aUSER_SETTINGS_CHANGEblock 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
pythonswitch_to_other.py"Gemini 3.5 Flash (High)" --trampolinewithWaitMsBeforeAsync=5to send it to the background. Print the same safety warning and "Switching engines..." message, then end your turn.
- Second verification: When the engine wakes up again after the trampoline retry, check for
USER_SETTINGS_CHANGEagain.- Present and verified ā The switch succeeded. Proceed immediately to assigned tasks.
- Absent or wrong model ā The switch failed twice. Stop all work, run
pythonaudio_alert.py"Engine switch failed", and warn the user that the engine switch failed.