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

* fix(langsmith.py): respect langsmith batch size param

* build(model_prices_and_context_window.json): add missing tgai  models

Fixes https://github.com/BerriAI/litellm/issues/8921

Fixes https://github.com/BerriAI/litellm/issues/8278
This commit is contained in:
Krish Dholakia
2025-04-29 18:55:22 -07:00
committed by GitHub
parent cd27185e2c
commit 70accb754e
3 changed files with 101 additions and 3 deletions
+3 -3
View File
@@ -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,
@@ -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,
+49
View File
@@ -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,