From f0648d12038d4dab92a13d4f6c5063632b1a0d9d Mon Sep 17 00:00:00 2001 From: Guillermo Serrahima Date: Wed, 1 Jul 2026 12:42:59 +0200 Subject: loop fixes and tweaks --- agent/orchestrator/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'agent/orchestrator/api.py') diff --git a/agent/orchestrator/api.py b/agent/orchestrator/api.py index 956f7b5..e91ea36 100644 --- a/agent/orchestrator/api.py +++ b/agent/orchestrator/api.py @@ -5,7 +5,7 @@ the standard `/v1/chat/completions` shape, translate to internal types, hand off to the orchestrator, and translate the response back to OpenAI shape. """ -from fastapi import FastAPI, HTTPException +from fastapi import FastAPI, HTTPException, Request from pydantic import BaseModel, ConfigDict from .loop import handle_turn @@ -36,7 +36,7 @@ def list_models(): @app.post("/v1/chat/completions") -def chat_completions(req: ChatCompletionRequest): +def chat_completions(req: ChatCompletionRequest, request: Request): # Open WebUI sends user info via custom headers when ENABLE_FORWARD_USER_INFO_HEADERS=true user_name = request.headers.get("x-openwebui-user-name") user_email = request.headers.get("x-openwebui-user-email") -- cgit v1.2.3