unsloth/studio/backend/picker
Unsloth d5758ecf58 Address review round 2: proxy-aware detection, shared worker probe, local skip
All four reproduced before fixing, and re-measured after.

- Proxy-only egress was declared offline. With HTTP(S)_PROXY set, the proxy
  resolves the hub host, so a failing local lookup says nothing. The DNS
  shortcut now stands down whenever a proxy applies (and honours NO_PROXY),
  letting the proxy-aware probe decide. Measured: endpoint probe reachable
  through the proxy while the guard still forced offline.
- The training worker kept its own inline probe hardcoded to huggingface.co,
  so a reachable HF_ENDPOINT mirror set lifetime offline flags. It now uses
  the shared endpoint- and proxy-aware helper.
- /models/check-vision, /models/config and /picker/chat-template ran the
  probe even for local paths, which never reach the hub. Measured 0.9s of
  pure latency per request; now skipped via _hf_offline_if_unreachable_for.

DNS/endpoint/proxy helpers now live in utils.utils so llama_cpp and the
training worker share one implementation instead of three copies.

The static pin in test_offline_inference_parent moved with the probe: the
worker block must delegate to the shared helper and must not hardcode a
host, and the daemon-thread/no-setdefaulttimeout property is pinned on
dns_host_dead where it now lives.

Offline path unchanged: load 686s -> 6s, /models/config 378s -> 0s, and a
local-path vision check is back to 0s.
2026-07-28 23:46:34 -07:00
..
routes Address review round 2: proxy-aware detection, shared worker probe, local skip 2026-07-28 23:46:34 -07:00
__init__.py Feat/model picker per model config v2 (#7207) 2026-07-20 22:53:22 -07:00
schemas.py Feat/model picker per model config v2 (#7207) 2026-07-20 22:53:22 -07:00
service.py Studio: add configurable model download location (#7274) 2026-07-23 01:34:38 -07:00