From e2a4ba7ff358366fd183de809259e4ab62fffc67 Mon Sep 17 00:00:00 2001 From: gorkii Date: Tue, 5 May 2026 13:46:46 -0400 Subject: [PATCH] update provider SDK, upgrade Qwen models, add Gemma 4 26B --- docs/my-website/docs/providers/salad_cloud.md | 42 +++++++------ litellm/llms/openai_like/providers.json | 2 +- model_prices_and_context_window.json | 60 ++++++++++++------- .../llms/openai_like/test_salad_cloud.py | 17 +++--- 4 files changed, 73 insertions(+), 48 deletions(-) diff --git a/docs/my-website/docs/providers/salad_cloud.md b/docs/my-website/docs/providers/salad_cloud.md index ae38fd273de..16c6f51d5ec 100644 --- a/docs/my-website/docs/providers/salad_cloud.md +++ b/docs/my-website/docs/providers/salad_cloud.md @@ -3,7 +3,7 @@ ## Overview | Property | Details | -|-------|-------| +| ------- | ------- | | Description | SaladCloud AI Gateway is an OpenAI-compatible LLM API service powered by distributed GPU infrastructure. | | Provider Route on LiteLLM | `salad_cloud/` | | Link to Provider Doc | [SaladCloud AI Gateway ↗](https://docs.salad.com/ai-gateway/explanation/overview) | @@ -12,13 +12,11 @@ ## Required Variables ```python showLineNumbers title="Environment Variables" -os.environ["SALAD_API_KEY"] = "" # your SaladCloud API key +os.environ["SALAD_CLOUD_API_KEY"] = "" # your SaladCloud API key ``` Get your SaladCloud API key by signing up at [portal.salad.com](https://portal.salad.com/) -While the service is in beta, sign up at [salad.com/ai-gateway](https://salad.com/ai-gateway). - ## Usage - LiteLLM Python SDK ### Non-streaming @@ -28,12 +26,12 @@ import os import litellm from litellm import completion -os.environ["SALAD_API_KEY"] = "" # your SaladCloud API key +os.environ["SALAD_CLOUD_API_KEY"] = "" # your SaladCloud API key messages = [{"content": "What is the capital of France?", "role": "user"}] response = completion( - model="salad_cloud/qwen3.5-35b-a3b", + model="salad_cloud/qwen3.6-35b-a3b", messages=messages ) @@ -47,12 +45,12 @@ import os import litellm from litellm import completion -os.environ["SALAD_API_KEY"] = "" # your SaladCloud API key +os.environ["SALAD_CLOUD_API_KEY"] = "" # your SaladCloud API key messages = [{"content": "Write a short poem about distributed computing.", "role": "user"}] response = completion( - model="salad_cloud/qwen3.5-35b-a3b", + model="salad_cloud/qwen3.6-35b-a3b", messages=messages, stream=True ) @@ -66,34 +64,40 @@ for chunk in response: ### 1. Save key in your environment ```bash -export SALAD_API_KEY="" +export SALAD_CLOUD_API_KEY="" ``` ### 2. Start the proxy ```yaml model_list: - - model_name: qwen3.5-35b + - model_name: qwen3.6-35b litellm_params: - model: salad_cloud/qwen3.5-35b-a3b - api_key: os.environ/SALAD_API_KEY - - model_name: qwen3.5-27b + model: salad_cloud/qwen3.6-35b-a3b + api_key: os.environ/SALAD_CLOUD_API_KEY + - model_name: qwen3.6-27b litellm_params: - model: salad_cloud/qwen3.5-27b - api_key: os.environ/SALAD_API_KEY + model: salad_cloud/qwen3.6-27b + api_key: os.environ/SALAD_CLOUD_API_KEY - model_name: qwen3.5-9b litellm_params: model: salad_cloud/qwen3.5-9b - api_key: os.environ/SALAD_API_KEY + api_key: os.environ/SALAD_CLOUD_API_KEY + - model_name: gemma-4-26b-a4b-instruct + litellm_params: + model: salad_cloud/gemma-4-26b-a4b-instruct + api_key: os.environ/SALAD_CLOUD_API_KEY ``` ## Supported Models -`salad_cloud/qwen3.5-35b-a3b` -`salad_cloud/qwen3.5-27b` +`salad_cloud/qwen3.6-35b-a3b` +`salad_cloud/qwen3.6-27b` `salad_cloud/qwen3.5-9b` +`salad_cloud/gemma-4-26b-a4b-instruct` ## Additional Resources - [SaladCloud AI Gateway Overview](https://docs.salad.com/ai-gateway/explanation/overview) -- [SaladCloud Sign-up](https://salad.com/ai-gateway) +- [SaladCloud Pricing](https://docs.salad.com/ai-gateway/reference/pricing) +- [SaladCloud Sign-up](https://portal.salad.com/) diff --git a/litellm/llms/openai_like/providers.json b/litellm/llms/openai_like/providers.json index d58dbe4b755..00c0f1f23e7 100644 --- a/litellm/llms/openai_like/providers.json +++ b/litellm/llms/openai_like/providers.json @@ -104,6 +104,6 @@ }, "salad_cloud": { "base_url": "https://ai.salad.cloud/v1", - "api_key_env": "SALAD_API_KEY" + "api_key_env": "SALAD_CLOUD_API_KEY" } } diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index 5f940c21476..5bf8c7d0e37 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -38108,40 +38108,60 @@ "supports_native_structured_output": true, "supports_pdf_input": true }, - "salad_cloud/qwen3.5-35b-a3b": { + "salad_cloud/qwen3.6-35b-a3b": { "litellm_provider": "salad_cloud", "mode": "chat", - "max_tokens": 131072, - "max_input_tokens": 131072, - "max_output_tokens": 131072, - "input_cost_per_token": 0.0, - "output_cost_per_token": 0.0, + "max_tokens": 262144, + "max_input_tokens": 262144, + "max_output_tokens": 262144, + "input_cost_per_token": 9e-08, + "output_cost_per_token": 6e-07, "supports_function_calling": true, "supports_tool_choice": true, - "source": "https://docs.salad.com/ai-gateway/explanation/overview" + "supports_vision": true, + "supports_reasoning": true, + "source": "https://docs.salad.com/ai-gateway/reference/pricing" }, - "salad_cloud/qwen3.5-27b": { + "salad_cloud/qwen3.6-27b": { "litellm_provider": "salad_cloud", "mode": "chat", - "max_tokens": 131072, - "max_input_tokens": 131072, - "max_output_tokens": 131072, - "input_cost_per_token": 0.0, - "output_cost_per_token": 0.0, + "max_tokens": 262144, + "max_input_tokens": 262144, + "max_output_tokens": 262144, + "input_cost_per_token": 3e-07, + "output_cost_per_token": 1.2e-06, "supports_function_calling": true, "supports_tool_choice": true, - "source": "https://docs.salad.com/ai-gateway/explanation/overview" + "supports_vision": true, + "supports_reasoning": true, + "source": "https://docs.salad.com/ai-gateway/reference/pricing" }, "salad_cloud/qwen3.5-9b": { "litellm_provider": "salad_cloud", "mode": "chat", - "max_tokens": 131072, - "max_input_tokens": 131072, - "max_output_tokens": 131072, - "input_cost_per_token": 0.0, - "output_cost_per_token": 0.0, + "max_tokens": 262144, + "max_input_tokens": 262144, + "max_output_tokens": 262144, + "input_cost_per_token": 6e-08, + "output_cost_per_token": 9e-08, "supports_function_calling": true, "supports_tool_choice": true, - "source": "https://docs.salad.com/ai-gateway/explanation/overview" + "supports_vision": true, + "supports_reasoning": true, + "source": "https://docs.salad.com/ai-gateway/reference/pricing" + }, + "salad_cloud/gemma-4-26b-a4b-instruct": { + "litellm_provider": "salad_cloud", + "mode": "chat", + "max_tokens": 262144, + "max_input_tokens": 262144, + "max_output_tokens": 262144, + "input_cost_per_token": 4e-08, + "output_cost_per_token": 2e-07, + "supports_function_calling": true, + "supports_tool_choice": true, + "supports_vision": true, + "supports_reasoning": true, + "source": "https://docs.salad.com/ai-gateway/reference/pricing" } } diff --git a/tests/test_litellm/llms/openai_like/test_salad_cloud.py b/tests/test_litellm/llms/openai_like/test_salad_cloud.py index 677c2e82715..ef3f8af509c 100644 --- a/tests/test_litellm/llms/openai_like/test_salad_cloud.py +++ b/tests/test_litellm/llms/openai_like/test_salad_cloud.py @@ -35,20 +35,20 @@ class TestSaladCloudProviderConfig: salad_cloud = JSONProviderRegistry.get("salad_cloud") assert salad_cloud is not None assert salad_cloud.base_url == "https://ai.salad.cloud/v1" - assert salad_cloud.api_key_env == "SALAD_API_KEY" + assert salad_cloud.api_key_env == "SALAD_CLOUD_API_KEY" def test_salad_cloud_provider_resolution(self): """Test that provider resolution correctly routes salad_cloud models""" from litellm.litellm_core_utils.get_llm_provider_logic import get_llm_provider model, provider, api_key, api_base = get_llm_provider( - model="salad_cloud/qwen3.5-35b-a3b", + model="salad_cloud/qwen3.6-35b-a3b", custom_llm_provider=None, api_base=None, api_key=None, ) - assert model == "qwen3.5-35b-a3b" + assert model == "qwen3.6-35b-a3b" assert provider == "salad_cloud" assert api_base == "https://ai.salad.cloud/v1" @@ -59,9 +59,9 @@ class TestSaladCloudProviderConfig: router = Router( model_list=[ { - "model_name": "qwen3.5-35b", + "model_name": "qwen3.6-35b", "litellm_params": { - "model": "salad_cloud/qwen3.5-35b-a3b", + "model": "salad_cloud/qwen3.6-35b-a3b", "api_key": "test-key", }, } @@ -69,7 +69,7 @@ class TestSaladCloudProviderConfig: ) assert len(router.model_list) == 1 - assert router.model_list[0]["model_name"] == "qwen3.5-35b" + assert router.model_list[0]["model_name"] == "qwen3.6-35b" def test_salad_cloud_models_in_pricing(self): """Test that all SaladCloud models are present in model_prices_and_context_window.json""" @@ -84,9 +84,10 @@ class TestSaladCloudProviderConfig: model_cost = json.load(f) expected_models = [ - "salad_cloud/qwen3.5-35b-a3b", - "salad_cloud/qwen3.5-27b", + "salad_cloud/qwen3.6-35b-a3b", + "salad_cloud/qwen3.6-27b", "salad_cloud/qwen3.5-9b", + "salad_cloud/gemma-4-26b-a4b-instruct", ] for model in expected_models: