fix(azure_ai): route only cohere parse deployment names to Cohere Parse

This commit is contained in:
mateo-berri 2026-09-04 22:07:26 -07:00
parent 8426235290
commit d3a179f988
2 changed files with 5 additions and 2 deletions

View file

@ -25,7 +25,8 @@ def is_azure_document_intelligence_model(model: str) -> bool:
def is_azure_cohere_parse_model(model: str) -> bool:
return "parse" in model.lower()
lowered: Final = model.lower()
return "cohere" in lowered and "parse" in lowered
def get_azure_ai_ocr_config(model: str) -> Optional["BaseOCRConfig"]:

View file

@ -40,7 +40,9 @@ def disable_aiohttp_transport(monkeypatch):
[
("Cohere-parse-v5", AzureAICohereParseConfig),
("cohere-parse-v5", AzureAICohereParseConfig),
("parse-v5", AzureAICohereParseConfig),
("cohere/parse-v5", AzureAICohereParseConfig),
("invoice-parser", AzureAIOCRConfig),
("parse-v5", AzureAIOCRConfig),
("mistral-ocr-4-0", AzureAIOCRConfig),
("mistral-document-ai-2512", AzureAIOCRConfig),
("doc-intelligence/prebuilt-read", AzureDocumentIntelligenceOCRConfig),