Skip to content

fix(protocols): accept null stream option flags - #239

Merged
luckyq merged 1 commit into
ai-dynamo:mainfrom
furionw:qiwa/null-stream-options
Sep 17, 2026
Merged

luckyq merged 1 commit into
ai-dynamo:mainfrom
furionw:qiwa/null-stream-options

Conversation

@furionw

@furionw furionw commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat missing or explicit-null include_usage and continuous_usage_stats as false.
  • Preserve the public bool fields and their serialized boolean wire shape.
  • Continue rejecting non-boolean, non-null values.

This moves the compatibility behavior into the shared protocol type used by chat and text completion requests. It is the durable protocol-side fix for the stream-options portion of ai-dynamo/dynamo#14847; after Dynamo consumes a release containing this change, its frontend-only nullable stream-options wrapper can be removed.

Compatibility

This is a deserialization-only relaxation. Existing Rust constructors remain source-compatible, JSON and MessagePack serialization remain boolean-valued, and mixed-version request-plane traffic retains the existing wire shape.

Validation

  • cargo fmt --all -- --check
  • cargo test -p dynamo-protocols --all-targets --locked
  • cargo test -p dynamo-protocols --doc --locked
  • cargo clippy -p dynamo-protocols --all-targets --all-features --locked -- -D warnings
  • cargo check --workspace --all-targets --locked
  • cargo test --workspace --all-targets --locked --exclude dynamo-conformance-fixtures-v2
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
  • Directed MessagePack compatibility check for old boolean payloads, unchanged output shape, and null normalization

The unfiltered workspace test run reached the conformance package and stopped because the local macOS environment does not provide flock; the same workspace run excluding that environment-specific fixture package passed.

Signed-off-by: furionw <qiwa@nvidia.com>
@github-actions github-actions Bot added external-contribution PR originates from a fork fix labels Sep 17, 2026
@luckyq
luckyq merged commit d36e9a9 into ai-dynamo:main Sep 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contribution PR originates from a fork fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants