fix(model_metadata): cache detect_local_server_type result for process lifetime

Every 5 minutes fetch_endpoint_model_metadata() re-runs the full server-type
waterfall (LM Studio -> Ollama -> llama.cpp -> vLLM), spraying 404s at
endpoints the server never exposes (e.g. /api/v1/models and /api/tags on a
vllm backend).

Add _endpoint_probe_path_cache (base_url -> server type) so the first
successful probe's result is reused for the lifetime of the process.
Subsequent refreshes skip straight to the known-good path.

Fixes #29971.
This commit is contained in:
uzaylisak 2026-05-21 22:31:40 +03:00
parent ba9964ff0d
commit f3d7a8960a
2 changed files with 52 additions and 33 deletions

View file

@ -1261,6 +1261,7 @@ AUTHOR_MAP = {
"120500656+oooindefatigable@users.noreply.github.com": "ooovenenoso",
"vanthinh6886@gmail.com": "vanthinh6886", # PR #28018 salvage (yaml/flock/atomic write guards)
"erik.engervall@gmail.com": "erikengervall", # PR #28774 (firecrawl integration tag)
"1torhan@protonmail.com": "uzaylisak",
}