Commit Graph

13603 Commits

Author SHA1 Message Date
Michael Li
e3f1ce0ac5 docs: fix retriever typos (#31733) 2025-06-25 16:06:21 +00:00
Michael Li
5d734ac8a8 docs: fix typo in clarifai.ipynb (#31732) 2025-06-25 15:59:29 +00:00
Michael Li
a09583204c docs: fix typos in tool_feat_table.py (#31731) 2025-06-25 15:56:59 +00:00
Michael Li
df1a4c0085 docs: fix typo in timescalevector.ipynb (#31727) 2025-06-25 11:49:19 -04:00
Michael Li
990a69d9d7 docs: fix typo in globals.py (#31728) 2025-06-25 11:47:02 -04:00
Mason Daugherty
3c3320ae30 fix: update import paths for ChatOllama to use langchain_ollama instead of community (#31721) 2025-06-24 16:19:31 -04:00
ccurme
e09abf8170 anthropic[patch]: add benchmark (#31718)
Account for lazy loading of clients in init time benchmark
2025-06-24 15:17:22 -04:00
Eugene Yurtsev
9164e6f906 core[patch]: Add additional hashing options to indexing API, warn on SHA-1 (#31649)
Add additional hashing options to the indexing API, warn on SHA-1

Requires:

- Bumping langchain-core version
- bumping min langchain-core in langchain

---------

Co-authored-by: ccurme <chester.curme@gmail.com>
2025-06-24 14:44:06 -04:00
Daniel Fjeldstad
cc4f5269b1 docs: replace deprecated llama 3 model with sonar in ChatPerplexity example (#31716)
**Description:** Updates ChatPerplexity documentation to replace
deprecated llama 3 model reference with the current sonar model in the
API key example code block.

**Issue:** N/A (maintenance update for deprecated model)

**Dependencies:** No new dependencies required

---------

Co-authored-by: Mason Daugherty <github@mdrxy.com>
2025-06-24 17:35:18 +00:00
Mason Daugherty
8878a7b143 docs: ollama nits (#31714) 2025-06-24 13:19:15 -04:00
ccurme
7cdd53390d docs: fix embeddings links (#31715)
This table is referenced in multiple places, so links should be global.
2025-06-24 11:27:59 -04:00
Mason Daugherty
6d71b6b6ee standard-tests: refactoring and fixes (#31703)
- `libs/core/langchain_core/messages/base.py`: add model name to
examples [per
docs](https://python.langchain.com/api_reference/standard_tests/integration_tests/langchain_tests.integration_tests.chat_models.ChatModelIntegrationTests.html#langchain_tests.integration_tests.chat_models.ChatModelIntegrationTests.test_usage_metadata)
("0.3.17: Additionally check for the presence of model_name in the
response metadata, which is needed for usage tracking in callback
handlers")
- `libs/core/langchain_core/utils/function_calling.py`: correct typo
-
`libs/standard-tests/langchain_tests/integration_tests/chat_models.py`:
- `magic_function(input)` -> `magic_function(_input)` to prevent warning
about redefining built in `input`
    - relocate a few tests for better grouping and narrative flow
    - suppress some type hint warnings following suit from similar tests
    - fix a few more typos
- validate not only that `model_name` is defined, but that it is not
empty (test_usage_metadata)
2025-06-23 23:22:31 +00:00
Christopher Jones
b6f74bff40 Update and simplify Oracle Database example cookbook (#31364) 2025-06-23 19:03:00 -04:00
Christophe Bornet
c7e82ad95d core: Use parametrized test in test_correct_get_tracer_project (#31513) 2025-06-23 18:55:57 -04:00
joshy-deshaw
8a0782c46c openai[patch]: fix dropping response headers while streaming / Azure (#31580) 2025-06-23 17:59:58 -04:00
Mason Daugherty
8868701c16 docs: updated ChatGroq docs and example (#31710) 2025-06-23 20:36:46 +00:00
ccurme
ee83993b91 docs: document Anthropic cache TTL count details (#31708) 2025-06-23 20:16:42 +00:00
Mason Daugherty
e6191d58e7 groq: release 0.3.4 (#31709)
bump groq dependency to ensure reasoning is supported
langchain-groq==0.3.4
2025-06-23 19:30:05 +00:00
Mason Daugherty
40bb7d00fc groq: release 0.3.3 (#31707) langchain-groq==0.3.3 2025-06-23 14:54:56 -04:00
Christophe Bornet
b1cc972567 core[patch]: Improve RunnableWithMessageHistory init arg types (#31639)
`Runnable`'s `Input` is contravariant so we need to enumerate all
possible inputs and it's not possible to put them in a `Union`.
Also, it's better to only require a runnable that
accepts`list[BaseMessage]` instead of a broader `Sequence[BaseMessage]`
as internally the runnable is only called with a list.
2025-06-23 13:45:52 -04:00
Mason Daugherty
dcf5c7b472 groq: add support for accessing reasoning output from Groq models (#31662)
**Description:** return
[reasoning](https://console.groq.com/docs/reasoning) output in
`additional_kwargs` as `reasoning_content`
**Issue:** Resolves #31052
2025-06-23 11:33:12 -04:00
Mason Daugherty
af2188b848 docs: Add section on tool choice (#31692)
- Make it known in the concepts guide that tool choice is available
2025-06-23 11:31:49 -04:00
Mason Daugherty
ba38997c7a docs: add tool_calls attribute link in tool calling documentation and indicate output is a list in code example (#31689)
- Minor QOL improvements:
  - Add link to tool_calls api ref
- Show code example output as a list to more clearly indicate response
type
2025-06-23 11:31:26 -04:00
ccurme
643741497a openai: release 0.3.25 (#31702) langchain-openai==0.3.25 2025-06-23 10:55:48 -04:00
ccurme
b268ab6a28 openai[patch]: fix client caching when request_timeout is specified via httpx.Timeout (#31698)
Resolves https://github.com/langchain-ai/langchain/issues/31697
2025-06-23 14:37:49 +00:00
Li-Kuang Chen
4ee6112161 openai[patch]: Improve error message when response type is malformed (#31619) 2025-06-21 14:15:21 -04:00
dennism-tulcolabs
9de4f22205 langchain[patch]: smith.evaluation.progress.ProgressBarCallback: Make output after progress bar ends configurable (#31583) 2025-06-20 19:24:35 -04:00
Mikhail
6105a5841b core: fix get_buffer_string output for structured message content (#31600) 2025-06-20 23:21:50 +00:00
ccurme
cf5a442e4c langchain: release 0.3.26 (#31695) langchain==0.3.26 2025-06-20 18:19:47 -04:00
ccurme
5015188530 Revert "infra: temporarily drop OpenAI from core release test matrix" (#31694)
Reverts langchain-ai/langchain#31693
2025-06-20 22:12:38 +00:00
ccurme
26030abb70 infra: temporarily drop OpenAI from core release test matrix (#31693)
As part of core releases we run tests on the last released version of
some packages (including langchain-openai) using the new version of
langchain-core. We run langchain-openai's test suite as it was when it
was last released.

Our test for computer use started raising 500 error at some point during
the day today (test passed as part of scheduled test job in the
morning):
> InternalServerError: Error code: 500 - {'error': {'message': 'An error
occurred while processing your request. You can retry your request, or
contact us through our help center at help.openai.com if the error
persists.

Will revert this change after we release langchain-core.
langchain-core==0.3.66
2025-06-20 21:58:39 +00:00
Bagatur
5271fd76f1 core[patch]: check before removing tags (#31691) 2025-06-20 17:46:50 -04:00
ccurme
39a8a1121a core: release 0.3.66 (#31690) 2025-06-20 17:45:03 -04:00
97tkddnjs
4fe490c0ea [Docs] Update deprecated Pydantic .schema() method to .model_json_schema() in How to convert Runnables to Tools guide (#31618) 2025-06-20 20:43:59 +00:00
Raghu Kapur
2c9859956a text-splitters: fix stale header metadata in ExperimentalMarkdownSyntaxTextSplitter (#31622)
**Description:**

Previously, when transitioning from a deeper Markdown header (e.g., ###)
to a shallower one (e.g., ##), the
ExperimentalMarkdownSyntaxTextSplitter retained the deeper header in the
metadata.

This commit updates the `_resolve_header_stack` method to remove headers
at the same or deeper levels before appending the current header. As a
result, each chunk now reflects only the active header context.

Fixes unexpected metadata leakage across sections in nested Markdown
documents.

Additionally, test cases have been updated to:
- Validate correct header resolution and metadata assignment.
- Cover edge cases with nested headers and horizontal rules.

**Issue:** 
Fixes [#31596](https://github.com/langchain-ai/langchain/issues/31596)

**Dependencies:**
None

**Twitter handle:** -> [_RaghuKapur](https://twitter.com/_RaghuKapur)

**LinkedIn:** ->
[https://www.linkedin.com/in/raghukapur/](https://www.linkedin.com/in/raghukapur/)
2025-06-20 15:52:17 -04:00
ZhangShenao
9d4d258162 [Doc] Improve api doc for DeepSeek (#31655)
- Add param in api doc
- Fix word spelling

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
2025-06-20 19:47:54 +00:00
Saran Connolly
22e6d90937 langchain_mistralai: Include finish_reason in response metadata when parsing MistralAI chunks toAIMessageChunk (#31667)
## Description
<!-- What does this pull request accomplish? -->
- When parsing MistralAI chunk dicts to Langchain to `AIMessageChunk`
schemas via the `_convert_chunk_to_message_chunk` utility function, the
`finish_reason` was not being included in `response_metadata` as it is
for other providers.
- This PR adds a one-liner fix to include the finish reason.

- fixes: https://github.com/langchain-ai/langchain/issues/31666
2025-06-20 15:41:20 -04:00
Mohammad Mohtashim
7ff405077d core[patch]: Returning always 2D Array for _cosine_similarity (#31528)
- **Description:** Very simple change in `_cosine_similarity` which
always 2D array.
- **Issue:** #31497
2025-06-20 11:25:02 -04:00
Eugene Yurtsev
2842e0c8c1 core[patch]: Add doc-strings to tools/base.py (#31684)
Add doc-strings
2025-06-20 11:16:57 -04:00
Tony Gravagno
5d0bea8378 docs: OPENAI_API_KEY typo in google_serper.ipynb (#31665)
Simple typo fix.
2025-06-20 11:02:13 -04:00
Christophe Bornet
7e046ea848 core: Cleanup Pydantic models and handle deprecation warnings (#30799)
* Simplified Pydantic handling since Pydantic v1 is not supported
anymore.
* Replace use of deprecated v1 methods by corresponding v2 methods.
* Remove use of other deprecated methods.
* Activate mypy errors on deprecated methods use.

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-06-20 10:42:52 -04:00
ccurme
29e17fbd6b docs: use langchain-tavily (#31663)
Commandeering https://github.com/langchain-ai/langchain/pull/31640

---------

Co-authored-by: pulvedu <dustin@tavily.com>
Co-authored-by: pulvedu <dusty.pulver28@gmail.com>
2025-06-18 16:06:26 -04:00
ccurme
e2a0ff07fd openai[patch]: include 'type' key internally when streaming reasoning blocks (#31661)
Covered by existing tests.

Will make it easier to process streamed reasoning blocks.
2025-06-18 15:01:54 -04:00
Tanmay Singhal
19544ba3c9 docsFix documentation where triggering image generation from openai (#31652)
Description: Fixing Minor Error in ChatOpenAI Documentation
2025-06-18 13:31:47 -04:00
Jannik Maierhöfer
0cadf4fc9a docs: upgrade langfuse example to python sdk v3 (#31654)
As the Langfuse python sdk v3 includes breaking changes, this PR updates
the code examples.

https://langfuse.com/docs/integrations/langchain/upgrade-paths#python
2025-06-18 13:30:39 -04:00
Mason Daugherty
a79998800c fix: correct typo in docstring for three_values fixture (#31638)
Docstring typo fix in `base_store.py`
2025-06-17 16:51:07 -04:00
ccurme
da97013f96 docs: update OpenAI integration page (#31646)
model_kwargs is no longer needed for `truncation` and `reasoning`.
2025-06-17 16:23:06 -04:00
ccurme
6409498f6c openai[patch]: route to Responses API if relevant attributes are set (#31645)
Following https://github.com/langchain-ai/langchain/pull/30329.
langchain-openai==0.3.24
2025-06-17 16:04:38 -04:00
ccurme
3044bd37a9 openai: release 0.3.24 (#31642) 2025-06-17 15:06:52 -04:00
ccurme
c1c3e13a54 openai[patch]: add Responses API attributes to BaseChatOpenAI (#30329)
`reasoning`, `include`, `store`, `truncation`.

Previously these had to be added through `model_kwargs`.
2025-06-17 14:45:50 -04:00