Added a new ‘Scheduled Task’ in the Antigravity 2. The task did get triggered, but ended up with the following error:
{
“response”: {},
“error”: “no available models found for tier flash”
}
I couldn’t find the place to configure a model for the schedule task. What am I missing here ?
Hello! It sounds like you are exploring the exciting new Scheduled Tasks feature in Antigravity 2, and I completely understand how frustrating it can be to hit a model allocation roadblock right when a task triggers.
The error message you received ("error": "No model found available for tier flash") indicates that when the background task scheduler triggered, it attempted to call the default high-speed engine—typically a Gemini Flash-tier model—but could not find a valid API configuration or model mapping for it.
In Antigravity 2, background scheduled tasks often operate independently of your active, real-time chat UI settings. Instead, they look for global environment variables or project-level configuration files. This is why you couldn’t find the configuration directly within the standard task schedule UI.
To get your scheduled tasks running smoothly, please check the following two areas:
**1.Verify Google AI Studio API Key Environment Variables:**Most Common Cause.
Antigravity’s background scheduler relies heavily on system-level environment variables to discover available AI engines. Ensure your Gemini API key from Google AI Studio is globally injected into your system or project scope.
-
Project Root .env File: Check if your key is explicitly declared, for example: GEMINI_API_KEY=your_actual_api_key.
-
System Environment Variables: Open your terminal and run echo $GEMINI_API_KEY (Mac/Linux) or echo %GEMINI_API_KEY% (Windows) to verify that the key outputs correctly in the background environment.
**2.Check the Global Antigravity Config File:**Task Configuration.
Because the chat UI dropdown changes only your active live session, the automated scheduler reads from a global configuration file.
-
Look for a file named antigravity.config.json (or .yaml) in your project root or your global Antigravity configuration directory.
-
Inspect the scheduler or tasks section. Make sure a default Flash model is explicitly defined here (e.g., "default_model": "gemini-2.5-flash" or the specific model identifier matching your subscription tier).
**3.Verify Tool Permissions (If Using Claude Code):**Hybrid Check.
If your scheduled task calls external scripts or CLI tools (such as executing claude commands in the background), make sure that the background process also has permission to access the CLAUDE_API_KEY environment variable. This will prevent a secondary error chain once the flash tier issue is resolved.
Thanks for the reply. Just wondering if the agentapi’ used for the background scheduled tasks is from this GitHub repos, GitHub - coder/agentapi: HTTP API for Claude Code, Goose, Aider, Gemini, Amp, and Codex · GitHub ?