diff --git a/litellm/utils.py b/litellm/utils.py index 7576e3bb83d..2e186bb160f 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -2779,7 +2779,7 @@ def register_model(model_cost: Union[str, dict]): # noqa: PLR0915 litellm.anthropic_models.add(key) elif value.get("litellm_provider") == "openrouter": split_string = key.split("/", 1) - if key not in litellm.openrouter_models: + if split_string[-1] not in litellm.openrouter_models: litellm.openrouter_models.add(split_string[-1]) elif value.get("litellm_provider") == "vercel_ai_gateway": if key not in litellm.vercel_ai_gateway_models: