Repository navigation
fix(beam): finalize constrained tool calls at confirmed model EOS - #17625
Conversation
9be18bb to
de2c04c
Compare
✅ Dynamo PR CI passed — run 41565196564 (attempt 1) on
|
35412eb to
1988a96
Compare
There was a problem hiding this comment.
Thank you
No blocking correctness issues found at 1988a96. The two inline comments are nonblocking cleanup.
Validated on macOS with --no-default-features: all four focused EOS/parser regression tests passed. cargo fmt --check and git diff --check also passed. The full test suite was not rerun.
1988a96 to
686e9e9
Compare
686e9e9 to
99f8465
Compare
|
Reviewed |
keivenchang
left a comment
There was a problem hiding this comment.
approved — thanks Dong for fixing the EOS handling and addressing the cleanup.
Third upstream merge for the split v2 PR: the five commits past 53015f9 that landed while the second merge was validated. Four conflicts, each placed in the owner crate, upstream behavior whole, the stack's moves intact, no shims. - ai-dynamo#18008 probe worker availability with an Fx set: WorkerIdSet and the per-set AvailableWorkerIds cache in the kernel's types.rs, the listed- worker walk in the kernel's filter.rs, the actor's cached availability in queue.rs (auto-merged); WorkerIdSet exported to hosts through dynamo_scheduler::host (lib/llm's LoRA availability filter) and to plugins through dynamo_kv_router::plugins::prelude (the builtin default_policy test stays prelude-only). - ai-dynamo#18084 CRTC stale-leaf sweep trigger scaled with tree size: lib/router/kv-indexer concurrent_radix_tree_compressed (auto-merged). - ai-dynamo#17900 shared fixed-lane bench primitive: lib/bench (auto-merged). - ai-dynamo#17947 planner priority pools, ai-dynamo#17625 beam tool-call finalization: outside the router, auto-merged. Signed-off-by: Ishan Dhanani <ishandhanani@gmail.com>
main stopped compiling lib/llm/tests/streaming_tool_dispatch_http.rs when ai-dynamo#13986 merged: its chunk() helper builds NvCreateChatCompletionStreamResponse field by field and predates the model_eos field from ai-dynamo#17625. This is the same one-line change as ai-dynamo#18553, so the two merge cleanly in either order. Signed-off-by: Bindu Bhargava R Chintam <bindubhargavareddy@gmail.com>
Overview
Port of #17062 (release/1.6.0 Beam branch, by @neilkg) to main. Part of #17618; the stacked follow-up porting #17061 closes it.
Key Changes
<rfl:parameter>body and then its EOS<|return|>instead of<|call|>. Because the Beam route retains the model's stop-token text, the parser sees the trailing<|return|>and drops the call, so the batch path returns 500 and the stream path an error. (At a bare EOF with no trailing marker the pinned parser'sDroppolicy already recovers the body; the retained-marker case is the one that fails.)finish().model_eoschoice indices on the chat stream response (internal; scrubbed before HTTP and in synthetic chunks), emitted only while an installed Beam turn grammar is active; the unified parser and the aggregator finalize withfinish_at_eos()only under confirmed EOS and that grammar, so length limits, user stops and transport EOF never authorize strict completion; Beam parse errors surface as request errors instead of being dropped;apply_argument_framingtakes the family so malformed-call rejection applies only to Beam under the turn grammar.dynamo-renderer 8.2.0,dynamo-parsers-v2 0.9.6, which carriesfinish_at_eos); the family-aware framing is threaded through main'snew_with_constraintand the continuation-cache path;scrub_synthetic_chunk_metadataclearsmodel_eosnext tomessage_boundary.Validation
Linux arm64 build:
cargo fmt --check,cargo check --workspace --all-targetsandcargo clippy -p dynamo-llm -D warningspass;cargo test -p dynamo-llmpasses (4639 tests, 0 failures, including the three new tests). Original validation on the release branch is in #17062.Issues and Ongoing Work