Repository navigation
serve: APIs serving GLM-5.3-Flash #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Changes from all commits
4574c72
c291db0
a5cccf3
6ae2627
6d9624c
6c4742b
78a6657
6499230
90f3489
9ec5c03
4d31cc4
add1f5a
25f0638
ed062bd
c266857
4dd3c23
1d1a2ca
19007a6
e31210d
940906d
b032df6
ca95b73
fe8ec67
5b143f3
0d3196d
3a4e66b
89bf2d0
cbea0e7
49ac78a
7b3d732
a6b706e
5d9b04a
b48a20a
5616251
e03c388
2738810
be62363
343d382
432984d
6d5fbd4
f5cebf0
2260b1e
0a33489
b749205
0733cf3
b369cef
1423c26
6a175a9
0813a99
0216b16
3ad110f
f79e05f
08066bb
384dc7b
70a7c08
5ccb6c2
63558eb
93d2b95
fa4f723
cd7c970
5cd0cdc
aa09c62
d00a260
d28e55f
de932cb
87fdaab
c2c6b3f
ee5dfba
1c1abf3
527629d
0278f19
f82171b
e9edecc
c6c5d28
44bd97e
37c69f7
c263235
209ff58
a7a1815
ca8e21c
8af20d4
feb1dc9
5e65beb
6498f25
e8d49ba
b828f26
df4e114
6f5e50f
8396aad
d24e30e
9f71710
09309b5
57280c5
6d4de83
2f02ca1
516bb6e
16bd92f
f11440b
6e71686
bdfb979
b938e2a
70e3b0a
1256eca
cc44d05
203e2f3
b70a2cd
2ad4a41
7b04d89
a3d733a
98d789a
ef42376
1c55ff3
4fb4abf
0a258ae
0275700
044db74
b1ea9d1
cb9b00c
e248ad0
4edc3d4
b55a7e3
42002c1
b4c32af
4caa4c7
e3b96ec
e873916
75a574e
b12d200
f9e6859
acc141d
905c6b8
a3d26ca
e6820a5
cf9b646
f91a6be
e025304
0f4c18c
74a92bd
a089e84
f1b268d
d1b5b88
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,58 @@ and versions follow [Semantic Versioning](https://semver.org/). Rebuild the comp | |
|
|
||
| ## [Unreleased] | ||
|
|
||
| ### Added | ||
|
|
||
| - `/tokenize` and `/detokenize` (also under `/v1`), as SGLang and vLLM serve them. A chat request is counted exactly as | ||
| `/v1/chat/completions` would send it to the engine. The router sends them to any live engine without touching its | ||
| routing state ([docs/API.md](docs/API.md)). | ||
| - SGLang's native `/generate` (also PUT): `text` or `input_ids`, one prompt or a batch, SGLang's `sampling_params`, | ||
| streaming, output logprobs and request ids. The router routes it by its prompt or session | ||
| ([docs/API.md](docs/API.md#generate)). | ||
| - SGLang's `/model_info`, `/server_info`, `/get_load`, `/health_generate`, `/abort_request` and `/flush_cache` (and | ||
| their `get_` names), on each engine and on the router, which asks one engine or all of them | ||
| ([docs/API.md](docs/API.md#info-and-admin-endpoints)). | ||
| - `n` choices on `/v1/chat/completions` and `/v1/completions`, sharing the prompt through the prefix cache; a seed gives | ||
| choice i `seed + i`, as in vLLM ([docs/API.md](docs/API.md#sampling-extras)). | ||
| - SGLang's `stop_regex`, and keeping the stop text with `include_stop_str_in_output` (vLLM) or `no_stop_trim` (SGLang). | ||
| - `skip_special_tokens: false`, and SGLang's `matched_stop` on every finished choice. | ||
| - `stop_regex` refuses a pattern whose search can take exponential or polynomial time, and matches within the last | ||
| 2048 characters of output. | ||
| - SGLang's `no_logs` on `/generate`: the request's record stays out of the production log. | ||
| - The OpenAI Responses API, `POST /v1/responses`, stateless: reasoning, message and function-call items, and the | ||
| Responses stream events ([docs/API.md](docs/API.md#responses-api)). | ||
| - The Anthropic Messages API, `POST /v1/messages` and `/v1/messages/count_tokens`: thinking, text and tool-use blocks, | ||
| Anthropic's stream events and error shape ([docs/API.md](docs/API.md#anthropic-messages-api)). | ||
| - The router routes `/v1/responses` and `/v1/messages` by session and prefix as it routes chat, and sends | ||
| `/v1/messages/count_tokens` to any live engine. | ||
| - Scheduling flags with SGLang's names, host only and per engine: `--schedule-policy` (`fcfs`, `lpm`, `lof`, `spf`), | ||
| priority scheduling with the request field `priority` and priority preemption, `--max-queued-requests` and | ||
| `--max-queued-tokens` (a full queue answers 503), and `--radix-eviction-policy` (`lru`, `lfu`, `slru`, `priority`, | ||
| `tlru`). The defaults schedule as before ([docs/CONFIGURATION.md](docs/CONFIGURATION.md#scheduling)). | ||
| - `GET /v1/stats` adds the engine's live state and request rates, TTFT, decode-speed and end-to-end percentiles over | ||
| recent windows, and `GET /dashboard` draws them; the router serves both for each engine | ||
| ([docs/API.md](docs/API.md#statistics-and-the-dashboard)). The fields the router reads are unchanged. | ||
| - `TRNRT_PROD_DIR`: an opt-in on-disk log of request records (counts and times only) and gauges. | ||
| - `TRNRT_PROMPT_CACHE_MB`: an opt-in prompt token cache that builds a chat turn's prompt ids from the previous turn's, | ||
| with the same ids as a full encode or none. | ||
| - Structured outputs through xgrammar, an optional dependency: `response_format` `json_object` and `json_schema`, vLLM's | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: These Added entries announce the graph variants as complete, but the PR description states the new graph variants have not been validated on Trainium2 and that graph-equivalence evidence is still pending. AGENTS.md invariant 1 requires Prompt for AI agents |
||
| `guided_*` and `structured_outputs`, and SGLang's `json_schema`, `regex` and `ebnf`. Also `min_tokens` and | ||
| `thinking_token_budget`. They need `--structured-outputs`, which adds graphs that take a token mask | ||
| ([docs/API.md](docs/API.md#structured-outputs-penalties-and-thinking-budgets)). Tested on CPU; not yet run on | ||
| Trainium2, and the check that the default graphs are unchanged is pending. | ||
| - Repetition, frequency and presence penalties, with `--penalties` and `--penalty-buckets`, which add graphs that take | ||
| penalty inputs ([docs/CONFIGURATION.md](docs/CONFIGURATION.md#structured-outputs-penalties-and-thinking-budgets)). | ||
| Tested on CPU; not yet run on Trainium2. | ||
|
|
||
| ### Changed | ||
|
|
||
| - The stop token that ends a request (EOS or a `stop_token_ids` entry) is no longer part of its text when the tokenizer | ||
| does not mark it special, as in vLLM and SGLang. | ||
| - `min_new_tokens` (SGLang's name for `min_tokens`) and `spaces_between_special_tokens: false` are refused with 400; | ||
| they were ignored. | ||
| - `service_tier` other than `"auto"` or `"default"` is refused with 400 on `/v1/chat/completions`, `/v1/completions` | ||
| and `/v1/responses`. | ||
|
|
||
| ## [0.1.0] - 2026-11-08 | ||
|
|
||
| The first public release. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: Clarify that the 2048-character limit applies to the match start, not the complete match. Unbounded patterns can extend beyond that window.
Prompt for AI agents