open-webui / open-webui/computer
bug: create_artifact fails with TypeError on queued/resumed tool-call replay paths
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 569
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
bug: create_artifact fails with TypeError on queued/resumed tool-call replay paths
Bug description
When a create_artifact tool call is replayed from the queue (queued tool
calls and resumed tasks), the call fails and no artifact is created.
To Reproduce
- Have the agent queue a
create_artifacttool call (or resume a task with a pendingcreate_artifactcall). - When the queued call is replayed, the tool errors instead of creating the artifact.
Actual behavior
The replay paths invoke create_artifact(**args, workspace=workspace), but
create_artifact does not declare a workspace parameter — it receives the
workspace via __context__, like every other tool. So every replayed
create_artifact call raises:
TypeError: create_artifact() got an unexpected keyword argument 'workspace'
Expected behavior
Queued/replayed create_artifact calls should succeed. The call should inject
__context__ (including call_id) the same way execute_tool does for all
other tools on the same paths, e.g.:
result = await create_artifact(
**args, __context__={**tool_ctx, "call_id": item["call_id"]}
)
Affected sites are in run_chat_task in cptr/utils/chat_task.py.
Environment
- Latest main
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in cptr/utils/chat_task.py at run_chat_task and inspect the queued and resumed tool-call replay paths alongside execute_tool. Verify that replayed create_artifact calls receive the same context information as other tools, then confirm queued and resumed calls complete without the TypeError and create the artifact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 85/100