mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-10-18 14:07:31 +02:00
Add a `type: Literal["__overwrite__"]` discriminator field to
`Overwrite` and teach `_get_overwrite()` to recognise the
dataclass-erased `{"value": ..., "type": "__overwrite__"}` form. This
keeps `Overwrite` semantics intact across JSON boundaries that strip
dataclass types (e.g. `langgraph-api.serde.json_dumpb`), without
requiring callers to switch to the dict sentinel form.
This was an oversight in the initial `Overwrite` implementation, it
should be json serializable out of the box.
Fixing langchain-ai/deepagents#3789