Skip to content

Keep asking for the included AI status on hosted builds - #1988

Closed
joepio wants to merge 1 commit into
developfrom
claude/project-thread-ql4r7g
Closed

joepio wants to merge 1 commit into
developfrom
claude/project-thread-ql4r7g

Conversation

@joepio

@joepio joepio commented Oct 2, 2026

Copy link
Copy Markdown
Member

Requested by Joep · project thread

Before: On production saas the AI chat could show "No OpenRouter API key is set" (the FOSS notice) even though saas has included credits.

After: The included-AI status is asked for again, with backoff, until the control plane answers, and a hosted build never tells people to find an OpenRouter key; it says Included AI isn't reachable and to reload.

Cause: useHostedAI read /ai/status once at mount. A read that was too early (session still settling), got 401/404, or failed was final, so hostedAI stayed undefined, the chat fell back to the stored OpenRouter default model, and showed the BYOK notice. Only a window focus event retried. I could not reach production from here, so this fixes the one-shot read; if the notice persists after a reload, the saas deployment's ATOMIC_SAAS_AI_OPENROUTER_KEY is the next thing to check (enabled is false without it).

How: retries at 1.5s, 4s, 10s, 30s while no status is known and a managed API exists (FOSS builds do not retry); focus resets the count. isHostedDistribution() picks the notice text. Test added to useHostedAI.test.tsx; .po catalogs updated for the one new string.

No UI layout change, only the text of one notice, so no screenshot.


Generated by Claude Code

… hosted builds

The status was read once at mount; a read that came too early or failed left the chat on the bring-your-own-key path with a 'No OpenRouter API key' notice for the rest of the session. Retry with backoff while the control plane has not answered, and on a hosted build never point people at OpenRouter.
joepio added a commit that referenced this pull request Oct 5, 2026
… chat, search, CI) (#2060)

Combines #1530, #1638, #1663, #1835, #1869, #1896, #1898, #1911, #1912, #1913, #1914, #1918, #1919, #1929, #1931, #1949, #1958, #1959, #1961, #1963, #1968, #1975, #1981, #1985, #1988, #2038, #2041, #2047 and #2050, tested in one full Mancave run on the exact head (run 4999, green).

joepio commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

Landed on develop in the combined batch #2060 (95707c0), tested together in one full run. Closing as included.


Generated by Claude Code

@joepio joepio closed this Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant