pub struct ResolvedEndpoint {Show 24 fields
pub name: String,
pub endpoint_type: EndpointType,
pub url: String,
pub model: Option<String>,
pub api_key: Option<String>,
pub headers: HashMap<String, String>,
pub command: Option<String>,
pub args: Vec<String>,
pub vision: bool,
pub input_price_per_1m: f64,
pub output_price_per_1m: f64,
pub cached_input_price_per_1m: f64,
pub cache_write_price_per_1m: f64,
pub cache_pricing: bool,
pub cache_markers: bool,
pub per_call_price: f64,
pub max_attempts: u32,
pub fallbacks: Vec<String>,
pub provider: Provider,
pub deployment: Option<String>,
pub api_version: Option<String>,
pub auth: AuthConfig,
pub header_commands: HashMap<String, String>,
pub aws: AwsConfig,
}Expand description
Resolved endpoint ready for use in calls.
Fields§
§name: StringEndpoint name.
endpoint_type: EndpointTypeEndpoint type.
url: StringBase URL for HTTP-based endpoints.
model: Option<String>Model name (LLM endpoints only).
api_key: Option<String>API key / bearer token.
headers: HashMap<String, String>Custom HTTP headers.
command: Option<String>Command for MCP subprocess endpoints.
args: Vec<String>Arguments for MCP subprocess endpoints.
vision: boolWhether this endpoint accepts image parts (vision).
input_price_per_1m: f64Input token pricing per 1M tokens.
output_price_per_1m: f64Output token pricing per 1M tokens.
cached_input_price_per_1m: f64Cached-input (prompt cache read) pricing per 1M tokens.
cache_write_price_per_1m: f64Cache-write (cache creation) input pricing per 1M tokens.
cache_pricing: boolBill cache reads/writes at their cache rates (default true).
cache_markers: boolSend provider-side prompt-cache markers (default true).
per_call_price: f64Flat cost per call.
max_attempts: u32Retry budget for a single chat completion (default 3; global env
override HARNESS_LLM_CALL_ATTEMPTS).
fallbacks: Vec<String>Ordered names of fallback endpoints tried when this endpoint exhausts its attempts (LLM endpoints only).
provider: ProviderLLM provider protocol.
deployment: Option<String>Azure OpenAI deployment name (provider azure).
api_version: Option<String>Azure OpenAI API version (provider azure).
auth: AuthConfigAuthentication configuration.
header_commands: HashMap<String, String>Headers produced by running a command per call.
aws: AwsConfigAWS credential settings (provider bedrock).
Implementations§
Source§impl ResolvedEndpoint
impl ResolvedEndpoint
Sourcepub fn default_llm() -> Self
pub fn default_llm() -> Self
Creates a default LLM endpoint from environment variables.