Probe success line as a full sentence: model name, endpoint, response time, pool size, and what happens next
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
470496b7ef
commit
20e9b87248
@ -555,12 +555,14 @@ async def _probe_model(adapter, model_spec: str) -> None:
|
|||||||
dur = time.monotonic() - _probe_model._t0 if hasattr(_probe_model, '_t0') else 0.0
|
dur = time.monotonic() - _probe_model._t0 if hasattr(_probe_model, '_t0') else 0.0
|
||||||
name = getattr(members[0], 'model', '') or '?'
|
name = getattr(members[0], 'model', '') or '?'
|
||||||
url = members[0].api_base
|
url = members[0].api_base
|
||||||
txt = (f'· model endpoint ok · model={name} · endpoint={url} · '
|
txt = (f'· Model endpoint verified: "{name}" responded at {url} '
|
||||||
f'instances={len(members)} · probe={dur:.1f}s')
|
f'in {dur:.1f}s ({len(members)} instance(s) in pool) -- '
|
||||||
|
f'generation will use this endpoint')
|
||||||
if _sys.stdout.isatty(): # color the machine-relevant facts on terminals
|
if _sys.stdout.isatty(): # color the machine-relevant facts on terminals
|
||||||
txt = (f'· model endpoint ok · model=\x1b[1m{name}\x1b[0m · '
|
txt = (f'· Model endpoint verified: "\x1b[1m{name}\x1b[0m" responded at '
|
||||||
f'endpoint=\x1b[36m{url}\x1b[0m · '
|
f'\x1b[36m{url}\x1b[0m in {dur:.1f}s '
|
||||||
f'instances={len(members)} · probe={dur:.1f}s')
|
f'({len(members)} instance(s) in pool) -- '
|
||||||
|
f'generation will use this endpoint')
|
||||||
print(txt, flush=True) # probe runs before status_callback exists
|
print(txt, flush=True) # probe runs before status_callback exists
|
||||||
_PROBED_SPECS.add(model_spec)
|
_PROBED_SPECS.add(model_spec)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user