Skip to content

fix(serve): report the decision server's bound port - #259

Draft
shubhamsinnh wants to merge 1 commit into
RunanywhereAI:mainfrom
shubhamsinnh:fix/serve-assigned-port
Draft

shubhamsinnh wants to merge 1 commit into
RunanywhereAI:mainfrom
shubhamsinnh:fix/serve-assigned-port

Conversation

@shubhamsinnh

@shubhamsinnh shubhamsinnh commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

The decision server accepted --port 0 but printed URLs containing :0, rather than the port assigned by the OS.

Both advertised URLs now use the bound port from listener.local_addr(). This fixes the decision server only; the LLM server still needs an SDK change to report its assigned port.

With a real decision model, the reported non-zero port accepted connections, and both /health and /v1/decisions returned 200.

CI and formatting pass. The local full suite had 565 passes and two Windows symlink-privilege failures. Strict Clippy reports four pre-existing lints in untouched files.


Summary by cubic

Fixes the decision server advertising :0 when started with --port 0. The server now reads the port the OS actually assigned from listener.local_addr() and advertises it in both the /v1/decisions and /health endpoints.

  • The change is scoped to the decision server; the LLM serve path still reports :0 because it's owned by the pinned SDK.
  • The requested host text and all other serve behavior are unchanged.

Written for commit af8d94c. Summary will update on new commits.

View guided diff

The decision server accepted --port 0 but printed the requested port, so
startup advertised :0 instead of the port the OS assigned.

Read the bound port from the listener's local_addr() and use it in the
advertised endpoints. The requested host text and all other serve
behavior are unchanged.

Validated with the GLiNER 2.5 Decide model: --port 0 advertised and
listened on the same non-zero port; /health and /v1/decisions both
answered on it. The LLM path is SDK-owned and still reports :0; this
change does not claim to fix that path.
@coderabbitai

coderabbitai Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
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