mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-17 23:52:29 +00:00
Admins can now use {{chat_id}}, {{message_id}}, {{user_id}}, and
{{user_name}} as dynamic placeholders in custom header values for
OpenAI-compatible connections.
Before merging custom headers into the outgoing request,
get_headers_and_cookies() performs a simple string-replace pass
using values already available in the metadata dict and user object.
Header values with no {{...}} tokens pass through unchanged, and
unknown tokens are left as-is, so the change is fully backwards
compatible.
Use-case: providers like Manifest that use a session-scoped header
(e.g. x-session-key) to route or isolate conversations can now be
configured with {"x-session-key": "{{chat_id}}"} so every request
automatically carries the current chat UUID.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| data | ||
| internal | ||
| migrations | ||
| models | ||
| retrieval | ||
| routers | ||
| socket | ||
| static | ||
| storage | ||
| test | ||
| tools | ||
| utils | ||
| __init__.py | ||
| alembic.ini | ||
| config.py | ||
| constants.py | ||
| env.py | ||
| functions.py | ||
| main.py | ||
| tasks.py | ||