mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-15 06:09:21 +03:00
**Description:** The response from `tool.invoke()` is always a ToolMessage, with content and artifact fields, not a tuple. The tuple is converted to a ToolMessage here https://github.com/langchain-ai/langchain/blob/b6ae7ca91dd0f54f58475463804540ad25eeea7d/libs/core/langchain_core/tools/base.py#L726 **Issue:** Currently `ToolsIntegrationTests` requires `invoke()` to return a tuple and so standard tests fail for "content_and_artifact" tools. This fixes that to check the returned ToolMessage. This PR also adds a test that now passes.