- vendor openai-protocol 1.0.0 and add ReasoningEffort::None (serde "none")
so /v1/responses accepts the documented effort=none; sglang already maps
effort=none -> chat_template_kwargs.thinking=false.
- deserialize_tool_choice_compat: accept both
{"type":"function","name":"x"} (Responses spec) and the nested chat form,
normalizing to the nested ToolChoice::Function variant.
- harmony builder: handle the new None variant (no reasoning effort).
Fixes conformance R04 (effort=none 400) and R11 (flat tool_choice 400).
Verified against serving_chat.py/protocol.py on this branch: the engine
emits cached_tokens_details under top-level "sglext" (SglExt), omitted
entirely when all fields are None; ids-framed streams emit a standalone
choices=[] sglext chunk with no usage. extract_cached_breakdown now reads
sglext first (usage/top-level kept as fallbacks); strip_cached_details_from
removes the field from sglext and drops the emptied key; process_sse_chunk
pre-filters on "sglext" too and drops events that only carried stripped
fields. Adds 5 placement tests.
User directive 2026-10-12: 先严格429. When p2 hung, the fail-open fallback dumped
all classified traffic into the regular pool and drowned it (7.5M pending tokens).
All probe-failure paths now reject: prefill_probe_failed (429) when no candidate
can answer /query_cache_hit; fast_p_no_snapshot (429) when snapshots go stale
between probe and pick, with boot grace (had_any_success) mirroring the D gate.
User directive 2026-10-12: read-your-own-node home routing sent hit-class
requests back onto the regular-P long-prefill queue (150s p50 observed),
defeating the fast path. Hit class now always goes to the fast-P pool
(least-wait aggregate); fast-P resolves the prefix from its own L2 or the
shared L3 (wait_complete), recompute-and-graft otherwise — self-healing
land-and-stay. Home override removed; fast-P overload is handled only by
the fast_p_queue 429 gate. New decision counter routed_fast_p_from_regular
distinguishes L3-fetch/recompute hits from local-L2 hits (observability).
regular_plan returned Default when regular_pool_least_wait=false, letting
the router policy pick across ALL prefill workers including the fast-P
node — ~1/3 of large prefills landed on fast-P under random policy
(observed 2026-10-12), polluting its small-prefill queue and L2. With a
fast-P configured, 'regular' now explicitly restricts to the regular
pool via the least-wait aggregate pick. Default is kept only when the
fast pool is empty (then it equals the regular pool anyway).
Co-authored-by: Kimi
Follow-up to the home-hit routing fix. Two flaws remained:
1. The engine's /query_cache_hit new_tokens counts shared-L3 hits. Mooncake
pages are metadata-visible (Exist) before the put finishes, so fast-P
claimed long prefixes it could not actually serve: the gateway classified
'small prefill, fast-P has it' while the engine prefetch found nothing
and recomputed 76k cold — and the probe loop broke at fast-P before ever
asking the home regular-P, which held an immediate L2 copy.
2. The probe loop stopped at the first answering node, so 'which node holds
the prefix' was only ever 'fast-P or whoever got asked first'.
Now every fresh candidate is probed (fast pool first, early-out only on a
fully-local prompt), and the routing decision uses local_new = total - l1 -
l2. Ties keep probe order so fresh short prompts with no hits still land on
fast-P.
Co-authored-by: Kimi
classify_prefill remembered only new_tokens from the /query_cache_hit probe
and sent every small-prefill request to the fast-P pool. A multi-turn session
whose home P is a regular node therefore landed on fast-P with a local miss:
either a full prefix recompute or a wait for the cross-node L3 backup to
become visible (seconds for long prefixes; observed 10-20s for 76k).
Now the probe records which worker answered. When the prefix lives on a
regular-P the request is Override-routed home (immediate L2 hit), subject to
the same regular_p_queue est-wait 429 gate. Fast-P keeps serving sessions
whose prefix it already holds (its own L2) and brand-new short prefills.
Co-authored-by: Kimi
t15 stress through the gateway showed /query_cache_hit failing on the
sole fast-P under exactly the load where classification matters (p1
queue 62 / pending 4.7M tokens, 160 probe errors -> fallback). Probe
order is now fast-P least-wait first, regular pool as backup; first
successful answer classifies; unclassifiable (multimodal 400) still
short-circuits; total failure falls back to default routing.
Pool-aware admission control and small-prefill routing, entirely in
sgl-model-gateway (zero engine changes). Consumes G9 P0 engine surfaces:
/v1/loads (per-dp-rank snapshots, summed to per-node instance-level
views) and /query_cache_hit (new-token classification).
Decision tree per request, before PD dispatch and outside the retry
loop (own 429s are never retried):
1. D-pool gate: sum of fresh num_running_reqs over decode pool >
threshold -> 429 d_pool_saturated (fail-open on missing snapshots;
engine max-running-requests is the hard backstop).
2. Chat routes: probe least-wait fast-P /query_cache_hit; new_tokens
< max_new_tokens (tentative 4096) -> fast-P pool.
3. Pool selection: least estimated wait (queued_total_input_tokens /
max(drain_rate, floor)) — doubles as the load balancer for the
multi-fast-P / multi-D future; pool membership is config-only.
4. Fast-P queue gate: least-wait estimate > threshold (tentative 5s)
-> 429 fast_p_queue with x-estimated-wait-s.
CLI: --g9i-enabled/--g9i-fast-prefill-url/--g9i-max-new-tokens/
--g9i-fast-p-queue-reject-secs/--g9i-decode-max-running/... all numbers
tentative and centralized (user directive: fixed by measurement later).
Metrics: smg_g9i_decisions_total/rejects_total/no_fresh_snapshot_total,
per-node running gauge, probe latency histogram.
- unified_radix_cache.query_storage_hit_length: build PREFETCH-phase
pool_transfers (comp prepare_prefetch + build_hicache_transfers +
sidecars) so DeepSeek V4's logical-anchor KV goes through
batch_exists_v2 side-pool existence instead of v1 batch_exists which
always misses (no physical KV objects are stored for V4).
- scheduler.handle_query_cache_hit: allow L3 query when hicache storage
backend is attached (not only decode-hicache mode; SWA models forbid
decode radix+hicache so P nodes could never query L3); construct
RadixKey from array('q') to match tree node key types.
- disaggregation/prefill: record_prefill_drain on final chunk in the
disagg-prefill result path (it bypasses batch_result_processor, so
drain_rate_tokens_per_s stayed 0 on P nodes).
- deploy: 3p1d l3test compose against the real mooncake store stack.