Repository navigation
fix(windows): normalize native reasoning modes case-insensitively - #8153
Closed
vaibhavsrv wants to merge 1 commit into
Closed
vaibhavsrv wants to merge 1 commit into
vaibhavsrv wants to merge 1 commit into
Conversation
Map LLAMA_REASONING values case-insensitively in Get-ODSNativeReasoningArgs and Get-ODSNativeLlamaLegacyReasoning. When configured as OFF, Off, or AUTO in .env, normalize known modes to lowercase before checking flags so that llama-server is started with --reasoning off and --reasoning-budget 0 instead of retaining its default auto reasoning. Fixes Osmantic#7321
Contributor
Author
|
Closing: #8151 landed on main right before this. |
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.
Summary
Fixes #7321. Normalize native reasoning mode strings case-insensitively in
Get-ODSNativeReasoningArgsandGet-ODSNativeLlamaLegacyReasoning.install-windows.ps1andods.ps1read and mapLLAMA_REASONINGusing PowerShell's case-insensitive parameter semantics, and bothods-host-agent.py(.strip().lower()) andscripts/bootstrap-upgrade.sh(tr '[:upper:]' '[:lower:]') normalize the mode string to lowercase. However,Get-ODSNativeReasoningArgsinods/installers/windows/lib/native-llama-args.ps1compared the mode using case-sensitive-cin @("off", "on", "auto"), andGet-ODSNativeLlamaLegacyReasoninginods/installers/windows/lib/native-llama-legacy.ps1tested-ceq 'off'and-ceq 'on'.When an owner configured
LLAMA_REASONING=OFF,Off, orAUTOin.env, the case-sensitive checks failed to match. On binary b9014+ (which supports--reasoning), this fell through to emit only--reasoning-format OFFwhile omitting--reasoning offand--reasoning-budget 0. Becausellama-serverdefaults to--reasoning auto, thinking remained enabled and reasoning tokens leaked into normal replies. On binaries without--reasoning, passing uppercase--reasoning-format OFFcausesllama-serverto exit with an invalid format error.This fix normalizes
$valueand$modevia.ToLowerInvariant()when matched against the documented modes (off,on,auto). Any unrecognized value continues to pass through unchanged as a custom format name.AI Assistance
AI drafted the fix and tests and ran the checks. The human author did not review each line before submission.
Release Lane
release/2.6.xmainStable hotfix reason:
Changed Surface
native-llama-args.ps1andnative-llama-legacy.ps1.LLAMA_REASONING=OFFreliably disables thinking tokens in model responses.Risk And Validation
git diff --checkods/tests/test-windows-native-checkpoint-args.ps1.llama-servervariants (b9014--reasoning, b8248--reasoning-format/--reasoning-budget, format-only, and legacy).release/2.6.xCommands/results:
Operational Change Check
If this PR touches installer phases, bootstrap logic, compose stack generation,
service manifests, dashboard API control flows, Hermes, model routing, GPU or
runtime detection, lifecycle commands, host mutation, or network exposure, it
requires release-grade fleet validation before release unless the PR explains a
narrower equivalent.
Notes For Reviewers
main.llm-endpoint.ps1; zero overlap withnative-llama-args.ps1ornative-llama-legacy.ps1.wsl-portal-amd.ps1; zero overlap withnative-llama-args.ps1.AI-assisted investigation, implementation and CLI regressions. This strengthens CLI argument normalization, not runtime admission. Independent human review and platform/runtime qualification remain gates. No running configuration, deployment or upstream merge changed.
Composed with fix(windows): evaluate model readiness paths literally #8148 at 9b1eb11 without conflicts. Production and test diffs passed together; adjacent reasoning and checkpoint checks 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.