datarobot_genai.eval.validation
validation
preflight_judge
Ping the judge endpoint with a minimal chat-completions call.
Raises RuntimeError on any non-200 response or network failure so callers can bail before running the full benchmark — catches missing / invalid / expired tokens, wrong model_id, and gateway outages that would otherwise surface only as a cascade of per-case CALL_ERROR results.
Source code in datarobot_genai/eval/validation.py
health_check
Return None if the server responds at all, else an error string.
Prefer a dedicated /health probe: dragent/DRUM-fronted agents expose a /health route (returning 200) at the host root, so probing it avoids the 404 log noise that pinging a bare /v1-style base URL generates on the agent side. The endpoint's path (e.g. /v1) is stripped so /health resolves against the host:port.
If /health isn't available (some deployed / production endpoints don't expose it), fall back to pinging the literal endpoint and treating any HTTP response (even 4xx/405) as "reachable" — a DRUM agentic-workflow server exposes /chat/completions but not necessarily /v1/models. Only a connection-level failure is fatal.