pub struct ApiJudgeConfig {
pub vendor: ApiVendor,
pub api_key_env: Option<String>,
pub base_url: Option<String>,
pub timeout_secs: u64,
pub curl_bin: String,
pub strict_json: bool,
}Expand description
Settings for judging evals and the simulated user with a direct model API call instead of running them through a harness. This trades the harness’s auth-portability for a single fast HTTP round trip per judge call (no agent-loop cold start), with normalized token usage surfaced into the report.
The judge model is the run’s judge_model (it must be a valid API model
id for the chosen vendor, e.g. claude-opus-4-8 or gpt-4o); only the
transport is configured here.
Fields§
§vendor: ApiVendorWhich vendor’s API to call.
api_key_env: Option<String>Environment variable holding the API key. Defaults to ANTHROPIC_API_KEY
or OPENAI_API_KEY by vendor. The key is read at run time and never
stored in config.
base_url: Option<String>Override the API endpoint (e.g. a proxy or an OpenAI-compatible gateway). Defaults to the vendor’s standard endpoint.
timeout_secs: u64Per-call timeout in seconds, passed to curl --max-time.
curl_bin: StringThe curl binary (resolved on PATH).
strict_json: boolConstrain the judge’s verdict to the {value, reason} JSON schema via the
vendor’s structured-outputs feature (Anthropic output_config.format,
OpenAI response_format: json_schema). On by default — it removes a class
of judge-parse fragility. Turn it off for a model/endpoint that doesn’t
support structured outputs (the tolerant {…} extraction still applies).
Trait Implementations§
Source§impl Clone for ApiJudgeConfig
impl Clone for ApiJudgeConfig
Source§fn clone(&self) -> ApiJudgeConfig
fn clone(&self) -> ApiJudgeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ApiJudgeConfig
impl Debug for ApiJudgeConfig
Source§impl<'de> Deserialize<'de> for ApiJudgeConfig
impl<'de> Deserialize<'de> for ApiJudgeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ApiJudgeConfig
Source§impl PartialEq for ApiJudgeConfig
impl PartialEq for ApiJudgeConfig
Source§fn eq(&self, other: &ApiJudgeConfig) -> bool
fn eq(&self, other: &ApiJudgeConfig) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ApiJudgeConfig
impl Serialize for ApiJudgeConfig
impl StructuralPartialEq for ApiJudgeConfig
Auto Trait Implementations§
impl Freeze for ApiJudgeConfig
impl RefUnwindSafe for ApiJudgeConfig
impl Send for ApiJudgeConfig
impl Sync for ApiJudgeConfig
impl Unpin for ApiJudgeConfig
impl UnsafeUnpin for ApiJudgeConfig
impl UnwindSafe for ApiJudgeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.