The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(crusoe): fix docs trailing slash, test state pollution, missing __init__.py
Emmanuel Acheampong9039eb189851
diff --git a/docs/my-website/docs/providers/crusoe.md b/docs/my-website/docs/providers/crusoe.mdindex 696da3fa1bc..dbcd0264981 100644--- a/docs/my-website/docs/providers/crusoe.md+++ b/docs/my-website/docs/providers/crusoe.md@@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';| Description | Crusoe Cloud provides GPU-accelerated inference for open-source large language models, optimized for performance and cost efficiency. || Provider Route on LiteLLM | `crusoe/` || Link to Provider Doc | [Crusoe Managed Inference Documentation ↗](https://docs.crusoecloud.com/managed-inference/overview/index.html) |-| Base URL | `https://managed-inference-api-proxy.crusoecloud.com/v1/` |+| Base URL | `https://managed-inference-api-proxy.crusoecloud.com/v1` || Supported Operations | [`/chat/completions`](#sample-usage) |<br />diff --git a/tests/llm_translation/test_crusoe.py b/tests/llm_translation/test_crusoe.pyindex 66854b2869f..e570e314cd8 100644--- a/tests/llm_translation/test_crusoe.py+++ b/tests/llm_translation/test_crusoe.py@@ -77,10 +77,13 @@ def test_crusoe_models_configuration():"""Test that Crusoe models are configured correctly"""from litellm import get_model_info- os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"- litellm.model_cost = litellm.get_model_cost_map(url="")+ original_model_cost = litellm.model_cost+ original_env = os.environ.get("LITELLM_LOCAL_MODEL_COST_MAP")+ try:+ os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"+ litellm.model_cost = litellm.get_model_cost_map(url="")- crusoe_models = [+ crusoe_models = ["crusoe/meta-llama/Llama-3.3-70B-Instruct","crusoe/deepseek-ai/DeepSeek-R1-0528","crusoe/deepseek-ai/DeepSeek-V3-0324",@@ -90,10 +93,16 @@ def test_crusoe_models_configuration():"crusoe/google/gemma-3-12b-it",]- for model in crusoe_models:- model_info = get_model_info(model)- assert model_info is not None, f"Model info not found for {model}"- assert model_info.get("litellm_provider") == "crusoe", (- f"{model} should have crusoe as provider"- )- assert model_info.get("mode") == "chat", f"{model} should be in chat mode"+ for model in crusoe_models:+ model_info = get_model_info(model)+ assert model_info is not None, f"Model info not found for {model}"+ assert model_info.get("litellm_provider") == "crusoe", (+ f"{model} should have crusoe as provider"+ )+ assert model_info.get("mode") == "chat", f"{model} should be in chat mode"+ finally:+ litellm.model_cost = original_model_cost+ if original_env is None:+ os.environ.pop("LITELLM_LOCAL_MODEL_COST_MAP", None)+ else:+ os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = original_envdiff --git a/tests/test_litellm/llms/crusoe/__init__.py b/tests/test_litellm/llms/crusoe/__init__.pynew file mode 100644index 00000000000..e69de29bb2ddiff --git a/tests/test_litellm/llms/crusoe/test_crusoe.py b/tests/test_litellm/llms/crusoe/test_crusoe.pyindex 485c00b357c..70c538d915a 100644--- a/tests/test_litellm/llms/crusoe/test_crusoe.py+++ b/tests/test_litellm/llms/crusoe/test_crusoe.py@@ -91,18 +91,27 @@ def test_crusoe_model_list_populated():"""Test Crusoe models are present in model_prices_and_context_window.json"""import litellm- os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"- litellm.model_cost = litellm.get_model_cost_map(url="")-- expected = [- "crusoe/meta-llama/Llama-3.3-70B-Instruct",- "crusoe/deepseek-ai/DeepSeek-R1-0528",- "crusoe/deepseek-ai/DeepSeek-V3-0324",- "crusoe/Qwen/Qwen3-235B-A22B-Instruct-2507",- "crusoe/moonshotai/Kimi-K2-Thinking",- "crusoe/openai/gpt-oss-120b",- "crusoe/google/gemma-3-12b-it",- ]- for model in expected:- assert model in litellm.model_cost, f"{model} not found in model_cost"- assert litellm.model_cost[model].get("litellm_provider") == "crusoe"+ original_model_cost = litellm.model_cost+ original_env = os.environ.get("LITELLM_LOCAL_MODEL_COST_MAP")+ try:+ os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"+ litellm.model_cost = litellm.get_model_cost_map(url="")++ expected = [+ "crusoe/meta-llama/Llama-3.3-70B-Instruct",+ "crusoe/deepseek-ai/DeepSeek-R1-0528",+ "crusoe/deepseek-ai/DeepSeek-V3-0324",+ "crusoe/Qwen/Qwen3-235B-A22B-Instruct-2507",+ "crusoe/moonshotai/Kimi-K2-Thinking",+ "crusoe/openai/gpt-oss-120b",+ "crusoe/google/gemma-3-12b-it",+ ]+ for model in expected:+ assert model in litellm.model_cost, f"{model} not found in model_cost"+ assert litellm.model_cost[model].get("litellm_provider") == "crusoe"+ finally:+ litellm.model_cost = original_model_cost+ if original_env is None:+ os.environ.pop("LITELLM_LOCAL_MODEL_COST_MAP", None)+ else:+ os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = original_env