[Frontend] Add routed-experts prompt offset (#51906)

Signed-off-by: aoshen02 <aoshen@inferact.ai>
Co-authored-by: OpenAI Codex <codex@openai.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
aoshen02
2026-08-13 08:09:00 -07:00
committed by GitHub
co-authored by OpenAI Codex mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent f3c1638927
commit 7553aac77b
13 changed files with 114 additions and 61 deletions
@@ -87,6 +87,20 @@ class TestChatCompletionStopTokenIds:
assert set(sampling_params.stop_token_ids) == {42, 43}
def test_routed_experts_prompt_start_is_forwarded(self):
request = ChatCompletionRequest(
model="test-model",
messages=[{"role": "user", "content": "hello"}],
routed_experts_prompt_start=3,
)
sampling_params = request.to_sampling_params(
max_tokens=100,
default_sampling_params={},
)
assert sampling_params.routed_experts_prompt_start == 3
def test_duplicate_stop_token_ids_deduplicated(self):
"""Overlapping stop_token_ids between client and server are deduplicated."""
request = ChatCompletionRequest(