Skip to content

Commit b7fb7ee

Browse files
committed
fix: prevent duplicate state kwargs
1 parent 5e3d7fd commit b7fb7ee

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/agent/profiles/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ async def preprocess(self, state: BaseState, config: RunnableConfig) -> BaseStat
6161
safety=result.get("safety", SAFETY_SAFE),
6262
reason_unsafe=result.get("reason_unsafe", ""),
6363
)
64-
return BaseState(**state, **mapped_state)
64+
merged_state = dict(state)
65+
merged_state.update(mapped_state)
66+
return BaseState(**merged_state)
6567

6668
async def postprocess(self, state: BaseState, config: RunnableConfig) -> BaseState:
6769
search_results: list[WebSearchResult] = []

0 commit comments

Comments
 (0)