Skip to content

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]

fix(langsmith.py): respect langsmith batch size param (#10411)

Krish Dholakia70accb754ec1
diff --git a/litellm/integrations/langsmith.py b/litellm/integrations/langsmith.py
index 0914150db94..7035aa3a819 100644
--- a/litellm/integrations/langsmith.py
+++ b/litellm/integrations/langsmith.py
@@ -41,6 +41,8 @@ class LangsmithLogger(CustomBatchLogger):
langsmith_base_url: Optional[str] = None,
**kwargs,
):
+ self.flush_lock = asyncio.Lock()
+ super().__init__(**kwargs, flush_lock=self.flush_lock)
self.default_credentials = self.get_credentials_from_env(
langsmith_api_key=langsmith_api_key,
langsmith_project=langsmith_project,
@@ -61,13 +63,11 @@ class LangsmithLogger(CustomBatchLogger):
_batch_size = (
os.getenv("LANGSMITH_BATCH_SIZE", None) or litellm.langsmith_batch_size
)
+
if _batch_size:
self.batch_size = int(_batch_size)
self.log_queue: List[LangsmithQueueObject] = []
asyncio.create_task(self.periodic_flush())
- self.flush_lock = asyncio.Lock()
-
- super().__init__(**kwargs, flush_lock=self.flush_lock)
def get_credentials_from_env(
self,
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json
index ba199516e35..6e71a296f3e 100644
--- a/litellm/model_prices_and_context_window_backup.json
+++ b/litellm/model_prices_and_context_window_backup.json
@@ -10235,6 +10235,55 @@
"mode": "chat",
"supports_tool_choice": true
},
+ "together_ai/meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": {
+ "litellm_provider": "together_ai",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "together_ai/meta-llama/Llama-4-Scout-17B-16E-Instruct": {
+ "litellm_provider": "together_ai",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "together_ai/meta-llama/Llama-3.2-3B-Instruct-Turbo": {
+ "litellm_provider": "together_ai",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "together_ai/Qwen/Qwen2.5-7B-Instruct-Turbo": {
+ "litellm_provider": "together_ai",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "together_ai/Qwen/Qwen2.5-72B-Instruct-Turbo": {
+ "litellm_provider": "together_ai",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "together_ai/deepseek-ai/DeepSeek-V3": {
+ "litellm_provider": "together_ai",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "together_ai/mistralai/Mistral-Small-24B-Instruct-2501": {
+ "litellm_provider": "together_ai",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
"ollama/codegemma": {
"max_tokens": 8192,
"max_input_tokens": 8192,
diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json
index ba199516e35..6e71a296f3e 100644
--- a/model_prices_and_context_window.json
+++ b/model_prices_and_context_window.json
@@ -10235,6 +10235,55 @@
"mode": "chat",
"supports_tool_choice": true
},
+ "together_ai/meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": {
+ "litellm_provider": "together_ai",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "together_ai/meta-llama/Llama-4-Scout-17B-16E-Instruct": {
+ "litellm_provider": "together_ai",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "together_ai/meta-llama/Llama-3.2-3B-Instruct-Turbo": {
+ "litellm_provider": "together_ai",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "together_ai/Qwen/Qwen2.5-7B-Instruct-Turbo": {
+ "litellm_provider": "together_ai",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "together_ai/Qwen/Qwen2.5-72B-Instruct-Turbo": {
+ "litellm_provider": "together_ai",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "together_ai/deepseek-ai/DeepSeek-V3": {
+ "litellm_provider": "together_ai",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
+ "together_ai/mistralai/Mistral-Small-24B-Instruct-2501": {
+ "litellm_provider": "together_ai",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "mode": "chat",
+ "supports_tool_choice": true
+ },
"ollama/codegemma": {
"max_tokens": 8192,
"max_input_tokens": 8192,