fix: Add Additional params settings for all models#1453
Open
sub-hub wants to merge 4 commits into
Open
Conversation
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.
PR Checklist
Demo
Setting Additional parameter on Anthropic provider
Summary
Currently, additional parameter settings cannot be used unless it's a custom API.
This PR allows additional parameters to be used regardless of the model.
I applied the
applyAdditionalParametersfunction to all request code and updated the frontend so that the additional parameters button appears.Changes
Changes made during this process:
getAdditionalParametersfunction was also updated. Originally, this function was designed to return only[]if theaiModeldid not start withreverse_proxyorxcustom. I modified it to returndb.additionalParamsfor other models while maintaining the existing flow.The
getAdditionalParametersfunction underwent the most significant changes, so please review that part especially closely.Also, since Ollama had the most extensive code changes, please take a look at that as well.
I've double-checked the modified code myself, but I'd appreciate it if you could verify if there are any issues.
Impact
In theory, this modification shouldn't make any difference if no additional parameters are set.
But please check if there are any other side effects.
Footnotes
Modifies the behavior of prompting, requesting, or handling responses from AI models. ↩
Over 80% of the code is AI generated. ↩