langchain/libs/standard-tests/tests/unit_tests
ccurme 22d1a7d7b6
standard-tests[patch]: require model_name in response_metadata if returns_usage_metadata (#30497)
We are implementing a token-counting callback handler in
`langchain-core` that is intended to work with all chat models
supporting usage metadata. The callback will aggregate usage metadata by
model. This requires responses to include the model name in its
metadata.

To support this, if a model `returns_usage_metadata`, we check that it
includes a string model name in its `response_metadata` in the
`"model_name"` key.

More context: https://github.com/langchain-ai/langchain/pull/30487
2025-03-26 12:20:53 -04:00
..
__init__.py standard-tests[minor]: Add standard read write test suite for vectorstores (#23355) 2024-06-24 19:40:56 +00:00
custom_chat_model.py standard-tests[patch]: require model_name in response_metadata if returns_usage_metadata (#30497) 2025-03-26 12:20:53 -04:00
test_basic_retriever.py core, tests: more tolerant _aget_relevant_documents function (#28462) 2024-12-06 00:49:30 +00:00
test_basic_tool.py standard-tests: Fix ToolsIntegrationTests to correctly handle "content_and_artifact" tools (#29391) 2025-02-05 21:27:09 -05:00
test_custom_chat_model.py docs: poetry publish 2 (#28277) 2024-11-21 20:49:38 -08:00
test_decorated_tool.py standard-tests: fix decorator init test (#28246) 2024-11-21 03:35:43 +00:00
test_embeddings.py tests[patch]: run standard tests for embeddings and populate embeddings API ref (#28545) 2024-12-05 19:39:03 +00:00
test_in_memory_base_store.py standard-tests: rename langchain_standard_tests to langchain_tests, release 0.3.2 (#28203) 2024-11-18 19:10:39 -08:00
test_in_memory_cache.py standard-tests: rename langchain_standard_tests to langchain_tests, release 0.3.2 (#28203) 2024-11-18 19:10:39 -08:00
test_in_memory_vectorstore.py multiple: combine sync/async vector store standard test suites (#28580) 2024-12-06 14:55:06 -05:00