fix(agent): prefer /props over /v1/props for llama.cpp server detection#13539
Open
Tranquil-Flow wants to merge 2 commits into
Open
fix(agent): prefer /props over /v1/props for llama.cpp server detection#13539Tranquil-Flow wants to merge 2 commits into
Tranquil-Flow wants to merge 2 commits into
Conversation
Collaborator
|
Related to #13317 (open) which targets the same /props endpoint fix — may be a competing PR. |
1 similar comment
Collaborator
|
Related to #13317 (open) which targets the same /props endpoint fix — may be a competing PR. |
ac8fd87 to
f3bad1a
Compare
f3bad1a to
eef8c13
Compare
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.
What does this PR do?
llama.cpp exposes its properties endpoint at
/props(server root), not/v1/props. The code had the probe order reversed — trying/v1/propsfirst and falling back to/props. This caused detection failures or unnecessary latency when hitting current llama.cpp builds.Swaps the probe order in both:
detect_local_server_type()— server type detectionfetch_endpoint_model_metadata()— model metadata fetchingNow tries
/propsfirst (native llama.cpp path), with/v1/propsas fallback for older builds.Related Issue
Closes #13091
Type of Change
Changes Made
detect_local_server_type(): swap probe order — try/propsfirst, fall back to/v1/propsfetch_endpoint_model_metadata(): same swapHow to Test
/v1/propson 404, both-fail returns None, content validation (must containdefault_generation_settings), and/v1URL suffix normalization.Platform tested: macOS 15 (Apple Silicon).
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs