Skip to content

Rename --stream-output to --incremental-streaming-output#20614

Merged
hnyls2002 merged 1 commit intomainfrom
lsyin/tiny-fix-stream-output-args
Mar 15, 2026
Merged

Rename --stream-output to --incremental-streaming-output#20614
hnyls2002 merged 1 commit intomainfrom
lsyin/tiny-fix-stream-output-args

Conversation

@hnyls2002
Copy link
Copy Markdown
Collaborator

Summary

  • Rename the --stream-output server flag to --incremental-streaming-output to better reflect its semantics (controls incremental vs cumulative output format, not whether streaming is enabled)
  • Old --stream-output flag is preserved as a deprecated alias that prints a warning and still works
  • Add DeprecatedStoreTrueAction for reusable deprecated-but-functional boolean flag handling

Test plan

  • /rerun-stage stage-b-test-small-1-gpu — includes test_skip_tokenizer_init.py which explicitly passes this flag

🤖 Generated with Claude Code

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the clarity and maintainability of the server's command-line interface by renaming a key streaming output flag. The change clarifies that the flag controls the format of streaming output (incremental vs. cumulative) rather than merely enabling streaming. It also introduces a robust deprecation strategy, allowing for a smooth transition for users while providing a reusable pattern for future flag management.

Highlights

  • Flag Renaming: The server flag --stream-output has been renamed to --incremental-streaming-output to more accurately reflect its function of controlling incremental versus cumulative output format.
  • Backward Compatibility: The original --stream-output flag is preserved as a deprecated alias, which will issue a warning but continue to function, ensuring backward compatibility.
  • New Deprecation Utility: A new DeprecatedStoreTrueAction class has been introduced, providing a reusable mechanism for handling deprecated boolean command-line arguments.
  • Documentation and Code Updates: All relevant code references and documentation have been updated to use the new flag name.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • docs/advanced_features/server_arguments.md
    • Renamed --stream-output to --incremental-streaming-output in the server arguments documentation table.
  • docs/platforms/ascend_npu_support_features.md
    • Updated the Ascend NPU support features documentation to reflect the new flag name --incremental-streaming-output.
  • python/sglang/srt/entrypoints/context.py
    • Updated internal comments to reference the new --incremental-streaming-output flag.
  • python/sglang/srt/managers/tokenizer_manager.py
    • Modified conditional checks to use self.server_args.incremental_streaming_output instead of self.server_args.stream_output.
  • python/sglang/srt/server_args.py
    • Renamed the stream_output attribute to incremental_streaming_output in the ServerArgs class.
    • Updated the add_cli_args function to define --incremental-streaming-output as the primary flag.
    • Added --stream-output as a deprecated alias for --incremental-streaming-output, utilizing the new DeprecatedStoreTrueAction.
    • Implemented the DeprecatedStoreTrueAction class for handling deprecated boolean flags with warnings.
  • test/manual/test_config_integration.py
    • Modified test configurations and assertions to use the new --incremental-streaming-output flag.
  • test/registered/tokenizer/test_skip_tokenizer_init.py
    • Changed the other_args in setUpClass to pass --incremental-streaming-output.
Activity
  • No specific activity (comments, reviews, progress) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@hnyls2002
Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request renames the --stream-output flag to --incremental-streaming-output to better describe its functionality. The old flag is preserved as a deprecated alias, which is a good practice for backward compatibility. A new DeprecatedStoreTrueAction class is introduced to handle such deprecated boolean flags, making the implementation clean and reusable. The changes are consistently applied across the codebase, including documentation and tests. My feedback includes a minor suggestion to improve the robustness of the new action class.

@hnyls2002
Copy link
Copy Markdown
Collaborator Author

/rerun-ut test_skip_tokenizer_init.py

@github-actions
Copy link
Copy Markdown
Contributor

✅ Triggered /rerun-ut on 1-gpu-5090 runner:

cd test/ && python3 registered/tokenizer/test_skip_tokenizer_init.py

@github-actions
Copy link
Copy Markdown
Contributor

🔗 View workflow run

@hnyls2002 hnyls2002 merged commit fc7f9c1 into main Mar 15, 2026
91 of 114 checks passed
@hnyls2002 hnyls2002 deleted the lsyin/tiny-fix-stream-output-args branch March 15, 2026 06:22
Wangzheee pushed a commit to Wangzheee/sglang that referenced this pull request Mar 21, 2026
sglang-bot pushed a commit to alexnails/sglang that referenced this pull request Mar 23, 2026
Conflict resolution:
- _wait_one_response: take main's drain-all-pending-outputs refactor
- _handle_batch_output: keep PR's merged BatchStr/BatchTokenID structure,
  rename stream_output -> incremental_streaming_output per sgl-project#20614
0-693 pushed a commit to 0-693/sglang that referenced this pull request Mar 25, 2026
KHAEntertainment pushed a commit to Clarit-AI/Engram that referenced this pull request Mar 31, 2026
…al-streaming-output (sgl-project#20614)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
JustinTong0323 pushed a commit to JustinTong0323/sglang that referenced this pull request Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation npu run-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant