Merged
Conversation
Co-authored-by: jason <jason@jxnl.co>
Co-authored-by: jason <jason@jxnl.co>
Co-authored-by: jason <jason@jxnl.co>
|
Cursor Agent can help with this pull request. Just |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
instructor | 512229c | Commit Preview URL Branch Preview URL |
Jan 16 2026, 05:58 PM |
Co-authored-by: jason <jason@jxnl.co>
Collaborator
Author
|
@cursoragent fix everything ci etc and update change logs |
|
I fixed the CI failures and updated the changelog.
|
- Fix ty-tests failure in new ListResponse test\n- Keep list[int|str] treated as simple type (fizzbuzz)\n- Avoid IterableModel name crash for union task types\n- Add changelog entry for #1303 Co-authored-by: jason <jason@jxnl.co>
Contributor
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 512229c in 1 minute and 47 seconds. Click for details.
- Reviewed
372lines of code in10files - Skipped
0files when reviewing. - Skipped posting
5draft 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/__init__.py:114
- Draft comment:
Consider logging an informative warning or error in the except block for the vertexai import to aid in diagnosing misconfigured optional dependencies. - Reason this comment was not posted:
Confidence changes required:70%<= threshold85%None
2. instructor/providers/__init__.py:65
- Draft comment:
Similarly, for the vertexai import in providers/init.py, consider logging the exception details rather than silently passing, to improve debuggability when the optional dependency is present but misconfigured. - Reason this comment was not posted:
Confidence changes required:70%<= threshold85%None
3. instructor/utils/core.py:595
- Draft comment:
The 'prepare_response_model' function involves multiple nested conversions (handling simple types, TypedDicts, and Iterable models) which adds complexity. Consider refactoring parts of it into helper functions or adding more summary comments to improve readability and maintainability. - Reason this comment was not posted:
Confidence changes required:70%<= threshold85%None
4. instructor/processing/response.py:251
- Draft comment:
Typo: The log message "Returning takes from IterableBase" likely should read "Returning tasks from IterableBase". - Reason this comment was not posted:
Comment was on unchanged code.
5. instructor/processing/response.py:359
- Draft comment:
Typo detected: "Returning takes from IterableBase" appears to use "takes" instead of "tasks". Please update the log message to reflect the correct term. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_uBh3wFGVAoEqKmz3
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
|
finally!!! |
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.
fix: prevent AttributeError for List[T] batch extractions and harden vertexai import
Describe your changes
This PR resolves the
AttributeError: 'list' object has no attribute 'rawresponse'that occurred during batch extractions whenresponse_modelwasList[T].The fix involves:
ListResponse, alistsubclass, to correctly carry the_raw_responsewhen a list of objects is returned.prepare_response_modelto properly handlelist[T](similar toIterable[T]), ensuring it's processed as anIterableModel.vertexaiimports to preventimport instructorfrom crashing ifvertexaiis present but misconfigured.This re-implements the core intent of the original, unmerged PR #1870 with dedicated unit tests.
Issue ticket number and link
Linear: 567-267
GitHub: #1303
Related PR: #1870
Checklist before requesting a review
Linear Issue: 567-267
Important
Fix
AttributeErrorin batch extractions forList[T]by introducingListResponseand hardenvertexaiimports.AttributeErrorin batch extractions whenresponse_modelisList[T]by introducingListResponseclass inresponse_list.py.process_response()andprocess_response_async()inresponse.pyto useListResponseforIterableBasemodels.prepare_response_model()incore.pyto handlelist[T]asIterableModel.vertexaiimports in__init__.pyandproviders/__init__.pyto prevent crashes if misconfigured.test_list_response.pyto verifyListResponsebehavior and integration withprocess_response().raw_response.mdto document usage ofListResponsewithcreate_with_completion().This description was created by
for 512229c. You can customize this summary. It will automatically update as commits are pushed.