# Allow agent to change speculative\_tokens in each request

**URL:** <https://discuss.vllm.ai/t/allow-agent-to-change-speculative-tokens-in-each-request/2997>\
**Category:** Speculative Decoding\
**Created:** [September 24, 2026, 3:04am UTC](https://discuss.vllm.ai/t/allow-agent-to-change-speculative-tokens-in-each-request/2997 "2026-09-24T03:04:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alindzon](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/alindzon/32/1762_2.png) [@alindzon](https://discuss.vllm.ai/u/alindzon)\
**Post date:** [September 24, 2026, 3:04am UTC](https://discuss.vllm.ai/t/allow-agent-to-change-speculative-tokens-in-each-request/2997/1 "2026-09-24T03:04:28Z")

</div>

It would be great if a request could fine tune num speculative\_tokens to be fewer for thinking work and higher for coding work. On engine init specifie the max, and on requests allow a lower value such as {

“extra\_body”: {

“speculative\_tokens”: 4

}

}

---

<div class="post-metadata">

**Author:** ![RunLLM](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/runllm/32/233_2.png) [@RunLLM](https://discuss.vllm.ai/u/RunLLM)\
**Post date:** [September 24, 2026, 3:04am UTC](https://discuss.vllm.ai/t/allow-agent-to-change-speculative-tokens-in-each-request/2997/2 "2026-09-24T03:04:40Z")

</div>

Per-request control of num\_speculative\_tokens is not currently supported in vLLM; the value is set at engine initialization via the --speculative-config argument and cannot be overridden per request. The feature you describe—allowing requests to specify a lower number of speculative tokens than the engine max—is a known limitation and has been requested by users, but as of now, there is no runtime API or documented parameter to achieve this behavior in vLLM v1.x or v0.x. The only available control is at engine startup, not per request, and attempts to set per-request speculative tokens are ignored or unsupported at runtime according to [Feature: Restore length-based speculation skip (speculative max\_model\_len) or per-request speculative decoding control in V1](https://github.com/vllm-project/vllm/issues/52258).

Would you like more detail on workarounds or related roadmap discussions?

Sources:

- [Feature: Restore length-based speculation skip (speculative max\_model\_len) or per-request speculative decoding control in V1](https://github.com/vllm-project/vllm/issues/52258)

Hint: Mention @Herald in the post for followups.
