fix: OpenAI provider in from_provider ignores base_url kwarg#1971
Merged
jxnl merged 1 commit into567-labs:mainfrom Dec 30, 2025
Merged
fix: OpenAI provider in from_provider ignores base_url kwarg#1971jxnl merged 1 commit into567-labs:mainfrom
jxnl merged 1 commit into567-labs:mainfrom
Conversation
…oint client to custom endpoint) 567-labs#1921
Contributor
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 0ea8e90 in 36 seconds. Click for details.
- Reviewed
120lines 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:163
- Draft comment:
Good extraction of base_url and related OpenAI client parameters from kwargs. Consider abstracting this pattern if similar logic is needed for other providers. - Reason this comment was not posted:
Confidence changes required:0%<= threshold85%None
2. tests/test_auto_client.py:273
- Draft comment:
Test 'test_openai_provider_respects_base_url' correctly verifies that base_url and api_key are passed to the OpenAI client constructor. - Reason this comment was not posted:
Confidence changes required:0%<= threshold85%None
3. tests/test_auto_client.py:298
- Draft comment:
Test 'test_openai_provider_async_client_with_base_url' ensures that the async client also receives the correct base_url and api_key. This is clear and effective. - Reason this comment was not posted:
Confidence changes required:0%<= threshold85%None
4. tests/test_auto_client.py:325
- Draft comment:
Test 'test_openai_provider_without_base_url' properly confirms that the base_url is not added when not provided. This validates the default behavior. - Reason this comment was not posted:
Confidence changes required:0%<= threshold85%None
Workflow ID: wflow_rNEsYMBlTJNHGDiR
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
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: OpenAI provider in from_provider ignores base_url kwarg (can't point client to custom endpoint) #1921
Important
Fixes
from_providerto passbase_urlto OpenAI clients and adds tests to verify this behavior.from_providerinauto_client.pyto correctly passbase_urlto OpenAI client constructors.AsyncOpenAIandOpenAIclients.test_openai_provider_respects_base_url()intest_auto_client.pyto verifybase_urlis passed toOpenAI.test_openai_provider_async_client_with_base_url()to verifybase_urlis passed toAsyncOpenAI.test_openai_provider_without_base_url()to ensure default behavior whenbase_urlis not provided.This description was created by
for 0ea8e90. You can customize this summary. It will automatically update as commits are pushed.