Skip to content

Comments

Fix health server initialization with None port in ModelRunner#946

Closed
Copilot wants to merge 2 commits intoPR-1160-inference-info-removal-for-local-runnersfrom
copilot/sub-pr-911
Closed

Fix health server initialization with None port in ModelRunner#946
Copilot wants to merge 2 commits intoPR-1160-inference-info-removal-for-local-runnersfrom
copilot/sub-pr-911

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

Why

Tests pass health_check_port=None to disable the health server, but ModelRunner.__init__() unconditionally calls start_health_server_thread() with the port value, causing TypeError: 'NoneType' object cannot be interpreted as an integer during socket binding.

How

Added conditional check before starting health server thread:

# Only start health server if a port is specified
if health_check_port is not None:
    start_health_server_thread(port=health_check_port, address='')

Tests

Fixes existing tests in test_runners.py and test_runners_proto.py that explicitly pass health_check_port=None.

Notes

The parameter type hint Union[int, None] already indicated this should be optional, but the implementation didn't respect None values.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: ackizilkale <10406054+ackizilkale@users.noreply.github.com>
Copilot AI changed the title [WIP] Update model configuration for inference compute info Fix health server initialization with None port in ModelRunner Feb 13, 2026
Copilot AI requested a review from ackizilkale February 13, 2026 13:46
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.

2 participants