Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libs/core/langchain_core/indexing/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ def index(
are not able to specify the uid of the document.

!!! warning "Behavior changed in `langchain-core` 0.3.25"

Added `scoped_full` cleanup mode.

!!! warning
Expand Down Expand Up @@ -640,6 +641,7 @@ async def aindex(
are not able to specify the uid of the document.

!!! warning "Behavior changed in `langchain-core` 0.3.25"

Added `scoped_full` cleanup mode.

!!! warning
Expand Down
1 change: 1 addition & 0 deletions libs/core/langchain_core/language_models/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def _normalize_messages(
- LangChain v0 standard content blocks for backward compatibility

!!! warning "Behavior changed in `langchain-core` 1.0.0"

In previous versions, this function returned messages in LangChain v0 format.
Now, it returns messages in LangChain v1 format, which upgraded chat models now
expect to receive when passing back in message history. For backward
Expand Down
1 change: 1 addition & 0 deletions libs/core/langchain_core/language_models/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1647,6 +1647,7 @@ class AnswerWithJustification(BaseModel):
```

!!! warning "Behavior changed in `langchain-core` 0.2.26"

Added support for `TypedDict` class.

""" # noqa: E501
Expand Down
2 changes: 2 additions & 0 deletions libs/core/langchain_core/messages/ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,11 @@ class UsageMetadata(TypedDict):
```

!!! warning "Behavior changed in `langchain-core` 0.3.9"

Added `input_token_details` and `output_token_details`.

!!! note "LangSmith SDK"

The LangSmith SDK also has a `UsageMetadata` class. While the two share fields,
LangSmith's `UsageMetadata` has additional fields to capture cost information
used by the LangSmith platform.
Expand Down
4 changes: 4 additions & 0 deletions libs/core/langchain_core/utils/function_calling.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ def convert_to_openai_function(
ValueError: If function is not in a supported format.

!!! warning "Behavior changed in `langchain-core` 0.3.16"

`description` and `parameters` keys are now optional. Only `name` is
required and guaranteed to be part of the output.
"""
Expand Down Expand Up @@ -477,15 +478,18 @@ def convert_to_openai_tool(
OpenAI tool-calling API.

!!! warning "Behavior changed in `langchain-core` 0.3.16"

`description` and `parameters` keys are now optional. Only `name` is
required and guaranteed to be part of the output.

!!! warning "Behavior changed in `langchain-core` 0.3.44"

Return OpenAI Responses API-style tools unchanged. This includes
any dict with `"type"` in `"file_search"`, `"function"`,
`"computer_use_preview"`, `"web_search_preview"`.

!!! warning "Behavior changed in `langchain-core` 0.3.63"

Added support for OpenAI's image generation built-in tool.
"""
# Import locally to prevent circular import
Expand Down
4 changes: 4 additions & 0 deletions libs/langchain/langchain_classic/chat_models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,11 @@ class GetPopulation(BaseModel):
```

!!! warning "Behavior changed in `langchain` 0.2.8"

Support for `configurable_fields` and `config_prefix` added.

!!! warning "Behavior changed in `langchain` 0.2.12"

Support for Ollama via langchain-ollama package added
(`langchain_ollama.ChatOllama`). Previously,
the now-deprecated langchain-community version of Ollama was imported
Expand All @@ -331,9 +333,11 @@ class GetPopulation(BaseModel):
(`model_provider="bedrock_converse"`).

!!! warning "Behavior changed in `langchain` 0.3.5"

Out of beta.

!!! warning "Behavior changed in `langchain` 0.3.19"

Support for Deepseek, IBM, Nvidia, and xAI models added.

""" # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2487,6 +2487,7 @@ def get_weather(location: str) -> str:
```

!!! warning "Behavior changed in `langchain-anthropic` 0.3.0"

Uses Anthropic's [token counting API](https://docs.claude.com/en/docs/build-with-claude/token-counting) to count tokens in messages.

""" # noqa: D214,E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ def with_structured_output(
Uses Fireworks's [JSON mode feature](https://docs.fireworks.ai/structured-responses/structured-response-formatting).

!!! warning "Behavior changed in `langchain-fireworks` 0.2.8"

Added support for `'json_schema'`.

include_raw:
Expand Down
1 change: 1 addition & 0 deletions libs/partners/groq/langchain_groq/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,7 @@ def with_structured_output(
when specifying a Pydantic or `TypedDict` class.

!!! warning "Behavior changed in `langchain-groq` 0.3.8"

Added support for Groq's dedicated structured output feature via
`method="json_schema"`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ def with_structured_output(
desired schema into the model call.

!!! warning "Behavior changed in `langchain-mistralai` 0.2.5"

Added method="json_schema"

include_raw:
Expand Down
2 changes: 2 additions & 0 deletions libs/partners/ollama/langchain_ollama/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1314,9 +1314,11 @@ def with_structured_output(
- `'parsing_error'`: `BaseException | None`

!!! warning "Behavior changed in `langchain-ollama` 0.2.2"

Added support for structured output API via `format` parameter.

!!! warning "Behavior changed in `langchain-ollama` 0.3.0"

Updated default `method` to `'json_schema'`.

??? note "Example: `schema=Pydantic` class, `method='json_schema'`, `include_raw=False`"
Expand Down
3 changes: 3 additions & 0 deletions libs/partners/openai/langchain_openai/chat_models/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -960,12 +960,15 @@ def get_weather(location: str) -> str:
- `'parsing_error'`: `BaseException | None`

!!! warning "Behavior changed in `langchain-openai` 0.3.0"

`method` default changed from "function_calling" to "json_schema".

!!! warning "Behavior changed in `langchain-openai` 0.3.12"

Support for `tools` added.

!!! warning "Behavior changed in `langchain-openai` 0.3.21"

Pass `kwargs` through to the model.

??? note "Example: `schema=Pydantic` class, `method='json_schema'`, `include_raw=False`, `strict=True`"
Expand Down
7 changes: 7 additions & 0 deletions libs/partners/openai/langchain_openai/chat_models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ async def get_api_key() -> str:
!!! version-added "Added in `langchain-openai` 0.3.9"

!!! warning "Behavior changed in `langchain-openai` 0.3.35"

Enabled for default base URL and client.
"""

Expand Down Expand Up @@ -790,6 +791,7 @@ async def get_api_key() -> str:
- `'v1'`: v1 of LangChain cross-provider standard.

!!! warning "Behavior changed in `langchain-openai` 1.0.0"

Default updated to `"responses/v1"`.
"""

Expand Down Expand Up @@ -1987,9 +1989,11 @@ def get_weather(location: str) -> str:
- `'parsing_error'`: `BaseException | None`

!!! warning "Behavior changed in `langchain-openai` 0.3.12"

Support for `tools` added.

!!! warning "Behavior changed in `langchain-openai` 0.3.21"

Pass `kwargs` through to the model.
"""
if strict is not None and method == "json_mode":
Expand Down Expand Up @@ -3109,12 +3113,15 @@ def get_weather(location: str) -> str:
- `'parsing_error'`: `BaseException | None`

!!! warning "Behavior changed in `langchain-openai` 0.3.0"

`method` default changed from `"function_calling"` to `"json_schema"`.

!!! warning "Behavior changed in `langchain-openai` 0.3.12"

Support for `tools` added.

!!! warning "Behavior changed in `langchain-openai` 0.3.21"

Pass `kwargs` through to the model.

??? note "Example: `schema=Pydantic` class, `method='json_schema'`, `include_raw=False`, `strict=True`"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,7 @@ def test_usage_metadata(self, model: BaseChatModel) -> None:
usage metadata (see configuration below).

!!! warning "Behavior changed in `langchain-tests` 0.3.17"

Additionally check for the presence of `model_name` in the response
metadata, which is needed for usage tracking in callback handlers.

Expand Down Expand Up @@ -1176,6 +1177,7 @@ def test_usage_metadata_streaming(self, model: BaseChatModel) -> None:
Test to verify that the model returns correct usage metadata in streaming mode.

!!! warning "Behavior changed in `langchain-tests` 0.3.17"

Additionally check for the presence of `model_name` in the response
metadata, which is needed for usage tracking in callback handlers.

Expand Down
Loading