fix(models): query v1 models for llama-server endpoints (#3380)

* fix(models): query v1 models for llama-server endpoints

* test(models): accept owner kwargs in llama-server regression
This commit is contained in:
Ocean Bennett
2026-06-08 19:09:02 -04:00
committed by GitHub
parent f7ae85590b
commit e7c1d75884
5 changed files with 66 additions and 4 deletions
+3 -1
View File
@@ -297,7 +297,9 @@ def _query_context_length(endpoint_url: str, model: str) -> int:
logger.info(f"Using known context window for {model}: {known}")
return known or DEFAULT_CONTEXT
models_url = endpoint_url.replace("/chat/completions", "/models")
from src.endpoint_resolver import build_models_url
models_url = build_models_url(endpoint_url)
try:
r = httpx.get(models_url, timeout=REQUEST_TIMEOUT)
if r.is_success: