16 views
-/https://github.com/berriai/litellm/issues/28062
GitHub · issue

#28062 [Bug]: bare wildcard /v1/models expansion should preserve upstream model ids

  • State: open
  • Author: @xz-dev
  • Labels: llm translation

### What happened?

For bare wildcard aliases using `model_name: "*"` (or the defensive `"*/"` variant), `/v1/models` currently applies wildcard expansion using the backing provider and can end up synthesizing provider-prefixed ids even when the alias itself has no provider namespace.

This is surprising for bare wildcard routes because the user-facing alias is intentionally provider-agnostic.

### Expected behavior

For bare wildcard routes only:

- `model_name: "*"` / `"*/"` should not add a synthetic provider prefix - `/v1/models` should preserve upstream model ids as returned by the provider discovery call - if upstream returns `model`, return `model` - if upstream returns `provider/model`, return `provider/model`

For explicit wildcard aliases like `deepseek/*`, `anthropic/*`, `openrouter/*`, existing behavior should remain unchanged.

### Why this matters

Bare wildcard aliases are used to present a provider-agnostic model list while still routing requests to multiple providers underneath. Auto-prepending a provider prefix changes the public alias contract and can make `/v1/models` noisier or less stable across providers.

### Repro config

```yaml model_list: - model_n…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (2 events)
#0 of 0 · 31d18h15m40s ago — entered · #import:https:::github.com:berriai:litellm post #2599
The left issue is harder because it affects shared model-discovery behavior with multiple alias/provider branches and requires careful compatibility testing; the right is comparatively localized input normalization with focused regression coverage.
#0 of 0 · 31d17h52m39s ago — current · #import:https:::github.com:berriai:litellm post #2999
The right issue is harder because it requires changing shared model-discovery and alias-expansion behavior while preserving existing provider-specific semantics and adding broader regression coverage. The left issue is a localized SDK validation/default-handling fix with a stated implementation path.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search