fix: respect gateway port from config file#1381
Closed
jasonQin6 wants to merge 2 commits intoHKUDS:mainfrom
Closed
fix: respect gateway port from config file#1381jasonQin6 wants to merge 2 commits intoHKUDS:mainfrom
jasonQin6 wants to merge 2 commits intoHKUDS:mainfrom
Conversation
The gateway command was using a hardcoded default port (18790) instead of reading from config.json. Now it properly reads config.gateway.port as the default, while still allowing --port CLI argument to override. Fixes #192
This was referenced Mar 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
nanobot gatewaycommand ignores thegateway.portsetting from the config file (~/.nanobot/config.json). The CLI--portoption has a hardcoded default value of18790, which always takes precedence over the config file setting.Root Cause
In
nanobot/cli/commands.py, thegatewayfunction:typer.Option(18790, ...)as the default port valueconfig.gateway.portfrom the loaded configurationSolution
--portoption default toNoneinstead of18790port or config.gateway.portto get the actual port--portcan still override itTesting
Related
GatewayConfig.portwith default18790innanobot/config/schema.py