diegosouzapw/OmniRoute · error

[models] antigravity loadCodeAssist failed at

Error message

[models] antigravity loadCodeAssist failed at ${url} (${response.status}) — trying next

What it means

Retry-chain warning during antigravity project bootstrap: the POST to loadCodeAssist at one of several candidate Google endpoints returned a non-OK HTTP status (after a 15s AbortSignal timeout window). The loop logs this and tries the next URL; only when all URLs fail does bootstrap fail. Cause is usually endpoint-specific outage, 4xx auth/scope rejection, or timeout.

Solutions

  1. Check whether the failing status is 401/403 (token expired or missing scopes) vs 5xx (Google-side outage) and act accordingly.
  2. Refresh the antigravity OAuth access token and retry.
  3. Verify network/proxy reachability to the Google Code Assist endpoints; increase BOOTSTRAP_TIMEOUT_MS if timeouts dominate.
  4. If all URLs fail, surface the aggregate error to the user instead of a partial bootstrap.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at open-sse/services/antigravityProjectBootstrap.ts:121 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/bfb782b3a4eeee94. Report an issue: GitHub.

Appendix: source

Thrown at open-sse/services/antigravityProjectBootstrap.ts:121

  signal?: AbortSignal
): Promise<LoadCodeAssistResult> {
  const urls = getAntigravityLoadCodeAssistUrls();
  const headers = getAntigravityContentHeaders(clientProfile, accessToken);

  for (let i = 0; i < urls.length; i++) {
    const url = urls[i];
    if (signal?.aborted) throw signal.reason;
    try {
      const timeoutSignal = AbortSignal.timeout(BOOTSTRAP_TIMEOUT_MS);
      const response = await fetchImpl(url, {
        method: "POST",
        headers,
        body: JSON.stringify({ metadata: getAntigravityLoadCodeAssistMetadata() }),
        signal: signal ? AbortSignal.any([signal, timeoutSignal]) : timeoutSignal,
      });

      if (!response.ok) {
        console.warn(
          `[models] antigravity loadCodeAssist failed at ${url} (${response.status}) — trying next`
        );
        continue;
      }

      const data = (await response.json()) as Record<string, unknown>;

      // cloudaicompanionProject may be a plain string or an object with an id field.
      const raw = data.cloudaicompanionProject;
      const projectId =
        typeof raw === "string"
          ? raw.trim()
          : raw &&
              typeof raw === "object" &&
              typeof (raw as Record<string, unknown>).id === "string"
            ? ((raw as Record<string, unknown>).id as string).trim()
            : "";

View on GitHub (pinned to a179ffed5b)