Conversation
Contributor
|
🔍 OpenCodeReview found 2 issue(s) in this PR.
|
Comment on lines
1305
to
1310
| if k == "stream" { | ||
| continue | ||
| stream, isBool := v.(bool) | ||
| if !isBool || stream { | ||
| continue | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
The comment on lines 1301-1304 says "Drop the key rather than forward it", but the code now forwards stream: false to the API. The comment should be updated to reflect the new conditional behavior, e.g.: "Drop the key when it would trigger SSE (non-boolean or true); forward explicit false so callers can override a default."
Comment on lines
126
to
131
| if k == "stream" { | ||
| continue | ||
| stream, isBool := v.(bool) | ||
| if !isBool || stream { | ||
| continue | ||
| } | ||
| } |
Contributor
Contributor
|
@Rapeter Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
extra_body.stream: falsefor non-streaming OpenAI Chat Completions, Anthropic Messages, and OpenAI Responses requests.stream: true, non-boolean stream values, and OpenAIstream_optionswhere they are not valid.Fixes #1527
Testing
go test -count=1 -run 'TestOpenAIClient_NonStreamingRequestDropsStreamField|TestAnthropicClient_ExtraBodyStreamDropped|TestAnthropicClient_ExtraBodyStreamFalseForwarded|TestOpenAIResponsesClient_ExtraBodyStreamDropped|TestOpenAIResponsesClient_ExtraBodyStreamFalseForwarded' ./internal/llmgo vetandgit diff --check: passed.ocr review --audience agent --background ...: attempted but could not run because no LLM endpoint is configured in the local environment.make testcould not run on this Windows environment because of the existing shell/runtime compatibility issue.AI disclosure
Prepared with OpenAI Codex (GPT-5). I reviewed every changed line and understand the behavior and test coverage.