Skip to content

fix: Add Additional params settings for all models#1453

Open
sub-hub wants to merge 4 commits into
kwaroran:mainfrom
sub-hub:additionalParamsForAllmodels
Open

fix: Add Additional params settings for all models#1453
sub-hub wants to merge 4 commits into
kwaroran:mainfrom
sub-hub:additionalParamsForAllmodels

Conversation

@sub-hub
Copy link
Copy Markdown
Collaborator

@sub-hub sub-hub commented May 18, 2026

PR Checklist

  • Required Checks
    • Have you added type definitions?
    • Have you tested your changes?
    • Have you checked that it won't break any existing features?
  • If your PR uses models1, check the following:
    • Have you checked if it works normally in all models?
    • Have you checked if it works normally in all web, local, and node-hosted versions? If it doesn't, have you blocked it in those versions?
  • If your PR is highly AI generated2, check the following:
    • Have you understood what the code does?
    • Have you cleaned up any unnecessary or redundant code?
    • Is it not a huge change?
      • We currently do not accept highly AI generated PRs that are large changes.

Demo

Setting Additional parameter on Anthropic provider

image image image image

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 applyAdditionalParameters function to all request code and updated the frontend so that the additional parameters button appears.

Changes

Changes made during this process:

  • Request code for all providers has been modified.
  • The getAdditionalParameters function was also updated. Originally, this function was designed to return only [] if the aiModel did not start with reverse_proxy or xcustom. I modified it to return db.additionalParams for other models while maintaining the existing flow.

The getAdditionalParameters function 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

  1. Modifies the behavior of prompting, requesting, or handling responses from AI models.

  2. Over 80% of the code is AI generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant