* fix(dify-agent): make the SSE stream byte budget configurable
The Dify runner hardcoded a 16 MiB budget for the whole SSE stream and
described it as a 'runtime limit', so long agent runs whose tool
observations consume the budget failed with a misleading error and no
way to tune it.
- add a stream-budget-mb runner config (default 16 MiB, kept for
compatibility) wired through AsyncDifyClient into limited_bytes /
limited_lines
- report the actual received bytes and the configured limit when the
budget is exceeded, distinct from the total deadline error
Addresses part 1 of #2851 (configurable budget and observable error).
The image attachment fallback (part 2) is intentionally not touched.
* fix(dify-agent): scale the event cap with the stream budget and name the last event
A single Dify SSE event larger than 1 MiB (one big tool observation or
node output) still failed with "Provider event exceeds the runtime limit",
and raising stream-budget-mb did not help. The per-event cap now stays at
the native 1 MiB for the default budget and grows to 1/16 of a raised one.
Budget errors now name the last SSE event and tool/node seen, carry the
dify.stream_limit_exceeded code and are logged as a warning, so long Agent
runs can be diagnosed from info-level logs (#2851).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>
---------
Co-authored-by: ShaoLOWu <[email protected]>
Co-authored-by: RockChinQ <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>
CozeAgent, DifyAgent and N8nAgent built their shared asset gateway listener
and per-connection service tasks inside the registering invocation, so the
listener's accept handle retained the first caller's invocation Context
(configuration plus revocable authority) and later connections inherited it.
Create the listener and connection tasks in an explicit empty Context; an
invocation Context is entered only per validated run token. Applies the same
fix already used by DashScopeAgent and LangflowAgent, with a regression test.
Co-authored-by: multica-agent <[email protected]>
Every listed version still carries the old langbot-plugins repository link,
and many also have unpublished source changes. Bump the patch version so
each can be republished from the LangBot repository. SDK requirements stay
as ranges.
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>