mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #122] [MERGED] serve: add llama.cpp-compatible discovery endpoints #2469
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2469
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/122
Author: @hendrikp
Created: 9/29/2026
Status: ✅ Merged
Merged: 9/29/2026
Merged by: @Niko1221
Base:
main← Head:fix/117-discovery📝 Commits (1)
d9fba59serve: add llama.cpp-compatible discovery endpoints📊 Changes
4 files changed (+133 additions, -6 deletions)
View changed files
📝
docs/DETAILS.md(+5 -2)📝
serve/frontend.py(+2 -1)📝
serve/server.py(+46 -3)📝
serve/test_server.py(+80 -0)📄 Description
Fixes #117.
Add read-only metadata endpoints so clients such as Pi can discover the loaded model, context capacity, and thinking/image capabilities without receiving a 404 from
/props./modelsand/v1/modelslist only the loaded model, including its status, context limit, and input/output modalities./propsexposes the original chat template, configured generation defaults, context limit, model path, and engine version./slotsreports the single processing slot and its busy/idle state.Context capacity reflects the full configured context, not the smaller resident KV window. Image support is reported only when the vision component is loaded. Unconfigured sampling fields are omitted; shared settings take precedence over configuration defaults.
/props?model=<loaded-model-id>&autoload=falseis supported. Unknown models return 404. When the engine has stopped, model/slot lists are empty and/propsreturns 503.Example responses
Examples from a loaded, idle Q2 model with a 262,144-token context and vision disabled. The chat template is shortened for readability and the model path is replaced with a generic example.
GET /models(alsoGET /v1/models)GET /propsn_predict: -1means there is no fixed output cap beyond the remaining context. With a loaded vision component,/modelsreportsinput_modalities: ["text", "image"]and/propsreportsmodalities.vision: true.GET /slotsis_processingbecomestruewhile the slot is processing a request.Validation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.