Skip to content

Feature request: Explicit provider selection for LLM inference in SDK #430

@bitsnaps

Description

@bitsnaps

Feature request: Allow explicit provider selection for LLM inference

Currently, when using the OpenRouter TypeScript SDK, specifying a model (e.g., openrouter/glm-5.1) does not allow the user to directly choose the underlying provider that serves the model. However, some models (such as GLM-5.1) are available from multiple providers (e.g., Zhipu, NVIDIA), and there may be valid reasons to route requests via a particular provider (performance, regional compliance, availability, pricing, etc.).

Proposed Enhancement:

  • Add a feature to the SDK and/or the OpenRouter routing logic to enable end-users to select a preferred provider for a given model, if that model is available from multiple providers.
  • If NVIDIA, Zhipu, or other providers support a given model, provide a mechanism (e.g., via a provider parameter or model identifier) for the user to explicitly target their choice.
  • Fallback to automatic routing if an explicit provider is not selected or that provider is unavailable.

Motivation:

  • In some model listing pages, it is evident from vendor sites that a provider may host the same model, but OpenRouter currently doesn't expose a way to select which provider is used for inference.
  • There may be additional providers or future LLMs with multi-provider support where this feature would benefit users.

References:

Expected outcome:

  • Users are able to explicitly select an available provider when making inference requests with the SDK, improving control over inference and provider-specific behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions