-
Notifications
You must be signed in to change notification settings - Fork 64
fix: OpenAI base_url default and reasoning effort model option.
#271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
avinash2692
wants to merge
12
commits into
main
Choose a base branch
from
fix/270-openai-reasoning-effort
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+114
−27
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6e98053
Adding a fix to pass `reasoning_effort` in conditionally
avinash2692 ab9e56b
adding tests
avinash2692 0862cf0
Fixes #274
nrfulton 29481f7
Adds GPT 5.1 model identifier.
nrfulton 1426ee9
Changes OpenAI Backend default model_id to GPT 5.1.
nrfulton c11fbef
Fixes bug: GenSlots did not work with OpenAI platform.
nrfulton 0bde6ec
Adds inline documentation for OpenAI model options monkey patching.
nrfulton 4d87c83
removes debug print stmt.
nrfulton f87f86b
adding a comment about reasoning_effort in openai sdk
avinash2692 e7e161b
Merge branch 'fix/270-openai-reasoning-effort' of https://github.com/…
avinash2692 b6d16a6
Merge branch 'main' into fix/270-openai-reasoning-effort
avinash2692 a94205d
removing all instances of hf_model_id in openai backend
avinash2692 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are close to defaults that make sense here. I think if the user specifies a base_url we should always use that base_url (even if no apikey is set). I also wonder if we should default the apikey to
ollamain those situations.Otherwise, we have no way to target arbitrary localhost ports that don't require an apikey.
For example (and this isn't the best since it uses LiteLLM and we have a separate backend for that), LiteLLM has a proxy that you can run locally. This proxy stores the apikey information itself; so you can target an arbitrary localhost port without an apikey.
My proposed solution would be to just set the parameter default values to work for the ollama version (ie
api_key="ollama"andbase_url="http://localhost:11434/v1"). Then users can override these values. I think this would also allow users to explicitly set api_key / base_url toNoneand have the underlying OpenAI SDK still automatically pick up their env vars (without the risk of users accidentally incurring expenses).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consensus: just pass the args through to the openai sdk. Don't do argument handling such as this.