refactor(router): remove unrelated project ID change

This commit is contained in:
Yujong Lee 2026-08-31 17:54:48 -07:00 committed by GitHub
parent 91e09ef092
commit 571c0d8b26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 27 deletions

View file

@ -9558,12 +9558,12 @@ class Router:
Args:
model_id: Model ID or model name from model_list (e.g., "gpt-4o-litellm")
team_id: Optional team id of the caller. When set, team-scoped
deployments (indexed by team public model name, including team
wildcard models like "openai/*") are also considered. Exact-ID,
name, and wildcard lookups never resolve a deployment owned by
a different team. Callers without a team id retain legacy
exact-ID behavior for internal credential-resolution flows.
team_id: Optional team id of the caller. When set, team-scoped
deployments (indexed by team public model name, including team
wildcard models like "openai/*") are also considered. Exact-ID,
name, and wildcard lookups never resolve a deployment owned by
a different team. Callers without a team id retain legacy
exact-ID behavior for internal credential-resolution flows.
Returns:
Dictionary containing api_key, api_base, custom_llm_provider, etc.

View file

@ -241,7 +241,6 @@ class CredentialLiteLLMParams(BaseModel):
api_key: str | None = None
api_base: str | None = None
api_version: str | None = None
project_id: str | None = None
## AZURE OAUTH ##
# Without this field, ``get_deployment_credentials_with_provider``
# round-trips ``litellm_params`` through a strict Pydantic dump and

View file

@ -4560,26 +4560,6 @@ def test_get_deployment_credentials_with_provider_fails_closed_for_missing_named
assert credentials is None
def test_get_deployment_credentials_with_provider_preserves_project_id():
router = litellm.Router(
model_list=[
{
"model_name": "embedding-model",
"litellm_params": {
"model": "watsonx/ibm/slate-125m-english-rtrvr",
"api_key": "test-key",
"project_id": "embedding-project",
},
}
]
)
credentials = router.get_deployment_credentials_with_provider(model_id="embedding-model")
assert credentials is not None
assert credentials["project_id"] == "embedding-project"
def test_get_deployment_credentials_with_provider_bedrock_batch_fields():
"""
Test that get_deployment_credentials_with_provider returns the deployment's