Scope auxiliary LLM endpoints by owner (#2996)

* fix(auth): scope auxiliary llm endpoints by owner

* fix(auth): scope auxiliary llm fallbacks by owner
This commit is contained in:
Vykos
2026-06-07 14:47:44 +02:00
committed by GitHub
parent 12a7e741d0
commit 83b0ab7cd3
11 changed files with 146 additions and 32 deletions
+2 -1
View File
@@ -307,6 +307,7 @@ async def maybe_compact(
model: str,
messages: List[Dict],
headers: Optional[Dict] = None,
owner: Optional[str] = None,
) -> tuple:
"""Check context usage and compact if above threshold.
@@ -353,7 +354,7 @@ async def maybe_compact(
)
# Use utility model if configured, otherwise fall back to session model
util_url, util_model, util_headers = resolve_endpoint("utility")
util_url, util_model, util_headers = resolve_endpoint("utility", owner=owner)
compact_url = util_url or endpoint_url
compact_model = util_model or model
compact_headers = util_headers if util_url else headers