[GH-ISSUE #1852] [langchain]: Confusing examples for single vs multiple trigger conditions in built-in middleware documentation #243

Open
opened 2026-02-17 17:19:28 -05:00 by yindo · 0 comments
Owner

Originally created by @ggplz on GitHub (Dec 11, 2025).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/1852

Type of issue

question

Language

Python

Description

There seems to be some confusion in the built-in middleware documentation regarding single-condition vs multi-condition triggers.In the examples, both “single” and “multiple” condition cases use the same format:

Single condition example:
trigger=[("tokens", 4000), ("messages", 10)]

Multiple conditions example (Only a “ , “ more than single condition):
trigger=[
("tokens", 3000),
("messages", 6),
]
However, these two examples look identical in structure, which makes it unclear how LangChain actually distinguishes between a single trigger condition and multiple trigger conditions in the middleware.

Raw Url : https://docs.langchain.com/oss/python/langchain/middleware/built-in#full-example

Originally created by @ggplz on GitHub (Dec 11, 2025). Original GitHub issue: https://github.com/langchain-ai/docs/issues/1852 ### Type of issue question ### Language Python ### Description There seems to be some confusion in the built-in middleware documentation regarding single-condition vs multi-condition triggers.In the examples, both “single” and “multiple” condition cases use the same format: Single condition example: trigger=[("tokens", 4000), ("messages", 10)] Multiple conditions example (Only a “ , “ more than single condition): trigger=[ ("tokens", 3000), ("messages", 6), ] However, these two examples look identical in structure, which makes it unclear how LangChain actually distinguishes between a single trigger condition and multiple trigger conditions in the middleware. Raw Url : https://docs.langchain.com/oss/python/langchain/middleware/built-in#full-example
yindo added the langchainexternal labels 2026-02-17 17:19:28 -05:00
yindo changed title from [langchain]: Confusing examples for single vs multiple trigger conditions in built-in middleware documentation to [GH-ISSUE #1852] [langchain]: Confusing examples for single vs multiple trigger conditions in built-in middleware documentation 2026-06-05 17:25:49 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#243