Skip to content

The agent engineering platform.

docs(standard-tests): fix `supports_json_mode` docstring (#34181)

Mason Daugherty3108b14164c8
diff --git a/libs/standard-tests/langchain_tests/integration_tests/chat_models.py b/libs/standard-tests/langchain_tests/integration_tests/chat_models.py
index c925346907..bc366de176 100644
--- a/libs/standard-tests/langchain_tests/integration_tests/chat_models.py
+++ b/libs/standard-tests/langchain_tests/integration_tests/chat_models.py
@@ -314,13 +314,16 @@ class ChatModelIntegrationTests(ChatModelTests):
Boolean property indicating whether the chat model supports
`method='json_mode'` in `with_structured_output`.
+ Defaults to `False`.
+
JSON mode constrains the model to output valid JSON without enforcing
a specific schema (unlike `'function_calling'` or `'json_schema'` methods).
When using JSON mode, you must prompt the model to output JSON in your
message.
- Example:
+ !!! example
+
```python
structured_llm = llm.with_structured_output(MySchema, method="json_mode")
structured_llm.invoke("... Return the result as JSON.")
@@ -328,8 +331,6 @@ class ChatModelIntegrationTests(ChatModelTests):
See docs for [Structured output](https://docs.langchain.com/oss/python/langchain/structured-output).
- Defaults to `False`.
-
```python
@property
def supports_json_mode(self) -> bool: