Skip to content

bug(platform): Add credential says the deployment ships no provider files while the catalog is still loading #4146

Closed

Description

@yannickmonney

While the provider catalog is still loading, Settings → AI providers → Add credential tells an admin the deployment is broken:

This deployment ships no provider files. Check that the config root is mounted and readable.

That is settings.providers.catalogs.emptyBody. When the catalog request answers, the vendors replace the warning: 13 here, including the org's own provider. When the backend's live-catalog cache is cold, the request takes as long as the shipped vendors' live listings take. It took 12 s on this offline stack, and the warning stayed up for 11 of them.

Impact

  • Who's affected: an admin adding a credential is told to check the config root when nothing is wrong. They can go looking for a mount problem, or close the dialog before the vendors arrive.
  • Where it shows up:
    • any install where the shipped vendors' live listings are slow or unreachable: offline, air-gapped or egress-restricted installs, or a slow vendor API;
    • mode A of tests/manual/setup.md, at step 4 of Wire the mock provider.
  • How often: the backend caches a failed or served listing for 300 s, so the warning comes back on the first open after every expiry.

Source and environment

  • Seen at: PR docs(manual): document the mock provider wiring for setup mode A #4137's head a0b5c48a05ab1262c726eda4c5567b46f7caae78.
  • Also on main 1ba77ed61: every file involved is identical there. git diff a0b5c48a0 origin/main -- services/platform/app/features/settings/ services/platform/backend/domains/providers/ services/platform/backend/core/lib/providers/ is empty.
  • Stack: native and local, mode A of tests/manual/setup.md.
    • Its own PostgreSQL 16 on loopback, with an S3 test double.
    • The lib/mocks gateway on :4141.
    • Egress goes to a dead proxy, so openrouter.ai and ai-gateway.vercel.sh don't resolve.
  • Browser: Chromium (Playwright 1.58.2), en-US, with a synthetic owner and org.

Reproduction (deterministic)

  1. Boot a stack that can't reach the shipped vendors' listing hosts. Mode A offline does this.
  2. Make sure no catalog has been fetched in the last 300 s, or restart the backend.
  3. Open Settings → AI providers and click Add credential straight away.
  4. Observed: a warning alert under Search provider with the text above, with Custom provider pinned below it. It stays until GET /api/app/providers/catalogs answers, and then the vendor list replaces it.
  5. Control: reopen the dialog within 300 s. The cache is now warm, the GET takes about 180 ms, the vendors show at once, and the alert never appears.
Run (UTC) GET /providers/catalogs Alert visible (after the dialog opened) Vendors shown
cold, 14:41 14:41:22.748 → 14:41:34.720 (12.0 s) +10 ms … +11,228 ms +11,491 ms (13, including e2e-mock)
warm, 14:41 187 ms never +13 ms
cold, 14:47 14:47:12.854 → 14:47:24.821 (12.0 s) +10 ms … +10,943 ms +11,206 ms (13)
warm, 14:47 166 ms never +12 ms

Expected

  • While the catalog request is in flight: the picker shows a loading state.
  • When the request succeeds with no shipped vendor: the alert shows. This is the real "config root not mounted" case.
  • When the request fails: the existing providers.catalogs.listFailed callout shows.

Cause

  • The pending state never reaches the dialog. app/features/settings/providers/components/providers-settings.tsx:83-86 builds vendors from catalogsQuery.data ?? []. The CredentialTable it renders at :181-186 receives isLoading={abilityLoading || credentialsQuery.isPending}, which leaves out catalogsQuery.
  • An empty list is read as a deployment fault. app/features/settings/credentials/vendor-picker-pane.tsx:91-110 treats addable.length === 0 that way: "Nothing to search through at all is a DEPLOYMENT fault (an unmounted or unreadable config root)". It renders catalogEmpty, so an empty list from a pending query reads as a misconfiguration.
  • The connectors page has the same shape. See connectors-settings.tsx:64, :101 and :106 (connectors.catalog.emptyBody). I didn't measure it; its catalog is local, so the window is probably short.
  • Why the window is long: backend/domains/providers/routes.ts:226-247 resolves each shipped vendor's live listing one after another. A failing listing is tried three times (catalog_fetch.ts), so a cold request costs the sum of all of them. That is the length of the window, not the defect.

Acceptance checks

  1. With the catalogs request held open (for example, a deferred response in a component test), the Add credential picker shows a loading state and not settings.providers.catalogs.emptyBody.
  2. With the request resolved to zero shipped vendors, the alert still shows.
  3. With the request rejected, providers.catalogs.listFailed shows, as today.
  4. The same three for the connectors catalog (connectors.catalog.emptyBody).

Evidence and limits

  • Evidence kept locally (TALE-358 occurrence r20261003T1615, run aff6b6f2):
    • the probe scripts/p2-catalog-pending.ts and its logs evidence/p2-catalog-pending.log and …-run3.log;
    • screenshots evidence/p2/cold-empty-body-while-pending.png, cold-vendors.png and warm-vendors.png;
    • the first sighting, evidence/p1-attempt1/W3-catalog-after-copy.png.
  • Limits:
    • I measured offline only; online, the window is the vendors' real listing latency, which I didn't measure.
    • English only.
    • I didn't check with a screen reader.
    • The connectors page is read from source only.

Activity

  1. yannickmonney commented on Oct 4, 2026

    @yannickmonney
    ContributorAuthor

    Post-merge recheck of #4161 against this issue's original reproduction: fixed. Run by the reporter, agent #3 (TALE-358 local-qa run 1f452e6a-3035-4cc9-a49b-d23d867a05ac), on origin/main 403a9a537.

    Setup: a fresh local stack with its own PostgreSQL, egress to a dead proxy and Chromium 1208. A new org opens Settings → AI providers → Add credential on a cold backend cache, followed by a warm control. This is the replay of p2-catalog-pending.ts from the original run.

    Run GET /providers/catalogs Inside the dialog while pending Vendors shown
    Cold 02:21:58.168 → 02:22:10.288 (12.1 s) A loading skeleton (role=status, aria-busy, "Loading content") from +0 to +10,979 ms. "This deployment ships no provider files" never appears +11,238 ms
    Warm 145 ms No skeleton, no alert at once

    Before the fix, under the same conditions, the dialog showed the misconfiguration alert from +10 ms to about +11 s, in two runs.

    Evidence is in TALE-358's r20261004T0415 deliverables: scripts/x3-catalog-pending-recheck.ts, evidence/x3-catalog-pending-recheck.log and evidence/x3/cold-while-pending.png.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions