Skip to content

Do not assume port on local-ai-use - #158

Open
danielholanda wants to merge 5 commits into
mainfrom
dholanda/local_ai_port
Open

Do not assume port on local-ai-use#158
danielholanda wants to merge 5 commits into
mainfrom
dholanda/local_ai_port

Conversation

@danielholanda

Copy link
Copy Markdown
Collaborator

Description

Ensure lemonade discovery works regardless of the port being used

@danielholanda

Copy link
Copy Markdown
Collaborator Author

Review From Sreeram (GitHub blocked, so could not add it here directly:

Reviewed & tested PR #158 (local-ai-use port discovery). Works as expected.

Tested on my laptop, with Lemonade 11.7.0 running on a non-default port (8040) - the setup the old code got wrong.

What I verified:
lemonade status --json → {"port":8040}; health check: 8040 → 200, 13305 → refused. So the old hardcoded-13305 code would have failed here.
The port regex correctly picks the service port 8040 and ignores the "WebSocket Port 9001" line in the same status output. .
End-to-end: Ran setup_local_ai.py with no --port → it auto-discovered 8040 and baked http://localhost:8040/ into all 11 endpoint URLs in AGENTS.md, zero references to 13305. Explicit --port override also works.
Image generation through the discovered 8040 endpoint also worked.

Suggested changes:
Documentation fix in reference.md : The remote-host section still says "firewall rules allow inbound 13305". Instead, wouldn't it be better to probably say "the port you chose."
resolve_port skips port discovery for any explicit --host, so pointing --host at your own machine via ::1/127.0.0.1 would fall back to 13305 instead of discovering. Unlikely in practice but worth considering.

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