Skip to content

feat: announce the server on the local network - #1

Merged
avpbynf merged 3 commits into
devfrom
feat/announce-on-network
Oct 2, 2026
Merged

avpbynf merged 3 commits into
devfrom
feat/announce-on-network

Conversation

@avpbynf

@avpbynf avpbynf commented Oct 2, 2026

Copy link
Copy Markdown
Owner

What changes

The server announces itself on the local network over mDNS as _talk._tcp.local. once its model is loaded, so Talk clients can list it without anyone typing an address. It also answers GET /v1/models, OpenAI-compatible and behind the bearer token, which gives a client a cheap way to tell a refused token from a good one. MDNS_ENABLED=false turns the announcement off.

Why it was not already like that

New. The one fix in the branch is older: the Dockerfile and make dev passed --port 8000 to uvicorn whatever PORT said, which only mattered once the announcement started telling clients settings.PORT.

What proves it

  • ruff check, ruff format --check, mypy rest clean, 122 tests green with the coverage floor held. The discovery tests mock zeroconf and the adapters, nothing touches the network.
  • Not yet run on a real network or in a container.

What it leaves owing

Under Docker the announcement only leaves the container with network_mode: host, which the README says. Container bridges and virtual switches are left out of the record by adapter name, so an unusual virtual adapter could still be announced. Pairing, so a client gets a token without copying it, is the next branch.

Talk clients had to be given an address by hand. Announcing _talk._tcp over mDNS lets them discover the server on the LAN.
Both launchers passed --port 8000 to uvicorn whatever PORT said, so
the setting only applied to python -m rest.main. The network
announcement tells clients settings.PORT, which made the two have to
agree.
@avpbynf
avpbynf force-pushed the feat/announce-on-network branch from 49c30b5 to 03da012 Compare October 2, 2026 10:34
@avpbynf
avpbynf merged commit ba20a3d into dev Oct 2, 2026
5 checks passed
@avpbynf
avpbynf deleted the feat/announce-on-network branch October 2, 2026 17:09
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