Skip to content

fix(go): compat_oai plugin returns incomplete history when streaming#5239

Open
MikeRez0 wants to merge 2 commits intogenkit-ai:mainfrom
MikeRez0:go-compat_oai-stream-history
Open

fix(go): compat_oai plugin returns incomplete history when streaming#5239
MikeRez0 wants to merge 2 commits intogenkit-ai:mainfrom
MikeRez0:go-compat_oai-stream-history

Conversation

@MikeRez0
Copy link
Copy Markdown

@MikeRez0 MikeRez0 commented May 6, 2026

Changes fix this issue
#4683

Checklist (if applicable):

@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 6, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions Bot added the go label May 6, 2026
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 updates the generateStream and convertChatCompletionToModelResponse functions in go/plugins/compat_oai/generate.go to accept and utilize the ai.ModelRequest object, ensuring the request context is preserved in the model response. A review comment identifies that the signature change for convertChatCompletionToModelResponse breaks the generateComplete function, which was not updated in this PR. The feedback includes a code suggestion to fix the compilation error and improve error handling by wrapping errors with contextual information.

Comment thread go/plugins/compat_oai/generate.go
@MichaelDoyle MichaelDoyle requested a review from apascal07 May 6, 2026 15:15
@MichaelDoyle
Copy link
Copy Markdown
Contributor

Thanks @MikeRez0! Can you get the CLA taken care of? In the mean time we'll get the review done.

@MikeRez0
Copy link
Copy Markdown
Author

MikeRez0 commented May 6, 2026

Already signed

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.

2 participants