langchain-ai / langgraph

Build resilient language agents as graphs.
https://langchain-ai.github.io/langgraph/
MIT License
6.54k stars 1.04k forks source link

Calling .astream inside of another graph's .astream_events will set stream_mode="value" regardless of config #2351

Open lucaslulucaslu opened 2 days ago

lucaslulucaslu commented 2 days ago

Checked other resources

Example Code

cannot have code here due to security issue

Error Message and Stack Trace (if applicable)

No response

Description

I have a graph A streaming LLM tokens, I tested it and can confirm I get updates as streaming. Then I have another graph B which is invoked by B.astream_events, then invoke A.astream, I can only get values of every GraphState, no matter I set stream_mode to "value" or "update"

System Info

latest langgraph mac python 3.12

vbarda commented 1 day ago

@lucaslulucaslu could you write some pseudocode to illustrate this issue better?