Skip to content

fix: strip stream_options for non-streaming Qwen requests to avoid 400 error#676

Open
anuragg-saxenaa wants to merge 3 commits intodecolua:masterfrom
anuragg-saxenaa:fix/issue-557-qwen-stream-options-v2
Open

fix: strip stream_options for non-streaming Qwen requests to avoid 400 error#676
anuragg-saxenaa wants to merge 3 commits intodecolua:masterfrom
anuragg-saxenaa:fix/issue-557-qwen-stream-options-v2

Conversation

@anuragg-saxenaa
Copy link
Copy Markdown
Contributor

Summary

When using Qwen models via Claude Code routing through 9router, non-streaming requests fail with:

HTTP 400: stream_options only set this when you set stream: true

Fix

In qwen.js transformRequest(), only inject stream_options when stream === true. For non-streaming requests (stream === false), delete stream_options entirely so Qwen does not reject the request.

Closes #557

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

can we fix this for Claude Code - qwen models

1 participant