7 views
-/https://github.com/berriai/litellm/issues/33030
GitHub · issue

#33030 [Bug]: Wildcard model access (bedrock/*) grants access to unrecognized provider prefixes (bedrockz/*)

  • State: open
  • Author: @abhay-codes07
  • Labels: llm translation

### What happened?

A virtual key or team whose allowed models are restricted to a provider wildcard like `bedrock/*` is incorrectly granted access to models under a **different, unrecognized** provider prefix such as `bedrockz/...`.

`_model_custom_llm_provider_matches_wildcard_pattern` in `litellm/proxy/auth/auth_checks.py` resolves the model's provider via `get_llm_provider` and then re-checks `f"{custom_llm_provider}/{model}"` against the allowed pattern. This is intended for **bare** model names (e.g. `gpt-4o` → `openai/gpt-4o`). But `get_llm_provider("bedrockz/anthropic.claude-3-5-sonnet-20240620")` loosely resolves the provider to `bedrock` **without stripping the `bedrockz/` prefix**, so the re-check runs against `bedrock/bedrockz/anthropic.claude-3-5-sonnet-20240620`, which matches `bedrock/*` — granting access.

### Minimal reproduction (offline, no network/keys)

```python from litellm.proxy.auth.auth_checks import _model_matches_any_wildcard_pattern_in_list

# key/team allowed only "bedrock/*" print(_model_matches_any_wildcard_pattern_in_list( model="bedrockz/anthropic.claude-3-5-sonnet-20240620", allowed_model_list=["bedrock/*"], )) ```

**Actual:** `True` (acc…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h35m43s ago — entered · #import:https:::github.com:berriai:litellm post #2369
33074 is harder because it requires diagnosing and safely correcting database schema migration behavior across upgrade paths, ORM state, and existing deployments, with high operational risk. 33030 is comparatively localized to authorization matching logic with focused regression tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search