Replies: 6 comments
-
Hi, I’ve figured out the issue I mentioned earlier. It turns out the problem was caused by the init_chat_model() function. Specifically, this function mutates the model_kwargs dictionary in-place — likely by removing keys like api_key or base_url. As a result, when I passed the same planner_model_kwargs into the thread config, it was already empty because it had been modified earlier during model initialization. |
Beta Was this translation helpful? Give feedback.
-
Additionally, I discovered a more subtle behavior related to the If I pass a dictionary that includes a key like This suggests that Just something to watch out for if you're dynamically building the configuration. |
Beta Was this translation helpful? Give feedback.
-
Even if you put |
Beta Was this translation helpful? Give feedback.
-
still modified writer_model_kwargs and even the config |
Beta Was this translation helpful? Give feedback.
-
AttributeError: 'mappingproxy' object has no attribute 'pop' |
Beta Was this translation helpful? Give feedback.
-
Since My final solution is to store the configurations in environment variables. Each time a new model is initialized, it retrieves the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm encountering an unexpected behavior when using LangGraph. The
config
object I pass in gets modified during the graph execution, which causes problems during interruption recovery.Initial state before execution:
Code snippet executed:
Problem observed:
After running the above, the external thread dictionary gets modified unexpectedly:
My questions:
What I suspect:
I would appreciate advice from anyone experienced with LangGraph on whether this is a known issue or expected behavior. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions