fix(cli): advertise 127.0.0.1 for Agent UI to match bind host#1519
Conversation
gaia chat --ui binds the server to 127.0.0.1 but told users to open http://localhost:<port>. On Windows, localhost can resolve to IPv6 ::1 first and fail to connect to the IPv4-only listener, forcing users to manually retype the URL as 127.0.0.1. Align the advertised URL with the actual bind address. Closes #1471
Code ReviewApprove. This is a correct, minimal fix: the advertised URL now matches the actual bind host, fixing the Windows IPv6 ( Summary
Issues Found🟢 Minor — docs still advertise Strengths
VerdictApprove — ready to merge. The one minor note is an optional docs follow-up, not a blocker. |
The CLI fix in this PR aligned the console-advertised URL with the IPv4 bind host. The browser-open instructions in the UI docs had the same localhost->::1 gap on Windows; align them too.
|
Good catch on the docs — addressed in this PR rather than deferring. The four browser-open instructions ( |
gaia chat --uibinds the Agent UI server to127.0.0.1, but the console (and the docs) told users to openhttp://localhost:<port>. On Windows,localhostcan resolve to IPv6::1first and fail to connect to the IPv4-only listener — forcing users to manually retype the URL as127.0.0.1. This aligns every advertised URL with the actual bind address so the UI just opens.Closes #1471
Changes
src/gaia/cli.py): the three advertised-URL strings (log line + two prints) now use127.0.0.1instead oflocalhost, with a one-line comment naming the advertise-host == bind-host invariant.docs/guides/agent-ui.mdx,docs/deployment/ui.mdx) now advertise127.0.0.1:4200, closing the same::1gap a Windows user hits via the docs path. Addresses the review note on this PR. (Backend/API--backend/curl references are intentionally left aslocalhost— they're programmatic, not browser-open instructions.)Test plan
gaia chat --uiand confirm the printed URL ishttp://127.0.0.1:<port>and opens directly with no manual retyping.python util/lint.py --allpasses (no Python logic changed; string-only edit).