langchain-ai
langchain
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(anthropic, openai): never close shared/cached httpx pools on aclose() The first cut of close()/aclose() unconditionally closed the SDK client's underlying httpx pool. But both integrations back their clients with a PROCESS-WIDE SHARED pool via @lru_cache (`_get_default_*httpx_client`): every model with the same base_url/timeout/proxy reuses one pool by design. Closing it from a single model's teardown broke every other live model in the process — observed in a long-lived worker as: RuntimeError: Cannot send a request, as the client has been closed. -> anthropic.APIConnectionError: Connection error. Fix: close()/aclose() now release the underlying httpx client ONLY when the model privately owns it; the shared cached pool and user-supplied clients are left intact. - anthropic: `ChatAnthropic` always wraps the shared cached pool (it has no http_client field), so close()/aclose() are effectively no-ops for the pool. An identity check against the lru-cache getter (`_wraps_shared_httpx`) guards a hypothetical future private-client path. `_http_client_params()` is factored out so the cached_property builders and the identity check stay in sync. - openai: ownership is computed in `validate_environment` and stored on `_owns_sync_http_client` / `_owns_async_http_client`. A client is owned iff the model built it privately — the unhashable-`httpx.Timeout` fresh-client path or an `openai_proxy` transport — and the user did not supply their own `http_client` / `http_async_client`. Default (shared cache) and user-supplied clients are never closed. Tests rewritten to pin the invariant: a regression test builds two default models, closes one, and asserts the other's shared pool is still open; plus owned-path and user-injected-not-closed cases. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
feat/chat-model-aclose
19 hours ago
release(anthropic): 1.4.4 (#37757)
master
19 hours ago
cr
mdrxy/release-anthropic-1-4-4
19 hours ago
Refresh lock for langgraph PR #7928 SHA bump (766a881c5)
nh/subagent-projection
22 hours ago
Refresh lock for langgraph PR #7928 SHA bump (8ef9a36d2)
nh/subagent-projection
23 hours ago
Read subagent_name metadata from parent-scope tasks events The previous implementation expected metadata.subagent_name to appear on the depth-1 tasks event (the lifecycle event for the dispatched subagent run). In Pregel, that depth-1 event comes from the nested run spawned inside the tool body and does not inherit metadata from the outer tools task's config, so the transformer never observed cause and run.subagents stayed empty. langgraph PR #7928 now stamps subagent_name and tool_call_id onto the OUTER tools task's metadata via the pregel_dynamic_metadata scheduling hook. That metadata is visible on the parent-scope tasks event whose data.id matches the depth-1 namespace segment id. Refactor SubagentTransformer to use the same correlation pattern as deepagents: stash task_id -> (subagent_name, tool_call_id) on each parent-scope tasks event that carries the metadata, then pop it inside _on_started when the matching child-scope task starts. The transformer no longer relies on the LifecycleTransformer's graph_name/cause projection, which keeps it independent of how that projection evolves.
nh/subagent-projection
1 day ago
pin langgraph to PR #7928 branch for CI
nh/subagent-projection
1 day ago
Wire subagent_name through StructuredTool.from_function StructuredTool.from_function now accepts subagent_name= as a named parameter and passes it to the constructed StructuredTool instance. Completes the trio of subagent_name entry points: BaseTool attribute, @tool decorator, StructuredTool.from_function.
nh/basetool-subagent-name
2 days ago
Latest Branches
CodSpeed Performance Gauge
0%
feat(core, anthropic, openai): aclose() lifecycle + latched fallbacks
#37718
19 hours ago
e0ace82
feat/chat-model-aclose
CodSpeed Performance Gauge
0%
release(anthropic): 1.4.4
#37757
19 hours ago
6c9acd2
mdrxy/release-anthropic-1-4-4
CodSpeed Performance Gauge
0%
feat(langchain): project subagent runs onto typed run.subagents channel
#37739
22 hours ago
2c40042
nh/subagent-projection
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs