β»οΈ Reproduction Steps
- Frontend code
2.Agent code
The printed state.copilotkit.context data is empty.
...
β
Expected Behavior
The context data cannot be accessed by the model, so the model is unable to understand the page state. I expect the model to be able to receive and use the context data.
β Actual Behavior
From what I can see, there seems to be an issue in the langgraph_default_merge_state code β the merged context is being overwritten.
It should be changed to:
return {
**merged_state,
'copilotkit': {
**merged_state.get('copilotkit', {}),
'actions': tools_in_state,
},
}
π CopilotKit Version
[[package]]
name = "copilotkit"
version = "0.1.60"
description = "CopilotKit python SDK"
optional = false
python-versions = "<3.13,>=3.10"
groups = ["main"]
files = [
{file = "copilotkit-0.1.60-py3-none-any.whl", hash = "sha256:8418723aedec72a14dbccd95a974e1d07059153a14f06030ca9e4830e3acbf39"},
{file = "copilotkit-0.1.60.tar.gz", hash = "sha256:1296b9a369a7d44db8497700e356e92385e3c9a40ab7bf3dea5f7dbd0365ae4f"},
]
π Logs (Optional)
β»οΈ Reproduction Steps
2.Agent code
The printed state.copilotkit.context data is empty.
...
β Expected Behavior
The context data cannot be accessed by the model, so the model is unable to understand the page state. I expect the model to be able to receive and use the context data.
β Actual Behavior
From what I can see, there seems to be an issue in the langgraph_default_merge_state code β the merged context is being overwritten.
It should be changed to:
return {
**merged_state,
'copilotkit': {
**merged_state.get('copilotkit', {}),
'actions': tools_in_state,
},
}
π CopilotKit Version
π Logs (Optional)