mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[GH-ISSUE #8661] Send X-OpenWebUI-Request-Type, e.g. "retrieval" or "web_search" or X-OpenWebUI-Should-Cache as an optional header to improve prompt caching #118519
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?
Originally created by @crizCraig on GitHub (Jan 17, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8661
Feature Request
Is your feature request related to a problem? Please describe.
RAG prompts starting with
"### Task:\nRespond to the user query using the provided contextare not amenable to prompt caching as they don't persist in the message history. So writing them to cache ends up increasing costs, since they are never read back.Describe the solution you'd like
I provide a custom openai compatible API which currently gets user info via headers like
X-OpenWebUI-User-Nameand it'd be great to get the prompt type in a header likeX-OpenWebUI-Prompt-TypeorX-OpenWebUI-Request-Typeor even a should cache header likeX-OpenWebUI-Should-Cache.Describe alternatives you've considered
I will just check for the RAG template for now when caching, but wanted to bring this up as prompt caching seems to be a popular request, see https://github.com/open-webui/open-webui/issues/4887