mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3260] [Engine] add missing llama.cpp server endpoints (/tokenize, /completion, /embedding, /metrics) #1319
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#1319
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?
Originally created by @jeremyoha450 on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3260
Posible to add more of the llama outputs, etc? (i've add some myself. but other might like them too)
Token and template routes
POST /tokenize is missing upstream. A local patch adds it, plus /v1/tokenize, with with_pieces.
POST /detokenize is missing upstream. A local patch adds it, plus /v1/detokenize.
POST /apply-template is missing upstream. A local patch adds it, plus /v1/apply-template, including response_format schema text and input_tokens.
There is no llama.cpp-compatible add_special / BOS handling on tokenize.
There is no /tokenize of a chat message list without a separate apply-template call.
Native generation
POST /completion is missing, including the native stream fields content, stop, stop_type, tokens_predicted, tokens_evaluated, tokens_cached, and generation_settings.
POST /completions is missing.
POST /infill is missing.
POST /v1/completions is missing (legacy non-chat completions).
Embeddings and adapters
POST /embedding is missing.
POST /embeddings is missing.
POST /v1/embeddings is missing.
GET /lora-adapters is missing.
POST /lora-adapters is missing.
Slots and metrics
POST /slots/{id}?action=erase is missing. Save and restore exist.
Prometheus text on GET /metrics is missing. Strata’s /metrics is a different JSON document.
The llama.cpp timings object is missing from chat chunks: prompt_ms, predicted_ms, prompt_per_token_ms, predicted_per_token_ms, prompt_per_second, predicted_per_second.
@github-actions[bot] commented on GitHub (Oct 19, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
strata --version).Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@Niko1221 commented on GitHub (Oct 21, 2026):
Thanks for the list. Some of it is planned (the legacy
/v1/completions,/tokenizeand/embeddingroutes are on the API list; PR #2278 covers part)./metricsas Prometheus text and/slots/{id}?action=eraseare small. If you can share your local patch as a PR, we will review it. Which of the routes do you use most? That tells us what to do first.@Niko1221 commented on GitHub (Oct 22, 2026):
Thanks — following up: which of the routes do you use most, and can you share your local patch as a PR? That tells us what to do first; nothing else is needed from you.
@jeremyoha450 commented on GitHub (Oct 22, 2026):
ive only done Three routes, added to the server.py after the pull:
POST /tokenize and /v1/tokenize — text in, token ids out (with optional with_pieces).
POST /detokenize and /v1/detokenize — token ids in, text out.
POST /apply-template and /v1/apply-template — same render as a chat request, including response_format schema text, and optional input_tokens.
They sit next to /v1/messages/count_tokens in the routing block, and the three methods are _tokenize, _detokenize and _apply_template.Nothing else was changed in that file. The guards (repeat_stop_tokens, reasoning_loop_recovery) and reasoning_effort are config keys, not edits to .
the other i couldnt do as it involved too much editing other files
if you could do as much as you can it would be nice. i know a few other people wanted this as well they commented on previous posts i did before they wer closed/deleted.
@github-actions[bot] commented on GitHub (Oct 25, 2026):
Closing this issue because it still did not follow the format after 5 days. That is housekeeping, not a rejection.
To bring it back: fix the title (area prefix) and the missing parts, then comment
/reopen. A check runs and reopens it, or tells you what is still missing. See CONTRIBUTING.md.