Minor Changes
-
#9890
e3ea086Thanks @hntrl! - feat(xai): add server-side agentic tools and deprecate live_searchAdded new xAI server-side agentic tools for the Responses API:
xaiWebSearch(): Web search with domain filtering and image understandingxaiXSearch(): X (Twitter) search with handle filtering, date ranges, and media understandingxaiCodeExecution(): Python code execution for calculations and analysisxaiCollectionsSearch(): Search through uploaded knowledge bases (vector stores)
Also:
- Deprecated
xaiLiveSearch()with migration guidance to new tools - Added
toolssupport toChatXAIResponsesconstructor and call options - Updated
XAIResponsesWebSearchTooltype with correct filtering options
Patch Changes
-
#9900
a9b5059Thanks @hntrl! - Improved abort signal handling for chat models:- Added
ModelAbortErrorclass in@langchain/core/errorsthat contains partial output when a model invocation is aborted mid-stream invoke()now throwsModelAbortErrorwith accumulatedpartialOutputwhen aborted during streaming (when using streaming callback handlers)stream()throws a regularAbortErrorwhen aborted (since chunks are already yielded to the caller)- All provider implementations now properly check and propagate abort signals in both
_generate()and_streamResponseChunks()methods - Added standard tests for abort signal behavior
- Added
-
#9900
a9b5059Thanks @hntrl! - fix(providers): add proper abort signal handling for invoke and stream operations- Added early abort check (
signal.throwIfAborted()) at the start of_generatemethods to immediately throw when signal is already aborted - Added abort signal checks inside streaming loops in
_streamResponseChunksto return early when signal is aborted - Propagated abort signals to underlying SDK calls where applicable (Google GenAI, Google Common/VertexAI, Cohere)
- Added standard tests for abort signal behavior in
@langchain/standard-tests
This enables proper cancellation behavior for both invoke and streaming operations, and allows fallback chains to correctly proceed to the next runnable when the previous one is aborted.
- Added early abort check (
-
#9889
b303711Thanks @hntrl! - feat(xai): add baseURL option to ChatXAIAdded
baseURLconfiguration option toChatXAIclass, allowing users to override the default xAI API endpoint. This is useful for connecting to custom endpoints, proxies, or alternative API-compatible services. -
Updated dependencies [
1fa865b,28efb57,4e42452,a9b5059,a9b5059]:- @langchain/openai@1.2.4