From 7a3827471bf30d8db66accc8769fee99da0ead64 Mon Sep 17 00:00:00 2001 From: ccurme Date: Mon, 3 Nov 2025 11:10:33 -0500 Subject: [PATCH] fix(model-profiles): fix pdf_inputs field (#33797) --- libs/model-profiles/langchain_model_profiles/model_profile.py | 3 ++- libs/model-profiles/tests/unit_tests/test_chat_model.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/model-profiles/langchain_model_profiles/model_profile.py b/libs/model-profiles/langchain_model_profiles/model_profile.py index 6eb06a860ed..e6dd04dacc6 100644 --- a/libs/model-profiles/langchain_model_profiles/model_profile.py +++ b/libs/model-profiles/langchain_model_profiles/model_profile.py @@ -154,7 +154,8 @@ def get_model_profile(provider: str, model: str) -> ModelProfile | None: "image_url_inputs": data.get("image_url_inputs"), "image_tool_message": data.get("image_tool_message"), "audio_inputs": "audio" in data.get("modalities", {}).get("input", []), - "pdf_inputs": "pdf" in data.get("modalities", {}).get("input", []), + "pdf_inputs": "pdf" in data.get("modalities", {}).get("input", []) + or data.get("pdf_inputs"), "pdf_tool_message": data.get("pdf_tool_message"), "video_inputs": "video" in data.get("modalities", {}).get("input", []), "max_output_tokens": data.get("limit", {}).get("output"), diff --git a/libs/model-profiles/tests/unit_tests/test_chat_model.py b/libs/model-profiles/tests/unit_tests/test_chat_model.py index 26fb9bef629..a32e52c0122 100644 --- a/libs/model-profiles/tests/unit_tests/test_chat_model.py +++ b/libs/model-profiles/tests/unit_tests/test_chat_model.py @@ -9,6 +9,7 @@ def test_chat_model() -> None: assert model.profile assert model.profile["max_input_tokens"] == 400000 assert model.profile["structured_output"] + assert model.profile["pdf_inputs"] def test_chat_model_no_data() -> None: