mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-06 06:24:16 +00:00
Update mistral 'supports_response_schema' field + Fix ollama embedding (#12024)
* build(model_prices_and_context_window.json): update all mistral models (besides codestral-mamba) to indicate support for response schema Closes https://github.com/BerriAI/litellm/issues/12012 * fix(route_llm_request.py): if llm router is not initialized, go straight through to litellm sdk Fixes https://github.com/BerriAI/litellm/issues/12008 * test: add unit test * fix(ollama_embeddings): fix unecessary await Fixes https://github.com/BerriAI/litellm/issues/11997 * test: update ollama embedding tests
This commit is contained in:
+8
-12
@@ -1,24 +1,20 @@
|
||||
import os
|
||||
import json
|
||||
|
||||
gemini_model_cost_map = json.load(open("model_prices_and_context_window.json"))
|
||||
mistral_model_cost_map = json.load(open("model_prices_and_context_window.json"))
|
||||
|
||||
for model, model_info in gemini_model_cost_map.items():
|
||||
for model, model_info in mistral_model_cost_map.items():
|
||||
if (
|
||||
(
|
||||
model_info.get("litellm_provider") == "gemini"
|
||||
or model_info.get("litellm_provider") == "vertex_ai-language-models"
|
||||
)
|
||||
(model_info.get("litellm_provider") == "mistral")
|
||||
and model_info.get("mode") == "chat"
|
||||
and ("gemini-2.5" in model and "tts" not in model)
|
||||
and model_info.get("supports_pdf_input") is None
|
||||
and ("codestral-mamba" not in model)
|
||||
):
|
||||
"""
|
||||
Update all gemini chat models to support pdf input
|
||||
Update all mistral models to supports_response_schema
|
||||
"""
|
||||
model_info["supports_pdf_input"] = True
|
||||
print(f"Updated {model} to support pdf input")
|
||||
model_info["supports_response_schema"] = True
|
||||
print(f"Updated {model} to support response schema")
|
||||
|
||||
json.dump(
|
||||
gemini_model_cost_map, open("model_prices_and_context_window.json", "w"), indent=4
|
||||
mistral_model_cost_map, open("model_prices_and_context_window.json", "w"), indent=4
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user