Skip to main content

converge_provider_api/
lib.rs

1// Copyright 2024-2026 Reflective Labs
2
3// SPDX-License-Identifier: MIT
4
5//! # Converge Provider API
6//!
7//! This crate defines the provider-facing capability contract for Converge.
8//! It is deliberately separate from pack authoring:
9//!
10//! - chat traits and request/response types live here
11//! - [`Backend`] and [`BackendKind`] describe provider identity
12//! - [`Capability`] describes what a provider can do
13//! - [`BackendRequirements`] and [`BackendSelector`] drive routing
14//! - [`BackendError`] is the generic provider error surface
15//!
16//! Suggestor and invariant authoring do not live here. Those contracts belong to
17//! `converge-pack`.
18
19pub mod backend;
20pub mod capability;
21pub mod chat;
22pub mod error;
23pub mod selection;
24
25pub use backend::{Backend, BackendKind};
26pub use capability::Capability;
27pub use chat::{
28    BoxFuture, ChatBackend, ChatMessage, ChatRequest, ChatResponse, ChatRole, DynChatBackend,
29    FinishReason, LlmError, ResponseFormat, TokenUsage, ToolCall, ToolDefinition,
30};
31pub use error::{BackendError, BackendErrorKind};
32pub use selection::{
33    AgentRequirements, BackendRequirements, BackendSelector, CapabilityAssignment, ComplianceLevel,
34    CostClass, CostTier, DataSovereignty, Jurisdiction, LatencyClass, ModelSelectorTrait,
35    ProviderAssignment, ProviderRequest, RequiredCapabilities, SelectionCriteria, TaskComplexity,
36};