From f38b677ddca39f83430e3c5911d40edba63cb367 Mon Sep 17 00:00:00 2001 From: yassin Date: Thu, 10 Sep 2026 04:14:06 +0000 Subject: [PATCH] ci(gateway): run tests/test_gateway in the proxy-infra shard and justify the mock usage cast Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .github/workflows/test-unit.yml | 1 + litellm/main.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index cc606339a20..f55c87c2ae5 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -200,6 +200,7 @@ jobs: tests/test_litellm/proxy/types_utils tests/test_litellm/proxy/logging_endpoints tests/test_litellm/proxy/test_*.py + tests/test_gateway workers: 4 reruns: 2 timeout-minutes: 20 diff --git a/litellm/main.py b/litellm/main.py index ced63391fca..802779e83fd 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -5565,7 +5565,9 @@ def completion( custom_llm_provider=custom_llm_provider, mock_timeout=mock_timeout, timeout=timeout, - prompt_tokens=admission_input_tokens(cast(Mapping[str, object], kwargs)), + prompt_tokens=admission_input_tokens( + cast(Mapping[str, object], kwargs) # cast-ok: completion's **kwargs is untyped + ), ) ## RESPONSES API BRIDGE LOGIC ## - check if model has 'mode: responses' in litellm.model_cost map