sipeed/picoclaw · warning
no models available
Error message
no models available
What it means
Guard in the Antigravity models listing helper that fires when FetchAntigravityModels succeeds but returns a zero-length slice. Notably, the current implementation always appends gemini-3-flash-preview and gemini-3-flash when absent (antigravity_provider.go:621-632), so with the present code this branch is effectively unreachable unless the fallback-append logic is removed or the upstream models map is empty and the hardcoding is dropped.
Source
Thrown at cmd/picoclaw/internal/auth/helpers.go:467
cred = refreshed
_ = auth.SetCredential("google-antigravity", cred)
}
}
projectID := cred.ProjectID
if projectID == "" {
return fmt.Errorf("no project id stored. Try logging in again")
}
fmt.Printf("Fetching models for project: %s\n\n", projectID)
models, err := providers.FetchAntigravityModels(cred.AccessToken, projectID)
if err != nil {
return fmt.Errorf("error fetching models: %w", err)
}
if len(models) == 0 {
return fmt.Errorf("no models available")
}
fmt.Println("Available Antigravity Models:")
fmt.Println("-----------------------------")
for _, m := range models {
status := "✓"
if m.IsExhausted {
status = "✗ (quota exhausted)"
}
name := m.ID
if m.DisplayName != "" {
name = fmt.Sprintf("%s (%s)", m.ID, m.DisplayName)
}
fmt.Printf(" %s %s\n", status, name)
}
return nil
}View on GitHub (pinned to 49183d7e8d)
Solutions
- Treat as expected output, not a crash: report that no models are provisioned for this project
- Verify the project ID used has Antigravity/Code Assist enabled in the cloud console
- Re-login to refresh credentials and retry the fetch
- If maintaining a fork that removed the gemini-3-flash fallback, restore it or relax this guard
Defensive patterns
Strategy: validation
Validate before calling
if len(models) == 0 {
fmt.Println("no models provisioned for this project — nothing to list")
return nil
} Prevention
- Confirm Antigravity/Code Assist is enabled for the cloud project before listing
- In tests, stub FetchAntigravityModels to return at least one AntigravityModelInfo
When it happens
Trigger: The fetchAvailableModels response contains an empty/missing models map AND the hardcoded gemini-3-flash fallback entries are removed in a future version; a mocked/stubbed provider in tests returns an empty slice; upstream changes the payload shape so the models field decodes as empty without a JSON error.
Common situations: Custom forks that strip the fallback model entries; tests injecting empty model lists; an upstream API response format change that yields zero parsed models.
Related errors
- Validation error: %v
- error fetching models: %w
- failed to get WeCom QR code: response missing scode or auth_
- WeCom QR scan succeeded but bot credentials are missing
- invalid WeCom QR generate URL: %w
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/1fc08baae4599797.
Report an issue: GitHub.