feat: Support for nested custom advanced model parameters #5382

Closed
opened 2025-11-11 16:19:24 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @oransterf on GitHub (May 29, 2025).

Originally assigned to: @tjbck on GitHub.

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

The addition of custom advanced model parameters is very welcome and much needed.
However for example, using Grok 3, it would be great to take advantage of the "Live Search" (link) feature available via the API. This allows for using open-webui but having the web search be done on the APi side instead.

Currently, there is only the option to add a custom parameter at the first level.

Setting the following custom parameter in the model settings:

search_parameters
{"mode": "auto"}

Produces the following (expected) error on the API side:

422: Failed to deserialize the JSON body into the target type: search_parameters: invalid type: string "{\"mode\": \"auto\"}", expected struct SearchParameters at line 1 column 169

Desired Solution you'd like

Either allow JSON object as the value of a parameter or allow deeper level parameters to construct such object.

Alternatives Considered

No response

Additional Context

No response

Originally created by @oransterf on GitHub (May 29, 2025). Originally assigned to: @tjbck on GitHub. ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description The addition of custom advanced model parameters is very welcome and much needed. However for example, using Grok 3, it would be great to take advantage of the "Live Search" ([link](https://docs.x.ai/docs/guides/live-search)) feature available via the API. This allows for using open-webui but having the web search be done on the APi side instead. Currently, there is only the option to add a custom parameter at the first level. Setting the following custom parameter in the model settings: ``` search_parameters {"mode": "auto"} ``` Produces the following (expected) error on the API side: ``` 422: Failed to deserialize the JSON body into the target type: search_parameters: invalid type: string "{\"mode\": \"auto\"}", expected struct SearchParameters at line 1 column 169 ``` ### Desired Solution you'd like Either allow JSON object as the value of a parameter or allow deeper level parameters to construct such object. ### Alternatives Considered _No response_ ### Additional Context _No response_
Author
Owner

@tjbck commented on GitHub (May 29, 2025):

Should be addressed in dev with 4371d2c5a5

@tjbck commented on GitHub (May 29, 2025): Should be addressed in dev with 4371d2c5a5669a8d266065c984e913c426a362d0
Author
Owner

@oransterf commented on GitHub (May 30, 2025):

Absolutely amazed by the speed at which you released this. Thank you so much! My use case works now!

@oransterf commented on GitHub (May 30, 2025): Absolutely amazed by the speed at which you released this. Thank you so much! My use case works now!
Author
Owner

@spammenotinoz commented on GitHub (Jun 3, 2025):

Thank-you, this is excellent

@spammenotinoz commented on GitHub (Jun 3, 2025): Thank-you, this is excellent
Author
Owner

@havardox commented on GitHub (Jul 22, 2025):

I'm confused. What format should the model settings be in for it to parse it as JSON? Right now, it just gives me 400: Unknown parameter: 'reasoning'. for o4-mini

Image
@havardox commented on GitHub (Jul 22, 2025): I'm confused. What format should the model settings be in for it to parse it as JSON? Right now, it just gives me `400: Unknown parameter: 'reasoning'.` for o4-mini <img width="1200" height="356" alt="Image" src="https://github.com/user-attachments/assets/c7c24d29-0531-4761-9235-6fb0bf894250" />
Author
Owner

@JTGRC-public commented on GitHub (Sep 12, 2025):

Should be addressed in dev with 4371d2c

This only supports string for the value part, I cannot pass Boolean values like True or False to a custom parameter

@JTGRC-public commented on GitHub (Sep 12, 2025): > Should be addressed in dev with [4371d2c](https://github.com/open-webui/open-webui/commit/4371d2c5a5669a8d266065c984e913c426a362d0) This only supports string for the value part, I cannot pass Boolean values like True or False to a custom parameter
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#5382