Skip to main content

mermaid_cli/models/
mod.rs

1// Gateway module for models
2// All external access must go through this gateway
3
4// Core modules
5mod adapters; // Provider adapters (Ollama, OpenAI-compatible)
6mod backend; // ModelFactory (single factory)
7mod config; // Unified configuration
8mod error; // Structured error types
9pub mod tool_call; // Tool call parsing (native function calling)
10pub mod tools;
11mod traits; // Model trait (public API)
12mod types; // Core types (ChatMessage, etc) // Tool definitions
13
14// Public re-exports - the ONLY way to access model functionality
15pub use backend::ModelFactory;
16pub use config::{BackendConfig, ModelConfig, OllamaOptions};
17pub use error::{BackendError, ConfigError, ErrorCategory, ModelError, Result, UserFacingError};
18pub use tool_call::{FunctionCall, ToolCall};
19pub use tools::{Tool, ToolFunction, ToolRegistry};
20pub use traits::Model;
21pub use types::{ChatMessage, MessageRole, ModelResponse, StreamCallback, TokenUsage};