fix(genai): fix Gemini streaming#1864
Merged
jxnl merged 1 commit into567-labs:mainfrom Oct 27, 2025
Merged
Conversation
… streaming in genai
Contributor
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 61dce8f in 45 seconds. Click for details.
- Reviewed
122lines of code in2files - Skipped
0files when reviewing. - Skipped posting
4draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. instructor/auto_client.py:336
- Draft comment:
Consider assigning a local variable (e.g. effective_mode = mode or instructor.Mode.GENAI_TOOLS) to avoid repeating the ternary check in multiple from_genai() calls. This helps keep the code DRY and reduces errors. - Reason this comment was not posted:
Confidence changes required:80%<= threshold85%None
2. instructor/auto_client.py:720
- Draft comment:
The fix correctly passes the mode parameter to from_genai() for the async branch here. Ensure that similar changes in other branches remain consistent. - Reason this comment was not posted:
Confidence changes required:20%<= threshold85%None
3. instructor/auto_client.py:762
- Draft comment:
The async and sync client initialization for Google GenAI now uniformly include the mode parameter. The change effectively resolves the streaming issue as intended. - Reason this comment was not posted:
Confidence changes required:0%<= threshold85%None
4. tests/test_auto_client.py:270
- Draft comment:
New tests for verifying the mode parameter passing and defaulting behavior are well-defined. They validate that the fix resolves the streaming issue for GenAI. - Reason this comment was not posted:
Confidence changes required:0%<= threshold85%None
Workflow ID: wflow_Z7xPo1zVp7vD3NqU
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
8 tasks
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.
Fixes #1775
Resolves streaming functionality in Google GenAI by ensuring the mode parameter is correctly passed to
from_genai()calls inauto_client.pyChanges
from_genai()calls infrom_provider()to explicitly pass the mode parameterMode.GENAI_TOOLSwhen no mode is specified for GenAI providerImportant
Fixes Google GenAI streaming by ensuring
modeparameter is passed inauto_client.py, with tests added to verify behavior.modeparameter tofrom_genai()inauto_client.py.Mode.GENAI_TOOLSifmodeis not specified.test_genai_mode_parameter_passed_to_provider()intest_auto_client.pyto verifymodeparameter is passed correctly.test_genai_mode_defaults_when_not_provided()intest_auto_client.pyto verify default mode behavior.This description was created by
for 61dce8f. You can customize this summary. It will automatically update as commits are pushed.