mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
chore(openrouter): bump core ver, silence warning (#35231)
This commit is contained in:
@@ -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" = [
|
||||
|
||||
@@ -1109,6 +1109,7 @@ 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"}
|
||||
with pytest.warns(UserWarning, match="Unrecognized message role"):
|
||||
msg = _convert_dict_to_message(d)
|
||||
assert isinstance(msg, ChatMessage)
|
||||
assert msg.role == "developer"
|
||||
@@ -1445,6 +1446,7 @@ class TestStreamingChunks:
|
||||
chunk: dict[str, Any] = {
|
||||
"choices": [{"delta": {"role": "developer", "content": "test"}}]
|
||||
}
|
||||
with pytest.warns(UserWarning, match="Unrecognized streaming chunk role"):
|
||||
msg = _convert_chunk_to_message_chunk(chunk, ChatMessageChunk)
|
||||
assert isinstance(msg, ChatMessageChunk)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user