From 6dfe8a6d18bd3e40e3365fe6c97aa2a5af0953ab Mon Sep 17 00:00:00 2001 From: Abhi Ram Salammagari Date: Sat, 30 May 2026 15:04:27 -0700 Subject: [PATCH] Address review feedback for kluster.ai provider - Add provider_endpoints_support.json entry (fixes the code-quality provider-documentation check). - Expand supported OpenAI params (user, seed, parallel_tool_calls, stream_options, max_completion_tokens). - Make the provider-info test hermetic by patching get_secret_str instead of os.environ. --- litellm/llms/kluster_ai/chat/transformation.py | 5 +++++ provider_endpoints_support.json | 18 ++++++++++++++++++ .../test_kluster_ai_chat_transformation.py | 8 +++++++- 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/litellm/llms/kluster_ai/chat/transformation.py b/litellm/llms/kluster_ai/chat/transformation.py index 63b012bf7e1..50c8c5422fd 100644 --- a/litellm/llms/kluster_ai/chat/transformation.py +++ b/litellm/llms/kluster_ai/chat/transformation.py @@ -40,10 +40,13 @@ class KlusterAIConfig(OpenAIGPTConfig): def get_supported_openai_params(self, model: str) -> list: return [ "max_tokens", + "max_completion_tokens", "n", "temperature", "top_p", + "seed", "stream", + "stream_options", "logprobs", "top_logprobs", "frequency_penalty", @@ -53,4 +56,6 @@ class KlusterAIConfig(OpenAIGPTConfig): "logit_bias", "tools", "tool_choice", + "parallel_tool_calls", + "user", ] diff --git a/provider_endpoints_support.json b/provider_endpoints_support.json index 388752b032e..f33e23ed039 100644 --- a/provider_endpoints_support.json +++ b/provider_endpoints_support.json @@ -32,6 +32,24 @@ } }, "providers": { + "kluster_ai": { + "display_name": "Kluster AI (`kluster_ai`)", + "url": "https://docs.litellm.ai/docs/providers/kluster_ai", + "endpoints": { + "chat_completions": true, + "messages": true, + "responses": true, + "embeddings": false, + "image_generations": false, + "audio_transcriptions": false, + "audio_speech": false, + "moderations": false, + "batches": false, + "rerank": false, + "a2a": true, + "interactions": true + } + }, "a2a": { "display_name": "A2A (Agent-to-Agent) (`a2a`)", "url": "https://docs.litellm.ai/docs/providers/a2a", diff --git a/tests/test_litellm/llms/kluster_ai/chat/test_kluster_ai_chat_transformation.py b/tests/test_litellm/llms/kluster_ai/chat/test_kluster_ai_chat_transformation.py index bfc775e13ff..57ad2132922 100644 --- a/tests/test_litellm/llms/kluster_ai/chat/test_kluster_ai_chat_transformation.py +++ b/tests/test_litellm/llms/kluster_ai/chat/test_kluster_ai_chat_transformation.py @@ -51,7 +51,13 @@ class TestKlusterAIConfig: assert KlusterAIConfig.API_BASE_URL == "https://api.kluster.ai/v1" def test_get_openai_compatible_provider_info(self): - with patch.dict(os.environ, {"KLUSTER_AI_API_KEY": "sk-secret"}, clear=False): + def fake_secret(name, *args, **kwargs): + return "sk-secret" if name == "KLUSTER_AI_API_KEY" else None + + with patch( + "litellm.llms.kluster_ai.chat.transformation.get_secret_str", + side_effect=fake_secret, + ): api_base, api_key = self.config._get_openai_compatible_provider_info( api_base=None, api_key=None )