Symptom
Values bound on a graph with with_config (callbacks, tags, metadata, configurable) disappear or leak between runs when a per-call config is passed.
Evidence what you'll see
- A callback bound with with_config never fires during astream_events
- The base config's metadata dict gains keys like thread_id from a previous call
Cause
ensure_config overwrote these keys wholesale instead of merging them, and it changed the shared metadata dict in place.
Fix steps
0 of 1 done
Your check marks stay in this browser only.
Verify the fix worked
- Bind a callback with with_config, stream with a per-call config, and confirm the callback fires and the base config is unchanged.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it