Client or integration
Direct HTTP/API client
Area
Authentication and account pool
Summary
When Google Antigravity OAuth session tokens expire, desynchronize, or are invalidated upstream by Google, incoming requests to OpenCodeX fail immediately with 401 instead of being refreshed and replayed transparently.
While other OAuth providers (xai, github-copilot, kiro) participate in automatic upstream 401 recovery (isOAuth401ReplayProvider and FORCE_REFRESH_PROVIDERS), google-antigravity is missing from both sets. Consequently, any 401 from upstream terminates the request immediately and leaves the stale token in ~/.opencodex/auth.json until a manual command or request triggers a refresh.
Reproduction
- Configure
google-antigravity as an OAuth provider in OpenCodeX (ocx login google-antigravity).
- Allow the session token to expire, rotate in another environment, or become invalidated upstream.
- Send a request to
/v1/chat/completions or /v1/responses for model google-antigravity/gemini-3.8-flash.
- Upstream Google API returns
401 UNAUTHENTICATED (Request had invalid authentication credentials).
- OpenCodeX aborts immediately and forwards the 401 error to the caller, without attempting to refresh the token or replay the request.
Expected behavior: OpenCodeX should catch the upstream 401, execute forceRefreshOAuthAccessSnapshot (refreshing credentials and re-discovering the Cloud Code Assist project), and replay the request to completion.
Version
dev / 2.36.1+
Operating system
macOS 15.5 / Linux / Windows
Provider and model
google-antigravity / gemini-3.8-flash
Logs or error output
[opencodex] HTTP 401 Unauthorized from daily-cloudcode-pa.googleapis.com
authentication_error: Request had invalid authentication credentials.
Redacted configuration
{
"defaultProvider": "google-antigravity",
"providers": {
"google-antigravity": {
"adapter": "google",
"baseUrl": "https://daily-cloudcode-pa.googleapis.com",
"authMode": "oauth",
"googleMode": "cloud-code-assist",
"models": ["gemini-3.8-flash"]
}
}
}
Checks
Client or integration
Direct HTTP/API client
Area
Authentication and account pool
Summary
When Google Antigravity OAuth session tokens expire, desynchronize, or are invalidated upstream by Google, incoming requests to OpenCodeX fail immediately with 401 instead of being refreshed and replayed transparently.
While other OAuth providers (
xai,github-copilot,kiro) participate in automatic upstream 401 recovery (isOAuth401ReplayProviderandFORCE_REFRESH_PROVIDERS),google-antigravityis missing from both sets. Consequently, any 401 from upstream terminates the request immediately and leaves the stale token in~/.opencodex/auth.jsonuntil a manual command or request triggers a refresh.Reproduction
google-antigravityas an OAuth provider in OpenCodeX (ocx login google-antigravity)./v1/chat/completionsor/v1/responsesfor modelgoogle-antigravity/gemini-3.8-flash.401 UNAUTHENTICATED(Request had invalid authentication credentials).Expected behavior: OpenCodeX should catch the upstream 401, execute
forceRefreshOAuthAccessSnapshot(refreshing credentials and re-discovering the Cloud Code Assist project), and replay the request to completion.Version
dev / 2.36.1+
Operating system
macOS 15.5 / Linux / Windows
Provider and model
google-antigravity / gemini-3.8-flash
Logs or error output
Redacted configuration
{ "defaultProvider": "google-antigravity", "providers": { "google-antigravity": { "adapter": "google", "baseUrl": "https://daily-cloudcode-pa.googleapis.com", "authMode": "oauth", "googleMode": "cloud-code-assist", "models": ["gemini-3.8-flash"] } } }Checks