pub struct AppConfig {
pub provider: LlmProvider,
pub openrouter: OpenRouterConfig,
pub anthropic: AnthropicConfig,
pub openai: OpenAIConfig,
pub openai_codex: OpenAICodexConfig,
pub vertex: VertexConfig,
pub logging: LoggingConfig,
pub history: HistoryConfig,
pub web: Option<WebConfig>,
}Expand description
Root configuration object for Appam.
This type holds provider selection plus the provider-specific configuration blocks consumed by the runtime. It also carries cross-cutting concerns such as logging, history, and the legacy web configuration surface.
Most users either construct it through AppConfigBuilder, load it from a
TOML file with load_global_config, or start from
load_config_from_env.
§Provider Selection
The provider field determines which LLM backend to use. Each provider
has its own configuration section:
provider = "anthropic" # or "openrouter", "openai"
[anthropic]
model = "claude-sonnet-4-5"
max_tokens = 4096
[openrouter]
model = "openai/gpt-5"
max_output_tokens = 9000
[openai]
model = "gpt-5.5"
max_output_tokens = 4096
[openai_codex]
model = "gpt-5.5"
[vertex]
model = "gemini-2.5-flash"
location = "us-central1"Fields§
§provider: LlmProviderLLM provider selection
openrouter: OpenRouterConfigOpenRouter API configuration
anthropic: AnthropicConfigAnthropic API configuration
openai: OpenAIConfigOpenAI API configuration
openai_codex: OpenAICodexConfigOpenAI Codex subscription provider configuration
vertex: VertexConfigGoogle Vertex API configuration
logging: LoggingConfigLogging configuration
history: HistoryConfigSession history configuration
web: Option<WebConfig>Web API configuration (optional)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppConfig
impl<'de> Deserialize<'de> for AppConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnsafeUnpin for AppConfig
impl UnwindSafe for AppConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request