mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[PR #23004] [CLOSED] feat: Support for additional Anthropic tool content return types #50018
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/23004
Author: @regulad
Created: 3/25/2026
Status: ❌ Closed
Base:
dev← Head:feature/addl-anthropic-tool-result-types📝 Commits (1)
9db5b3eAdd support for additional Anthropic tool call return types📊 Changes
2 files changed (+51 additions, -5 deletions)
View changed files
📝
backend/open_webui/main.py(+6 -1)📝
backend/open_webui/utils/anthropic.py(+45 -4)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions to discuss your idea/fix with the community before creating a pull request, and describe your changes before submitting a pull request.
This is to ensure large feature PRs are discussed with the community first, before starting work on it. If the community does not want this feature or it is not relevant for Open WebUI as a project, it can be identified in the discussion before working on the feature and submitting the PR.
Before submitting, make sure you've checked the following:
devbranch. PRs targetingmainwill be immediately closed.devto ensure no unrelated commits (e.g. frommain) are included. Push updates to the existing PR branch instead of closing and reopening.I did not check documentation nor dependencies as this change does not materially change API surface nor dies it bring in additional dependencies.
Changelog Entry
Description
This PR adds support for images returned by tool calls via the Anthropic-compatible API shim. OpenAI tool calls do not return images natively, so the image is instead inserted before the tool call text and a message is inserted into the tool call that says "this tool call returned the above image."
This may not be the optimal way to implement this. I am open to constructive criticism on this matter.
Added
See description
Changed
See description
Additional checks were also added around the
tool_resultparsing to raise an exception on an unparsable tool result (like Documents or Search Results, which have no OpenAI equivalent at all) so an end user will not see requests vanishing into thin air.Deprecated
N/A
Removed
N/A
Fixed
N/A? See description
Security
N/A
Breaking Changes
N/A
Additional Information
Screenshots or Videos
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.