Files
hermes-agent/tests
Timmy 63ae8a09f9
Some checks failed
Forge CI / smoke-and-build (pull_request) Failing after 1m18s
feat(cron): prefer_local auto-route jobs to local inference (#378)
Health Monitor jobs reference localhost:11434 but run on cloud models.
Issue fix suggestion: 'pin back to local model'. This implements that.

Jobs with prefer_local=true now auto-detect local inference servers
(Ollama, llama.cpp, vllm) by probing well-known health endpoints.
When found, the scheduler overrides base_url to the local endpoint.
When not found, falls back to default provider with a warning.

Changes:
- cron/scheduler.py: Add re import, _LOCAL_ENDPOINTS config,
  _probe_local_endpoint(), _resolve_prefer_local(). Wire into
  run_job() provider routing to override base_url when local
  server is found.
- tests/test_cron_prefer_local.py: 10 tests covering probing,
  resolution logic, endpoint config.

Closes #378
2026-04-13 21:16:45 -04:00
..