fix: model naming for affinity status for llama endpoints
This commit is contained in:
parent
aa7ec6354a
commit
ad0be90a70
1 changed files with 5 additions and 1 deletions
|
|
@ -3121,15 +3121,19 @@ async def affinity_stats(request: Request):
|
|||
|
||||
now = time.monotonic()
|
||||
entries: list[dict] = []
|
||||
llama_eps = set(config.llama_server_endpoints)
|
||||
async with _affinity_lock:
|
||||
for fp, (ep, mdl, expires_at) in list(_affinity_map.items()):
|
||||
remaining = expires_at - now
|
||||
if remaining <= 0:
|
||||
_affinity_map.pop(fp, None)
|
||||
continue
|
||||
# Mirror the normalisation used by /api/ps_details so the dashboard
|
||||
# can join affinity entries to PS rows by (endpoint, model).
|
||||
display_model = _normalize_llama_model_name(mdl) if ep in llama_eps else mdl
|
||||
entries.append({
|
||||
"endpoint": ep,
|
||||
"model": mdl,
|
||||
"model": display_model,
|
||||
"remaining": round(remaining, 2),
|
||||
})
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue