Skip to content

Add conflict handling for --disable-streaming with async execution engine#23

Open
dsingal0 wants to merge 1 commit intomainfrom
feature/disable-streaming-async-fallback
Open

Add conflict handling for --disable-streaming with async execution engine#23
dsingal0 wants to merge 1 commit intomainfrom
feature/disable-streaming-async-fallback

Conversation

@dsingal0
Copy link

Summary

When --disable-streaming is used with --execution-engine=async, the async runner cannot function properly since it requires streaming. This PR adds intelligent conflict handling:

  • If async-specific parameters are present (--qps-level, --distribution, --track-network-timing): Warn the user and run with async execution engine with streaming enabled (overriding --disable-streaming)
  • If no async-specific parameters: Warn the user and automatically fallback to Locust execution engine

This preserves access to async-specific features when needed while preventing unsupported configurations.

Changes

  • Modified genai_bench/cli/cli.py to detect async-specific parameters and handle conflicts
  • Added comprehensive test coverage in tests/cli/test_cli_async.py:
    • Test warning includes all async-specific parameters
    • Test fallback to Locust when no async-specific params
    • Test async with streaming when async-specific params present

Testing

All existing tests pass, plus 3 new test cases added.

…gine

When --disable-streaming is used with --execution-engine=async:
- If async-specific parameters (--qps-level, --distribution, --track-network-timing) are present, warn and run async with streaming enabled
- If no async-specific parameters, warn and automatically fallback to Locust execution engine

This prevents the async runner from being used in unsupported non-streaming mode while preserving access to async-specific features when needed.
@github-actions github-actions bot added the core label Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant