Hmbown/CodeWhale · error
Antigravity is a retired, non-runnable legacy provider…
Error message
Antigravity is a retired, non-runnable legacy provider. Clear Codewhale-owned legacy state with `codewhale auth clear --provider antigravity`; this does not alter Google or Antigravity sessions. For Gemini use provider `google` with `GEMINI_API_KEY`.
What it means
Thrown by `set_provider_config_value` when any provider config field is set for `ProviderKind::Antigravity`. Antigravity is a retired legacy provider that can no longer run; writes to its config are refused with a tombstone message pointing to cleanup and migration instructions.
Solutions
- Run `codewhale auth clear --provider antigravity` to clear the Codewhale-owned legacy state (does not affect Google or Antigravity sessions).
- For Gemini, use provider `google` with a `GEMINI_API_KEY` instead.
- Update scripts/docs to stop targeting the antigravity provider.
Example fix
// before codewhale config set providers.antigravity.api_key sk-... // after codewhale auth clear --provider antigravity export GEMINI_API_KEY=... # use provider `google`
Defensive patterns
Strategy: validation
Validate before calling
fn provider_is_retired(p: ProviderKind) -> bool {
p == ProviderKind::Antigravity
}
// guard before any provider config write:
// if provider_is_retired(provider) { /* route to migration steps */ } Try / catch
match set_provider_config_value(config, provider, field, value) {
Err(e) if e.to_string().contains("retired") => {
eprintln!("{e}");
// run: codewhale auth clear --provider antigravity, then use provider `google`
}
other => other,
} Prevention
- Remove all `providers.antigravity` entries from config.toml.
- Run `codewhale auth clear --provider antigravity` once after upgrading.
- Update scripts and docs to target provider `google` with GEMINI_API_KEY for Gemini workloads.
When it happens
Trigger: Calling `set_provider_config_value` (or any config-write command, e.g. `codewhale config set providers.antigravity.api_key ...`) with provider = Antigravity and any field/value.
Common situations: User with leftover legacy Antigravity state tries to update its API key or other setting; automation scripts still referencing the retired provider; following old docs that mention Antigravity.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
Related errors
- Antigravity is a retired, non-runnable legacy provider…
- Antigravity is a retired, non-runnable legacy provider…
- Choose a model for the destination provider before…
- Invalid auto_review.allow
- {LEGACY_ANTIGRAVITY_TOMBSTONE_MESSAGE}
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/7a11acf1d83cbfd9.
Report an issue: GitHub.
Appendix: source
Thrown at crates/config/src/lib.rs:1172
fn parse_context_window(value: &str) -> Result<u32> {
let parsed = value.trim().parse::<u32>().with_context(|| {
format!("invalid context_window '{value}': expected a positive token count")
})?;
if parsed == 0 {
bail!("context_window must be greater than 0");
}
Ok(parsed)
}
fn set_provider_config_value(
config: &mut ConfigToml,
provider: ProviderKind,
field: ProviderConfigField,
value: &str,
) -> Result<()> {
if provider == ProviderKind::Antigravity {
bail!(LEGACY_ANTIGRAVITY_TOMBSTONE_MESSAGE);
}
match field {
ProviderConfigField::Vendor => {
if provider != ProviderKind::Openrouter {
bail!("vendor is only supported by providers.openrouter");
}
validate_openrouter_vendor(value)?;
config.providers.for_provider_mut(provider).vendor = Some(value.to_string());
}
ProviderConfigField::ApiKey => {
let value = value.to_string();
config.providers.for_provider_mut(provider).api_key = Some(value.clone());
if provider == ProviderKind::Deepseek {
config.api_key = Some(value);
}
}
ProviderConfigField::BaseUrl => {
let value = value.to_string();View on GitHub (pinned to 73e0f67d83)