feat(kv-events): expose structured KV-event publisher block on /server_info (#25844)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kangyan-Zhou
2026-05-23 01:59:45 +08:00
committed by GitHub
co-authored by Claude Opus 4.7
parent 06c23d55b5
commit 085777210c
4 changed files with 395 additions and 2 deletions
+7 -1
View File
@@ -636,12 +636,18 @@ async def server_info():
await _global_state.tokenizer_manager.get_internal_state()
)
server_args = _global_state.tokenizer_manager.server_args
# server_args.model_config is not serializable but should be excluded by asdict.
return {
**dataclasses.asdict(_global_state.tokenizer_manager.server_args),
**dataclasses.asdict(server_args),
**_global_state.scheduler_info,
"internal_states": internal_states,
"version": __version__,
# Structured KV-event publisher descriptor for KV-aware routers.
# `None` when publishing is disabled or misconfigured; see
# `ServerArgs.describe_kv_events_publisher` for the precise contract.
"kv_events": server_args.describe_kv_events_publisher(),
}