Skip to content

feat(langchain): detect Requests calls without timeout - #115

Open
pjsk02 wants to merge 1 commit into
trustabl:mainfrom
pjsk02:feat/langchain-network-timeout
Open

feat(langchain): detect Requests calls without timeout#115
pjsk02 wants to merge 1 commit into
trustabl:mainfrom
pjsk02:feat/langchain-network-timeout

Conversation

@pjsk02

@pjsk02 pjsk02 commented Aug 24, 2026

Copy link
Copy Markdown

Summary

Adds LC-007 to detect Python requests calls without a finite timeout inside LangChain tools.

LangChain Python currently lacks equivalent timeout coverage while similar network-timeout rules exist for other supported SDKs. This adds that coverage using Trustabl''s existing call_without_kwarg predicate without requiring engine or schema changes.

Detection

LC-007 fires for supported requests calls inside LangChain tools when:

  • timeout is omitted
  • timeout=None

It remains silent when an explicit finite timeout is supplied.

The rule intentionally does not flag httpx merely because a call omits an explicit timeout, since HTTPX provides default timeout behavior.

Scope

This contribution is intentionally limited to Python Requests call-site detection.

Known limitations include wrapper functions, dynamically configured client defaults, positional timeout handling, and HTTP libraries outside the current Requests-specific scope.

Validation

  • Existing call_without_kwarg predicate reused
  • No production engine changes
  • No schema changes
  • No manifest changes
  • Canonical rule mirrored byte-for-byte in the companion engine fixture
  • git diff --check passes

Companion PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant