Skip to content

The agent engineering platform.

chore(openrouter): bump core ver, silence warning (#35231)

Mason Daugherty04ec7ff8fffc
diff --git a/libs/partners/openrouter/pyproject.toml b/libs/partners/openrouter/pyproject.toml
index d83d8b753b..63f4b1c498 100644
--- a/libs/partners/openrouter/pyproject.toml
+++ b/libs/partners/openrouter/pyproject.toml
@@ -23,7 +23,7 @@ classifiers = [
version = "0.0.2"
requires-python = ">=3.10.0,<4.0.0"
dependencies = [
- "langchain-core>=1.2.11,<2.0.0",
+ "langchain-core>=1.2.13,<2.0.0",
"openrouter>=0.6.0,<1.0.0",
]
@@ -91,6 +91,9 @@ markers = [
"compile: mark placeholder test used to compile integration tests without running them",
]
asyncio_mode = "auto"
+filterwarnings = [
+ "ignore:Unrecognized structured output method:UserWarning",
+]
[tool.ruff.lint.extend-per-file-ignores]
"tests/**/*.py" = [
diff --git a/libs/partners/openrouter/tests/unit_tests/test_chat_models.py b/libs/partners/openrouter/tests/unit_tests/test_chat_models.py
index 16c728028f..e35bcf9f2d 100644
--- a/libs/partners/openrouter/tests/unit_tests/test_chat_models.py
+++ b/libs/partners/openrouter/tests/unit_tests/test_chat_models.py
@@ -1109,7 +1109,8 @@ class TestMessageConversion:
def test_dict_to_chat_message_unknown_role(self) -> None:
"""Test that unrecognized roles fall back to ChatMessage."""
d = {"role": "developer", "content": "Some content"}
- msg = _convert_dict_to_message(d)
+ with pytest.warns(UserWarning, match="Unrecognized message role"):
+ msg = _convert_dict_to_message(d)
assert isinstance(msg, ChatMessage)
assert msg.role == "developer"
assert msg.content == "Some content"
@@ -1445,7 +1446,8 @@ class TestStreamingChunks:
chunk: dict[str, Any] = {
"choices": [{"delta": {"role": "developer", "content": "test"}}]
}
- msg = _convert_chunk_to_message_chunk(chunk, ChatMessageChunk)
+ with pytest.warns(UserWarning, match="Unrecognized streaming chunk role"):
+ msg = _convert_chunk_to_message_chunk(chunk, ChatMessageChunk)
assert isinstance(msg, ChatMessageChunk)
def test_chunk_with_usage(self) -> None: