Repository navigation
fix(mode): keep host-native LLM installs on LiteLLM when switching to local - #7967
Conversation
… local On a Windows host-native install (NATIVE_LLM_BASE_URL set) the in-stack llama-server is profiled off and the installer routes LLM_API_URL and Hermes through LiteLLM. 'ods mode local' and scripts/mode-switch.sh rewrote both to http://llama-server:8080, a container that never starts, so chat and Hermes broke after the next restart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for keeping host-native local mode aligned with the installer's LiteLLM routing and preserving the switchboard override. Advisory status: not ready yet Quickest path to merge:
What I checked:
The routing change looks sound on this evidence; clearing or explaining that CI failure is the remaining step. |
|
Checked this one: with only the updated One overlap: #7843 also edits |
Summary
On a Windows host-native install (
NATIVE_LLM_BASE_URLset), the in-stackllama-serveris put behind thelocal-inferenceprofile and never starts (docker-compose.host-native-llm.yml). The installer therefore writesLLM_API_URL=http://litellm:4000and points Hermes athttp://litellm:4000/v1withLITELLM_KEY(installers/phases/06-directories.sh,_default_llm_api_url/_default_hermes_base_url).ods mode local(andscripts/mode-switch.sh local) ignored that and always wroteLLM_API_URL=http://llama-server:8080andHERMES_LLM_BASE_URL=http://llama-server:8080/v1. After the restart it asks for, dashboard chat and Hermes point at a container that is not running.Fix
In both
ods-clicmd_modeandscripts/mode-switch.sh, local mode readsNATIVE_LLM_BASE_URLfrom.env:.envLLM_API_URLHERMES_LLM_BASE_URL/ keyhttp://llama-server:8080llama-server:8080/v1/sk-ods-hermes-localhttp://litellm:4000litellm:4000/v1/LITELLM_KEYmodel-router:9099/v1/no-keyThese match what the installer writes for the same
.env.Validation
bash tests/test-mode-switch-status.sh: 25 passed. The 3 new native-LLM checks fail onmainand pass with the fix.bash -n ods-cli scripts/mode-switch.shgit diff --check upstream/main...HEADAI Assistance
AI-assisted (Claude Code). The author reviewed the change and the tests.
Release Lane
Patch: CLI behaviour fix, no new config.
Changed Surface
ods/ods-cli,ods/scripts/mode-switch.sh,ods/tests/test-mode-switch-status.sh.🤖 Generated with Claude Code
Maintainer integration validation
Updated to main
4906514c09bbe25351ad15e67a7c8659f4ad0b27and resolved the overlap with #7843, retaining both native LiteLLM routing and portable case folding. Exact updated head:20b5fa52f0512d86d92a0e9b1f83e5a24e69e782.The combined script passes all 34 cases on the physical Mac Mini's
/bin/bash3.2.57 and WSL Bash 5. An independent fixture using the real CLIcmd_mode, environment loader, and writer covers default, native, switchboard, native-plus-switchboard, and cloud routing: four native-route assertions fail on current main, while all 15 pass on this candidate. External lifecycle operations are stubbed in that fixture; installed configuration is not modified.A read-only probe from the real Mac dashboard-api container confirms that the old
llama-server:8080route is unreachable there, while authenticated LiteLLM/v1/modelsreturns HTTP 200 and the active local model aliases. This is native-backend transport evidence, not full Windows host-native qualification; the Mac does not use the WindowsNATIVE_LLM_BASE_URLprofile.The previous head's failed managed-project CI job passed on retry. All checks on the updated head remain required before merge. Scoped evidence here does not establish fleet green.
Tower2 assisted with review and the conflict resolution. Codex rejected unsupported review findings, verified the source contract, and independently ran the focused checks.
Live generated-route validation
On the physical Mac Mini's Bash 3.2, ran current-main and candidate mode-switch.sh against isolated host-native profiles, then used each generated Hermes URL and key for an actual completion from the installed dashboard-api container. Baseline generated llama-server:8080 and failed to connect. Candidate generated LiteLLM, preserved the gateway key, and returned HTTP 200 with the correct answer
4in 1.28 seconds. Installed configuration hashes remained unchanged. This validates the changed routing behavior against a real native backend; it does not claim full Windows host-native qualification.