[GH-ISSUE #4840] [Engine] Direction: which vLLM and SGLang API extensions are worth adding for local coding agents? #2223

Open
opened 2026-11-04 01:57:38 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @gdevenyi on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4840

Area

[Engine] (speed, kernels, models, the server and API)

What do you want to do?

I am asking for direction: which vLLM and SGLang API extensions are worth adding to Strata, if any? I ranked them by value for one person running a coding agent against a local model.

This comes from reading source. Nothing was run against vLLM or SGLang. I read vLLM at 7b77ed5 and SGLang at fb9846d, and searched Strata's serve/ at c62d5e3a. Treat every "Strata does not have this" as unconfirmed static analysis. The value ratings are my judgment. None is measured. I left out what Strata already has.

Most of the value is in rows 1 to 4 below, and those already have threads. For those, the useful step is probably review, not new work.

ignore_eos has its own PR: #4837, [Engine] add vLLM's ignore_eos request field, as server-side continuation. It is not part of this question.

With an open thread that covers it

# Extension Why it helps, or does not Value Effort Engine change? Threads
1 Constrained decoding: grammar, regex, structural_tag, constrained tool calls Malformed tool calls are a recurring failure on low-bit quants. The value is in the engine work. The request field names add little, because agents do not send them. High Large Yes #4113, #3800, #4222, #3862, #3758, with #4756 nearby. Closed: #2368, #3922, #1328
2 Deferred tools: defer_loading, tool_reference #4700 reports that Claude Code has tool search on by default with ANTHROPIC_BASE_URL. serve/frontend.py:226 leaves tool_reference out of the prompt. I did not capture a Claude Code trace. If it does not send these here, the value is low. High if confirmed Medium No #4700, #4663, #4622, #4621 (Responses only)
3 Output repetition detection, as in vLLM's repetition_detection A loop wastes minutes of a single GPU. This would end the loop, not fix its cause. A new finish reason could confuse a client, so it should be opt-in. High Medium No #3229, #4402, #4590, #4195
4 Context size on /v1/models (max_model_len), and GET /v1/models/{id} A client that guesses the window compacts too early or overflows. Medium Small No #1882, #3931, #4583, #3500, #4100, #4370
5 thinking field on chat Clients set up for DeepSeek's API send it, and thinking stays on. Medium Small No #4638
6 Request priority On one slot, a helper request can hold up the live turn. Agents do not send a priority, so a server rule like #4487 would help more than a field. Interrupting a prompt read already running needs the engine. Medium for the rule, low for the field Medium Rule no, interrupting yes #4487, #2822, #2275, #4596
7 /v1/completions, then token-id prompts, echo and suffix Agents use chat. This helps raw-prompt scripts and tab completion. Whether these models do useful infill was not tested. Low for agents Medium, token ids small No #3332, #4056 (mine), #2277
8 vLLM's thinking_token_budget name #3340 already adds this exact name. Low Small No #3340, #2140
9 stream_options.continuous_usage_stats Live counters. No agent here is known to ask. Only worth adding after #2870. Low Small No #2870
10 /v1/score, /v1/decisions For classification scripts, not agents. #4059 limits it until logprobs repeat. Low Medium No #3743, #3643, #4604 (mine), #4059 (mine)
11 session_id In vLLM it only labels cache events. It might keep a conversation on its slot, but I did not check whether prefix matching fails for lack of it. Low Medium No #4487, #4596, #2518

With no open thread that asks for it

# Extension Why it helps, or does not Value Effort Engine change? Threads, closed or only related
1 /v1/tokenize, /v1/detokenize Exact counts for OpenAI-side clients and scripts, and token ids for logit_bias. Today only /v1/messages/count_tokens counts. Agents here do not depend on it. Medium Small No Closed by housekeeping, which the note on #3260 says is not a rejection: #3260, #2820. Also closed: #1626
2 Prompt render: /v1/chat/completions/render, return_prompt_text Comparing two turns' prompts would show where a client breaks the prefix, which costs a long re-read. It serves people debugging, not agents directly. Medium Small No Related: #3998, #4374, #4071
3 Opt-in request dump to disk, for replay A bug reporter could attach the real conversation. It must stay off by default, because it stores prompts. Use JSON lines, not SGLang's pickle files. Medium Small No Related: #4673, #4059
4 continue_final_message, DeepSeek's prefix: true Same gap as Anthropic prefill. It is more than a flag: the reasoning parser and the stop matcher must handle a turn that starts mid-answer. Low to medium Medium No Closed: #1966, #1950, #822, #3356
5 parallel_tool_calls: false honoured vLLM documents it. I did not confirm that any agent sends it. It is a row in my separate report of ignored fields. Low to medium Small No None
6 reasoning field name, include_reasoning A client that echoes reasoning could lose thinking from history and miss the prefix. I found no client that does this, so check first. Low to medium Small No Related: #4177, #4638
7 matched_stop, stop_token_ids Agents do not send these. matched_stop is the cheapest, and could help diagnose stop bugs. Low Small No Related: #4035, #2236
8 Request id: X-Request-Id, rid, an abort route Ties a client's failure to a server log line. Agents cancel by closing the connection, which works. An abort route would need auth. Low Small No Related: #4740, #2481, #3675, #3686
9 completion_tokens_details.reasoning_tokens on chat Optional in the spec, and no client is shown to need it. It changes the default reply, and the simple one-line version is wrong on MCP turns. Low Small No Closed: #4502, #4606. Near, but adding no such field: #2870, #4788, #4232
10 return_token_ids, input_ids on chat For people chasing cache misses and tokenizer bugs. Low Small No Related: #1536
11 separate_reasoning, stream_reasoning For a client that shows nothing while reasoning streams. No thread asks. Low Small No None
12 /flush_cache Helps benchmarks and T=0 reproduction without a reload. Normal use wants the cache kept. Low Small Yes Closed: #3745. Related: #4673
13 /v1/embeddings, /v1/rerank A plain forward saves some configuration. A separate embedding server already does the job. Low Small to forward Forward no, native yes Closed: #1807, #3260, #2820
14 Ollama routes: /api/chat, /api/generate, /api/tags, /api/show The agents I looked at speak OpenAI or Anthropic. Consider it only if a user asks. Low Medium No None

What I am asking. Which rows, if any, would you take? A yes or no per row is enough. I will not open a PR from the second table without a yes, and I would not start on the first table where a PR is already open.

What do you do today instead?

  • Tokens: /v1/messages/count_tokens, or a local tokenizer.
  • Thinking off on chat: reasoning_effort or chat_template_kwargs, where the client can set them.
  • Seeing requests: --api-monitor, which keeps the newest 100 in memory.
  • Clearing the cache: POST /unload, then /load.

Written with an AI agent (Claude Code), which read both code bases and searched the threads.

🤖 Generated with Claude Code

https://claude.ai/code/session_01W53iURzvDQMjnYemag8uvv

Originally created by @gdevenyi on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4840 ### Area [Engine] (speed, kernels, models, the server and API) ### What do you want to do? I am asking for direction: which vLLM and SGLang API extensions are worth adding to Strata, if any? I ranked them by value for one person running a coding agent against a local model. **This comes from reading source. Nothing was run against vLLM or SGLang.** I read vLLM at `7b77ed5` and SGLang at `fb9846d`, and searched Strata's `serve/` at `c62d5e3a`. Treat every "Strata does not have this" as unconfirmed static analysis. The value ratings are my judgment. None is measured. I left out what Strata already has. Most of the value is in rows 1 to 4 below, and those already have threads. For those, the useful step is probably review, not new work. **`ignore_eos` has its own PR:** #4837, `[Engine] add vLLM's ignore_eos request field, as server-side continuation`. It is not part of this question. **With an open thread that covers it** | # | Extension | Why it helps, or does not | Value | Effort | Engine change? | Threads | | --- | --- | --- | --- | --- | --- | --- | | 1 | Constrained decoding: grammar, regex, `structural_tag`, constrained tool calls | Malformed tool calls are a recurring failure on low-bit quants. The value is in the engine work. The request field names add little, because agents do not send them. | High | Large | Yes | #4113, #3800, #4222, #3862, #3758, with #4756 nearby. Closed: #2368, #3922, #1328 | | 2 | Deferred tools: `defer_loading`, `tool_reference` | #4700 reports that Claude Code has tool search on by default with `ANTHROPIC_BASE_URL`. `serve/frontend.py:226` leaves `tool_reference` out of the prompt. I did not capture a Claude Code trace. If it does not send these here, the value is low. | High if confirmed | Medium | No | #4700, #4663, #4622, #4621 (Responses only) | | 3 | Output repetition detection, as in vLLM's `repetition_detection` | A loop wastes minutes of a single GPU. This would end the loop, not fix its cause. A new finish reason could confuse a client, so it should be opt-in. | High | Medium | No | #3229, #4402, #4590, #4195 | | 4 | Context size on `/v1/models` (`max_model_len`), and `GET /v1/models/{id}` | A client that guesses the window compacts too early or overflows. | Medium | Small | No | #1882, #3931, #4583, #3500, #4100, #4370 | | 5 | `thinking` field on chat | Clients set up for DeepSeek's API send it, and thinking stays on. | Medium | Small | No | #4638 | | 6 | Request priority | On one slot, a helper request can hold up the live turn. Agents do not send a priority, so a server rule like #4487 would help more than a field. Interrupting a prompt read already running needs the engine. | Medium for the rule, low for the field | Medium | Rule no, interrupting yes | #4487, #2822, #2275, #4596 | | 7 | `/v1/completions`, then token-id prompts, `echo` and `suffix` | Agents use chat. This helps raw-prompt scripts and tab completion. Whether these models do useful infill was not tested. | Low for agents | Medium, token ids small | No | #3332, #4056 (mine), #2277 | | 8 | vLLM's `thinking_token_budget` name | #3340 already adds this exact name. | Low | Small | No | #3340, #2140 | | 9 | `stream_options.continuous_usage_stats` | Live counters. No agent here is known to ask. Only worth adding after #2870. | Low | Small | No | #2870 | | 10 | `/v1/score`, `/v1/decisions` | For classification scripts, not agents. #4059 limits it until logprobs repeat. | Low | Medium | No | #3743, #3643, #4604 (mine), #4059 (mine) | | 11 | `session_id` | In vLLM it only labels cache events. It might keep a conversation on its slot, but I did not check whether prefix matching fails for lack of it. | Low | Medium | No | #4487, #4596, #2518 | **With no open thread that asks for it** | # | Extension | Why it helps, or does not | Value | Effort | Engine change? | Threads, closed or only related | | --- | --- | --- | --- | --- | --- | --- | | 1 | `/v1/tokenize`, `/v1/detokenize` | Exact counts for OpenAI-side clients and scripts, and token ids for `logit_bias`. Today only `/v1/messages/count_tokens` counts. Agents here do not depend on it. | Medium | Small | No | Closed by housekeeping, which the note on #3260 says is not a rejection: #3260, #2820. Also closed: #1626 | | 2 | Prompt render: `/v1/chat/completions/render`, `return_prompt_text` | Comparing two turns' prompts would show where a client breaks the prefix, which costs a long re-read. It serves people debugging, not agents directly. | Medium | Small | No | Related: #3998, #4374, #4071 | | 3 | Opt-in request dump to disk, for replay | A bug reporter could attach the real conversation. It must stay off by default, because it stores prompts. Use JSON lines, not SGLang's pickle files. | Medium | Small | No | Related: #4673, #4059 | | 4 | `continue_final_message`, DeepSeek's `prefix: true` | Same gap as Anthropic prefill. It is more than a flag: the reasoning parser and the stop matcher must handle a turn that starts mid-answer. | Low to medium | Medium | No | Closed: #1966, #1950, #822, #3356 | | 5 | `parallel_tool_calls: false` honoured | vLLM documents it. I did not confirm that any agent sends it. It is a row in my separate report of ignored fields. | Low to medium | Small | No | None | | 6 | `reasoning` field name, `include_reasoning` | A client that echoes `reasoning` could lose thinking from history and miss the prefix. I found no client that does this, so check first. | Low to medium | Small | No | Related: #4177, #4638 | | 7 | `matched_stop`, `stop_token_ids` | Agents do not send these. `matched_stop` is the cheapest, and could help diagnose stop bugs. | Low | Small | No | Related: #4035, #2236 | | 8 | Request id: `X-Request-Id`, `rid`, an abort route | Ties a client's failure to a server log line. Agents cancel by closing the connection, which works. An abort route would need auth. | Low | Small | No | Related: #4740, #2481, #3675, #3686 | | 9 | `completion_tokens_details.reasoning_tokens` on chat | Optional in the spec, and no client is shown to need it. It changes the default reply, and the simple one-line version is wrong on MCP turns. | Low | Small | No | Closed: #4502, #4606. Near, but adding no such field: #2870, #4788, #4232 | | 10 | `return_token_ids`, `input_ids` on chat | For people chasing cache misses and tokenizer bugs. | Low | Small | No | Related: #1536 | | 11 | `separate_reasoning`, `stream_reasoning` | For a client that shows nothing while reasoning streams. No thread asks. | Low | Small | No | None | | 12 | `/flush_cache` | Helps benchmarks and T=0 reproduction without a reload. Normal use wants the cache kept. | Low | Small | Yes | Closed: #3745. Related: #4673 | | 13 | `/v1/embeddings`, `/v1/rerank` | A plain forward saves some configuration. A separate embedding server already does the job. | Low | Small to forward | Forward no, native yes | Closed: #1807, #3260, #2820 | | 14 | Ollama routes: `/api/chat`, `/api/generate`, `/api/tags`, `/api/show` | The agents I looked at speak OpenAI or Anthropic. Consider it only if a user asks. | Low | Medium | No | None | **What I am asking.** Which rows, if any, would you take? A yes or no per row is enough. I will not open a PR from the second table without a yes, and I would not start on the first table where a PR is already open. ### What do you do today instead? - Tokens: `/v1/messages/count_tokens`, or a local tokenizer. - Thinking off on chat: `reasoning_effort` or `chat_template_kwargs`, where the client can set them. - Seeing requests: `--api-monitor`, which keeps the newest 100 in memory. - Clearing the cache: `POST /unload`, then `/load`. *Written with an AI agent (Claude Code), which read both code bases and searched the threads.* 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01W53iURzvDQMjnYemag8uvv
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2223
No description provided.