feat: add support for choosing preferred OpenRouter provider #4613

Closed
opened 2025-11-11 15:58:39 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @realchrisolin on GitHub (Mar 30, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

OpenWebUI currently lacks support for OpenRouter's custom routing feature, leading to inconsistent behavior when utilizing certain models. For instance, the "Qwen2.5 Coder 32B Instruct" model is served by multiple providers through OpenRouter, each offering different context window sizes:

DeepInfra: 33k context
Hyperbolic: 128k context
Fireworks: 33k context

Due to OpenRouter's dynamic load balancing across these providers, users experience variability in model performance, particularly concerning context handling. Implementing support for OpenRouter's custom routing within OpenWebUI would allow users to specify their preferred provider to ensure consistent behavior and optimal utilization of the model's capabilities.

Desired Solution you'd like

Manual control over which OpenRouter model provider is used

Alternatives Considered

No response

Additional Context

This functionality has been implemented in a different Javascript application (VS Code) with code to infer implementation from: eb74f02094

Image

Originally created by @realchrisolin on GitHub (Mar 30, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description OpenWebUI currently lacks support for OpenRouter's custom routing feature, leading to inconsistent behavior when utilizing certain models. For instance, the "Qwen2.5 Coder 32B Instruct" model is served by multiple providers through OpenRouter, each offering different context window sizes: ``` DeepInfra: 33k context Hyperbolic: 128k context Fireworks: 33k context ``` Due to OpenRouter's dynamic load balancing across these providers, users experience variability in model performance, particularly concerning context handling. Implementing support for OpenRouter's custom routing within OpenWebUI would allow users to specify their preferred provider to ensure consistent behavior and optimal utilization of the model's capabilities. ### Desired Solution you'd like Manual control over which OpenRouter model provider is used ### Alternatives Considered _No response_ ### Additional Context This functionality has been implemented in a different Javascript application (VS Code) with code to infer implementation from: https://github.com/RooVetGit/Roo-Code/commit/eb74f020945aa380f68c5e7c32958e21b3231253 ![Image](https://github.com/user-attachments/assets/9a22dabe-dafe-43aa-9458-1ab849d91361)
Author
Owner

@tjbck commented on GitHub (Mar 30, 2025):

Should be implemented via Functions

@tjbck commented on GitHub (Mar 30, 2025): Should be implemented via Functions
Author
Owner

@realchrisolin commented on GitHub (Apr 2, 2025):

in case someone finds this issue looking for this functionality, someone has already created a function to implement it https://github.com/eynsfordcq/openwebui-openrouter-provider-routing

@realchrisolin commented on GitHub (Apr 2, 2025): in case someone finds this issue looking for this functionality, someone has already created a function to implement it https://github.com/eynsfordcq/openwebui-openrouter-provider-routing
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#4613