Skip to content

Commit

Permalink
Copy configurable in ensure_config
Browse files Browse the repository at this point in the history
  • Loading branch information
nfcampos committed Nov 19, 2024
1 parent 39eabd0 commit 2c945ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libs/langgraph/langgraph/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,10 @@ def ensure_config(*configs: Optional[RunnableConfig]) -> RunnableConfig:
continue
for k, v in config.items():
if v is not None and k in CONFIG_KEYS:
empty[k] = v # type: ignore[literal-required]
if k == CONF:
empty[k] = v.copy() # type: ignore[literal-required]
else:
empty[k] = v # type: ignore[literal-required]
for k, v in config.items():
if v is not None and k not in CONFIG_KEYS:
empty[CONF][k] = v
Expand Down

0 comments on commit 2c945ce

Please sign in to comment.