fix(providers): remove google-antigravity OAuth provider + fix bare-alias hijack - #51413
fix(providers): remove google-antigravity OAuth provider + fix bare-alias hijack#51413infinitycrew39 wants to merge 2 commits into
Conversation
…ias hijack CI on the salvage caught two issues the stale PR base masked: 1. The model-setup flows were extracted from main.py into hermes_cli/model_setup_flows.py after @pmos69 forked. The cherry-pick re-introduced a stale _model_flow_custom into main.py (duplicating the one main.py now imports) and put _model_flow_google_antigravity there too. Move the antigravity flow into model_setup_flows.py alongside its siblings and drop the stale _model_flow_custom dup. Fixes the getpass/stdin OSError in tests/cli/test_cli_provider_resolution.py. 2. google-antigravity re-exposes Claude/Gemini/GPT-OSS models, so its catalog was hijacking bare short aliases (`sonnet` -> google-antigravity instead of anthropic) in detect_static_provider_for_model via dict insertion order. Add _BORROWED_MODEL_PROVIDERS and defer those providers to a last-resort pass so a model's native vendor always wins alias/direct-catalog detection. Fixes tests/hermes_cli/test_models.py::test_short_alias_resolves_to_static_model.
…providers (NousResearch#50492) * feat(providers): remove google-gemini-cli + google-antigravity OAuth providers Google now actively bans accounts for third-party tools that piggyback on Gemini CLI / Antigravity / Code Assist OAuth, and because abuse prevention sits at a backend layer the ban can extend to the entire Google account (Gmail/Drive), with a second violation being permanent. Ref: google-gemini/gemini-cli#20632 Removes both OAuth inference providers entirely (modules, provider profiles, auth/runtime/config/models wiring, the /gquota Code Assist quota command, the antigravity-cli optional skill, desktop + docs surface in en + zh-Hans). The API-key 'gemini' provider (GOOGLE_API_KEY/GEMINI_API_KEY against generativelanguage.googleapis.com) is unaffected and stays fully supported. * fix(skills): keep the antigravity-cli skill — only the OAuth provider is removed The antigravity-cli optional skill orchestrates the external `agy` binary as a coding-agent tool via the terminal tool — it does NOT wrap Hermes inference through the banned google-antigravity OAuth provider, so it carries none of the account-ban risk that motivated removing that provider. Restore the skill, its docs page, the sidebar entry, and the optional-skills catalog row. The google-antigravity / google-gemini-cli inference providers stay fully removed.
Duplicate of merged #50492 — that PR (by core maintainer @teknium1) already removed the google-antigravity + google-gemini-cli OAuth providers entirely. Verified on |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Comment — High surface area (61 files, +161/-4954). Human review recommended.
This PR removes the google-gemini-cli OAuth provider and the entire gemini_cloudcode_adapter.py file (909 lines deleted). The removal is massive but appears to be a clean excision of unused/deprecated code.
Observations
- The deleted adapter was a reverse-engineered OpenAI-compatible facade for Google's Cloud Code Assist backend
- The PR also removes the provider routing in
agent_init.pythat directedgoogle-gemini-clito this adapter - No replacement is provided — this appears to be a deliberate removal of a deprecated path
Suggestions
- Confirm that no active users depend on the
google-gemini-cliprovider before merge - Consider adding a migration note in release documentation
Reviewed by Hermes Agent
|
Thanks for this — and for the thorough writeup on the account-ban risk, which is exactly the reasoning we landed on. Both OAuth providers ( Closing as superseded. If |
🚨 Problem: 'gemini-3.1-pro-low is not a valid model ID' error
After a couple of messages, users running Hermes with google-antigravity OAuth provider get:
🔎 Root Cause
The google-antigravity OAuth provider re-exposes Claude/Gemini/GPT models from upstream vendors (when the account is entitled). Due to dict insertion order in model catalog resolution:
-m geminior Hermes picks a model name likegemini-3.1-pro-lowdetect_static_provider_for_model()checks provider catalogs in ordergeminiprovider (native vendor always wins for models)✅ Solution: Remove the Dangerous Provider Entirely
Why not just fix the alias hijack? Because Google actively bans accounts for using OAuth gemini/antigravity:
Fixing to make it work would expose users to account bans. Removal is the only safe path.
📋 Changes
Two commits:
Files removed: ~5K lines (google_oauth.py, antigravity_oauth.py, gemini_cloudcode_adapter.py, tests, docs)
✨ What Still Works
✅ API-key gemini provider (
GOOGLE_API_KEYenv var) → fully supportedgenerativelanguage.googleapis.comdirectly❌ OAuth providers (google-gemini-cli, google-antigravity) → removed
Fixes
sonnet→ anthropic, not antigravity)