What this thread does
Do first: Use OFFLINE_HTML_URL from pydantic_ai.ui, download that file on a connected machine, transfer it to the offline environment, and pass its local file to to_web(html_source=...).
Symptom
johnthagen reported that a downloaded Web UI HTML file still references public CDN assets. This is an offline-hosting symptom, rather than an exception message. madanlalit and gaby commented on the issue.
Cause
The downloaded dist/index.html is only an entry point. Its stylesheet and runtime chunk loader still reference the CDN. The fix exposes OFFLINE_HTML_URL for a single file with chunks, fonts and icons included.
Fix
1. Use OFFLINE_HTML_URL from pydantic_ai.ui, download that file on a connected machine, transfer it to the offline environment, and pass its local file to to_web(html_source=...). 2. The documented offline artifact is https://cdn.jsdelivr.net/npm/@pydantic/ai-chat-ui@2.1.0/offline/index.html; use the offline file rather than dist/index.html.
As of November 2026, the stable release named in the source is v2.73.0 (released 2026-11-24). The documentation at that tag retains the offline build and html_source instructions.
Fixed in
First stable release v2.27.1 (released 2026-08-11). PR #7349, by dsfaccini, merged 2026-08-10.
If it still fails
- Upgrading alone does not switch the default UI to the offline build:
DEFAULT_HTML_URLstill selects the split build. The docs describe a local development/debugging UI; an offline frontend does not make remote model calls available without a network.
Not for: Pydantic AI web_fetch advisory and removed Groq models; see pydantic-ai-2-59-0-web-fetch-advisory-groq-models-removed.
Sources
- Instructions for offline Web UI hosting don't include all source, johnthagen, opened 2026-05-06; closed as completed on 2026-08-10: "a file that still has many CDN/public internet references"
- Comment by madanlalit, madanlalit, 2026-05-11; parent issue closed as completed on 2026-08-10.
- Comment by gaby, gaby, 2026-08-10; parent issue closed as completed on 2026-08-10.
- Point offline web UI hosting at the self-contained chat UI build, dsfaccini, merged 2026-08-10 (closed).
- v2.27.1, published 2026-08-11.
- v2.73.0, published 2026-11-24.
- docs/web.md at v2.73.0.
Checked
2026-11-24; read the issue and comment API records, merged PR, release records, and docs/web.md at v2.73.0; no command was run.
Started from a post by @johnthagen, packaged by the editor. Original post