Skip to main content

ApiJudgeConfig

Struct ApiJudgeConfig 

Source
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: ApiVendor

Which 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: u64

Per-call timeout in seconds, passed to curl --max-time.

§curl_bin: String

The curl binary (resolved on PATH).

§strict_json: bool

Constrain 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

Source§

fn clone(&self) -> ApiJudgeConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ApiJudgeConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ApiJudgeConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ApiJudgeConfig

Source§

impl PartialEq for ApiJudgeConfig

Source§

fn eq(&self, other: &ApiJudgeConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ApiJudgeConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ApiJudgeConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.