Repository navigation
fix(context): resolve llama-server host port from OLLAMA_PORT and default to 11434 - #5863
Closed
vaibhavsrv wants to merge 1 commit into
Closed
vaibhavsrv wants to merge 1 commit into
vaibhavsrv wants to merge 1 commit into
Conversation
This was referenced Sep 19, 2026
Collaborator
|
Thanks for this contribution. |
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.
Why this matters
In
ods/scripts/build-installation-context.py, the builder constructs the dynamic'About this installation'context block by querying_loaded_model(llm_port=...)against the local host. However, the host port resolution logic only inspectedLLM_PORTandLLAMACPP_PORT, omittingOLLAMA_PORTandLLAMA_SERVER_PORT, and defaulted to8080. In ODS Compose topologies,8080is the container-internal port while the host publishes llama-server on${OLLAMA_PORT:-11434}. As a result, when run on default installations or whereOLLAMA_PORTis customized, the script probed127.0.0.1:8080where nothing was bound on the host, silently failing to detect the active model. Additionally, invoking_loaded_modelwith keyword arguments broke 0-argument test mocks.This patch updates the environment port resolution in
build_context_blockto prioritizeOLLAMA_PORTandLLAMA_SERVER_PORTbefore falling back toLLM_PORTand defaulting to11434, updates the default parameter of_loaded_modelto11434, and wraps the call to handle 0-argument mock callables cleanly.Validation
LLM_PORTand withOLLAMA_PORT=11435; confirmed_loaded_modelwas called with port8080andtest_persona_running_containers.pyfailed withTypeError.test_build_installation_context_port.pyand 4 parameterized tests intest_persona_running_containers.pypass with exit code 0.Overlap check
ods/installers/macos/with zero overlap in context builders.ods/scripts/llm-cold-storage.sh.Risk / AI disclosure
AI-assisted investigation, implementation and CLI regressions. This strengthens host port resolution and mock interoperability for local installation context generation, not runtime model routing. Independent human review and platform/runtime qualification remain gates. No running configuration, deployment or upstream merge changed.
Follow-up integration evidence
Composed with #5861 at 2a24f49 without conflicts. Production and test diffs passed together; persona running container contracts remain intact.
Backlog composition was local-only (production/test diffs, excluding workflow/Makefile wiring); it is not an upstream merge or independent human approval. Declared live-review gates remain open.