Expand description
Lean provider and LLM abstractions shared by the Everruns Framework and provider crates.
This crate owns credential-free model identity, the ChatDriver boundary,
provider assembly, shared protocol drivers, stream/retry helpers, typed
IDs, credential schemas, and the LLM error taxonomy. It is a focused
implementation crate in the Everruns ecosystem.
Low-level consumers import provider-owned contracts from this crate
directly; Framework users normally use the everruns facade.
Model profile types and data (ModelProfile, ServiceKind, and the
built-in profile registry) live in everruns-model-profiles and are
re-exported here for source compatibility.
§Example
use everruns_provider::ModelSpec;
let model = ModelSpec::on("company-gateway", "assistant-v2");
assert_eq!(model.provider.as_str(), "company-gateway");
assert_eq!(model.model, "assistant-v2");Re-exports§
pub use compact::CompactContent;pub use compact::CompactContentPart;pub use compact::CompactInputItem;pub use compact::CompactOutputItem;pub use compact::CompactRequest;pub use compact::CompactResponse;pub use compact::CompactUsage;pub use compact::messages_to_compact_input;pub use credential_provider::CredentialProvider;pub use credential_provider::EnvCredentialProvider;pub use credential_provider::ProviderCredentials;pub use credential_schema::CredentialFormSchema;pub use credential_schema::assemble_credential_document;pub use credential_schema::parse_credential_document;pub use driver_registry::BoxedChatDriver;pub use driver_registry::BoxedEmbeddingsDriver;pub use driver_registry::ChatDriver;pub use driver_registry::DiscoveredModel;pub use driver_registry::DriverDescriptor;pub use driver_registry::DriverFactory;pub use driver_registry::DriverId;pub use driver_registry::DriverOAuthConfig;pub use driver_registry::DriverOAuthFlow;pub use driver_registry::DriverRegistry;pub use driver_registry::EmbedRequest;pub use driver_registry::EmbedResponse;pub use driver_registry::EmbeddingsDriver;pub use driver_registry::EmbeddingsDriverError;pub use driver_registry::EmbeddingsDriverFactory;pub use driver_registry::LlmCallConfig;pub use driver_registry::LlmCallConfigBuilder;pub use driver_registry::LlmCompletionMetadata;pub use driver_registry::LlmContentPart;pub use driver_registry::LlmMessage;pub use driver_registry::LlmMessageContent;pub use driver_registry::LlmMessageRole;pub use driver_registry::LlmResponse;pub use driver_registry::LlmResponseStream;pub use driver_registry::LlmStreamError;pub use driver_registry::LlmStreamEvent;pub use driver_registry::ProviderConfig;pub use driver_registry::ProviderMetadata;pub use driver_registry::ProviderOpaqueContext;pub use driver_registry::fold_system_messages;pub use error::AgentLoopError;pub use error::BillingPressureReason;pub use error::FileSystemError;pub use error::FileSystemErrorClass;pub use error::LlmError;pub use error::LlmErrorKind;pub use error::Result;pub use error::StoreResultExt;pub use error::classify_fs_error;pub use error::from_json;pub use error::json_val;pub use execution_phase::ExecutionPhase;pub use execution_phase::PhaseSource;pub use llm_retry::LlmRetryConfig;pub use llm_retry::RateLimitInfo;pub use llm_retry::RateLimitType;pub use llm_retry::RetryMetadata;pub use model::Model;pub use model::ModelSource;pub use model::ModelWithProvider;pub use model_discovery::list_openai_compatible_models;pub use model_discovery::DiscoveredProviderModel;pub use model_discovery::ModelSearchMatch;pub use model_discovery::ModelSearchResult;pub use model_discovery::RankedDiscoveredModels;pub use model_discovery::discover_provider_models;pub use model_discovery::enrich_with_profiles;pub use model_discovery::match_models;pub use model_discovery::normalize_and_enrich;pub use model_discovery::rank_discovered_models;pub use model_discovery::search_provider_models;pub use model_profiles::get_model_profile;pub use model_profiles::get_model_vendor;pub use model_spec::ModelSpec;pub use model_spec::UnknownProvider;pub use openai_protocol::OpenAIProtocolChatDriver;pub use openresponses_protocol::OpenResponsesProtocolChatDriver;pub use openresponses_protocol::OpenResponsesRequestExtension;pub use provider::Provider as ProviderRecord;pub use provider::ProviderStatus;pub use provider::ProviderTraceConfig;pub use reasoning::ReasoningContentPart;pub use reasoning::ReasoningText;pub use runtime_provider::BearerAuth;pub use runtime_provider::Provider;pub use runtime_provider::ProviderAuth;pub use runtime_provider::ProviderAuthRequest;pub use runtime_provider::ProviderEndpoint;pub use runtime_provider::ProviderKey;pub use runtime_provider::ProviderRegistry;pub use runtime_provider::ResolvedProviderRequest;pub use runtime_provider::RuntimeProvider;pub use runtime_provider::RuntimeProviderRegistry;pub use runtime_provider::StaticHeaderAuth;pub use tool_types::BuiltinTool;pub use tool_types::CONFIRM_URL_ELICITATION_TOOL;pub use tool_types::ClientSideTool;pub use tool_types::DeferrablePolicy;pub use tool_types::SideEffectClass;pub use tool_types::ToolCall;pub use tool_types::ToolDefinition;pub use tool_types::ToolHints;pub use tool_types::ToolPolicy;pub use tool_types::ToolResult;pub use tool_types::ToolResultImage;pub use tool_types::URL_ELICITATION_REQUIRED_CODE;pub use tool_types::UrlElicitationRequired;pub use url_validation::UrlValidationError;pub use url_validation::is_blocked_ip;pub use url_validation::validate_safe_url;pub use url_validation::validate_url_dns_pinned;pub use user_facing_error::ErrorDisclosure;pub use user_facing_error::UserFacingError;pub use user_facing_error::UserFacingErrorContext;pub use user_facing_error::UserFacingErrorFields;pub use user_facing_error::classify_runtime_error_message;pub use user_facing_error::codes as user_facing_error_codes;pub use user_facing_error::is_provider_quota_message;pub use user_facing_error::is_usage_limit_message;pub use user_facing_error::metadata_keys as user_facing_error_metadata_keys;pub use user_facing_error::parse_usage_limit_reset_at;pub use user_facing_error::trim_error_chain_prefixes;
Modules§
- compact
- Transport-neutral native compaction request and response contracts.
- credential_
provider - credential_
schema - driver_
helpers - driver_
registry - error
- execution_
phase - Execution phase for assistant messages in multi-step tool-calling flows.
- llm_
retry - model
- model_
discovery - Provider model discovery and display ranking.
- model_
profiles - model_
spec - Credential-free model selection.
- native_
async - Native asynchronous calls are pending provider exchanges, not background-run handles.
- openai_
compat - OpenAI model constraints checked before a request reaches the network.
- openai_
protocol - openresponses_
protocol - openresponses_
types - provider
- reasoning
- Provider reasoning artifacts.
- reasoning_
updates - Conversation-scoped Astra configuration, distinct from the request baseline.
- runtime_
provider - Runtime providers: service identity, endpoint, authentication, and wire driver.
- stream_
accumulator - stream_
reconnect - tool_
schema_ compat - Provider-specific JSON Schema compatibility at the LLM request boundary.
- tool_
types - typed_
id - url_
validation - user_
facing_ error
Structs§
- Cost
Tier - A pricing tier that activates above a context token threshold. For example, OpenAI charges higher rates for prompts exceeding 200K tokens.
- Model
Cost - Cost information for the model (per million tokens)
- Model
Limits - Token limits for the model
- Model
Modalities - Model modalities for input and output
- Model
Profile - LLM Model Profile describing model capabilities Based on models.dev structure (https://models.dev/api.json)
- Reasoning
Effort Config - Reasoning effort configuration for a model
- Reasoning
Effort Value - Named reasoning effort value for UI display
Enums§
- Modality
- Modality type (text, image, audio, video)
- Model
Vendor - Vendor / brand that authored a model. Independent of the provider type that serves it (the same model may be offered by several providers or gateways). Primarily drives UI iconography.
- Reasoning
Effort - Reasoning effort level for models that support it
- Service
Kind - A typed service a provider driver can offer (see knowledge/foundations/providers.md).
Functions§
- install_
default_ crypto_ provider - Select the workspace crypto backend as the process-wide rustls provider.