1#![doc = include_str!("README.md")]
2pub mod admission;
3pub mod agent;
4pub mod benchmark;
5pub mod cache_budget;
6pub mod capabilities;
7pub mod chat;
8pub mod gguf;
9pub mod inference;
10pub mod inference_profile;
11pub mod kv_estimate;
12pub mod kv_memory;
13pub mod launch_narration;
14pub mod mcp;
15mod model;
16pub mod model_naming;
17pub mod query;
18pub mod recommendation;
19pub mod residency;
20pub mod sampling_provenance;
21mod server_config;
22pub mod slot_eviction;
23
24pub use model::{
26 Model, ModelFile, ModelFilterOptions, NewModel, NewModelFile, RangeValues, SYSTEM_TAG_PREFIX,
27 is_system_tag,
28};
29
30pub use query::{ModelListQuery, ModelSortBy, SortOrder, apply_query};
32
33pub use benchmark::{
35 BenchmarkEvent, BenchmarkModelResult, BenchmarkRun, BenchmarkRunStatus, BenchmarkRunType,
36 CandidateSource, CompareConfig, ModelBenchmarkSummary, ModelCompareResult, ModelPerfResult,
37 PerfConfig, ScoreWeights, SweepSpec, TaskCategory, TaskSuite, TuneCandidateResult, TuneConfig,
38 TuneTask, TuneTaskResult,
39};
40
41pub use inference::{DefaultsOrigin, InferenceConfig, ModelSamplingContext};
43pub use inference_profile::{
44 InferenceProfile, MAX_PROFILE_NAME_LEN, ProfileNameError, RESERVED_PROFILE_NAMES,
45 builtin_templates, validate_name,
46};
47
48pub use sampling_provenance::{FieldSources, ParamSource, SamplingLayer};
50
51pub use kv_estimate::{
53 KvElemsPerToken, estimate_kv_bytes_for_context, estimate_kv_elems_per_token, kv_bytes_per_token,
54};
55
56pub use kv_memory::kv_memory_is_partial;
58
59pub use launch_narration::{LaunchDecision, LaunchNarration, format_gib, format_mib_as_gib};
61
62pub use recommendation::{BudgetSource, ModelCandidate, Recommendation, recommend};
64
65pub use admission::{
67 AdmissionSnapshot, QueuedModelSnapshot, ResidentSlotSnapshot, SecondarySlotStatus,
68};
69
70pub use residency::{
72 RESIDENCY_UTILISATION, SECONDARY_MAX_BYTES, SecondarySlotDecision, SlotFootprint,
73 decide_secondary_slot,
74};
75pub use server_config::ServerConfig;
76
77pub use cache_budget::{
79 CACHE_RAM_FLOOR_BYTES, CACHE_RAM_HEADROOM_BYTES, CACHE_RAM_LOW_WATERMARK_BYTES,
80 CACHE_RAM_UNKNOWN_KV_ALLOWANCE_BYTES, CacheRamHealth, classify_cache_ram,
81 compute_auto_cache_ram_mb,
82};
83
84pub use slot_eviction::{
86 DISK_BUDGET_FRACTION_DIVISOR, SlotFileMeta, compute_auto_disk_budget_bytes, select_evictions,
87};
88
89pub use mcp::{
91 McpEnvEntry, McpLifecycle, McpServer, McpServerConfig, McpServerStatus, McpServerType, McpTool,
92 McpToolResult, NewMcpServer, SEARCH_RESULTS_CAP, ToolIndex, ToolSummary, UpdateMcpServer,
93};
94
95pub use chat::{
97 Conversation, ConversationUpdate, Message, MessageRole, NewConversation, NewMessage,
98};
99
100pub use gguf::{
102 CapabilityFlags, GgufCapabilities, GgufMetadata, GgufValue, RawMetadata, ReasoningDetection,
103 ToolCallingDetection,
104};
105
106pub use model_naming::{
108 NameSource, UNKNOWN_MODEL_NAME, declared_name, repo_short_name, resolve_model_name,
109 strip_gguf_suffix,
110};
111
112pub use agent::{
114 AGENT_EVENT_CHANNEL_CAPACITY, AgentConfig, AgentConfigError, AgentEvent, AgentMessage,
115 AssistantContent, DEFAULT_MAX_ITERATIONS, DEFAULT_MAX_PARALLEL_TOOLS,
116 DEFAULT_MAX_STAGNATION_STEPS, LlmStreamEvent, MAX_ITERATIONS_CEILING,
117 MAX_PARALLEL_TOOLS_CEILING, MAX_TOOL_TIMEOUT_MS_CEILING, MIN_CONTEXT_BUDGET_CHARS,
118 MIN_TOOL_TIMEOUT_MS, ToolCall, ToolDefinition, ToolResult,
119};
120
121pub use capabilities::{
123 ChatMessage, MessageContent, ModelCapabilities, capabilities_from_architecture,
124 infer_from_chat_template, transform_messages_for_capabilities,
125};