From 51214ed26e1c8a43b1384bcd5e03ab55b210e4bb Mon Sep 17 00:00:00 2001 From: Daniel JB Clark Date: Sat, 3 Oct 2026 12:25:22 -0400 Subject: [PATCH] =?UTF-8?q?fix(clinepass):=20address=20CI=20=E2=80=94=20mi?= =?UTF-8?q?rrored=20cost=20map,=20logoless=20set,=20formatting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three failures from the first CI run on the PR, all genuine and all local: - `cost-map-guard`: litellm/model_prices_and_context_window_backup.json is a mirror of the root cost map and must be copied over whenever the root changes. I did not know that second copy existed. - `ui-unit-tests`: provider_info_helpers.test.tsx asserts every provider maps to a bundled logo *except* a known-logoless set. ClinePass intentionally ships no logo -- the `` component falls back to a first-letter circle rather than an invented asset -- so it belongs in that set, not in the logo map. - `lint`: `ruff format` on litellm/main.py and the endpoint-guard test. Not fixed here, because it cannot be: `documentation` and `code-quality` both fail with "Environment variables read under ./litellm but mentioned nowhere in the docs: ['CLINEPASS_API_BASE', 'CLINEPASS_API_KEY']". That check resolves docs by checking out BerriAI/litellm-docs into docs/my-website (the test raises "check out BerriAI/litellm-docs into docs/my-website" when the directory is absent), so those two keys stay undocumented until a companion PR lands there. It is a genuine cross-repo ordering dependency, not something this branch can satisfy alone. Co-Authored-By: Claude Opus 5 --- litellm/main.py | 4 +--- litellm/model_prices_and_context_window_backup.json | 4 ++++ .../unit/llms/clinepass/test_clinepass_endpoint_guard.py | 8 ++------ .../src/components/provider_info_helpers.test.tsx | 1 + 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/litellm/main.py b/litellm/main.py index a074355e117..979808143d7 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -2468,9 +2468,7 @@ def _complete_clinepass(ctx: _CompletionDispatchContext) -> _CompletionDispatchR api_key = api_key or get_secret_str("CLINEPASS_API_KEY") or litellm.api_key - api_base = ( - api_base or litellm.api_base or get_secret_str("CLINEPASS_API_BASE") or "https://api.cline.bot/api/v1" - ) + api_base = api_base or litellm.api_base or get_secret_str("CLINEPASS_API_BASE") or "https://api.cline.bot/api/v1" ## COMPLETION CALL response: Final = base_llm_http_handler.completion( diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index 3d2acf4e9d9..4bfb6e3d5fe 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -15612,6 +15612,10 @@ "prompt_cache_min_tokens": 1024, "source": "https://platform.claude.com/docs/en/about-claude/pricing" }, + "clinepass/deepseek-v4-flash": { + "litellm_provider": "clinepass", + "mode": "chat" + }, "cloudflare/clef": { "input_cost_per_token": 2.4e-07, "litellm_provider": "cloudflare", diff --git a/tests/unit/llms/clinepass/test_clinepass_endpoint_guard.py b/tests/unit/llms/clinepass/test_clinepass_endpoint_guard.py index 83d798c9b35..c50693c1dfb 100644 --- a/tests/unit/llms/clinepass/test_clinepass_endpoint_guard.py +++ b/tests/unit/llms/clinepass/test_clinepass_endpoint_guard.py @@ -87,13 +87,9 @@ def test_image_generation_makes_no_outbound_request(no_request_allowed): def test_openai_credential_is_never_transmitted(no_request_allowed): """The point of the P1: whatever happens, the OpenAI key must not go out.""" for call in ( - lambda: litellm.speech( - model="clinepass/deepseek-v4-flash", input="hi", voice="alloy" - ), + lambda: litellm.speech(model="clinepass/deepseek-v4-flash", input="hi", voice="alloy"), lambda: litellm.transcription(model="clinepass/deepseek-v4-flash", file=None), - lambda: litellm.image_generation( - model="clinepass/deepseek-v4-flash", prompt="a cat" - ), + lambda: litellm.image_generation(model="clinepass/deepseek-v4-flash", prompt="a cat"), ): # Whether each endpoint raises or returns an empty response is upstream's # business; that no credential leaves the process is ours. diff --git a/ui/litellm-dashboard/src/components/provider_info_helpers.test.tsx b/ui/litellm-dashboard/src/components/provider_info_helpers.test.tsx index 7cfdaf3275d..899041765d7 100644 --- a/ui/litellm-dashboard/src/components/provider_info_helpers.test.tsx +++ b/ui/litellm-dashboard/src/components/provider_info_helpers.test.tsx @@ -176,6 +176,7 @@ describe("provider_info_helpers", () => { Providers.AUTO_ROUTER, Providers.BYTEZ, Providers.CLARIFAI, + Providers.CLINEPASS, Providers.Cognition, Providers.COMPACTIFAI, Providers.DATAROBOT,