Added environment variables for agents for the global_tools and mcp_servers settings

This commit is contained in:
2025-11-06 12:16:36 -07:00
parent dddf72e1da
commit 0550de2093
+10
View File
@@ -530,6 +530,16 @@ impl AgentConfig {
if let Some(v) = read_env_value::<f64>(&with_prefix("top_p")) { if let Some(v) = read_env_value::<f64>(&with_prefix("top_p")) {
self.top_p = v; self.top_p = v;
} }
if let Ok(v) = env::var(with_prefix("global_tools")) {
if let Ok(v) = serde_json::from_str(&v) {
self.global_tools = v;
}
}
if let Ok(v) = env::var(with_prefix("mcp_servers")) {
if let Ok(v) = serde_json::from_str(&v) {
self.mcp_servers = v;
}
}
if let Some(v) = read_env_value::<String>(&with_prefix("agent_session")) { if let Some(v) = read_env_value::<String>(&with_prefix("agent_session")) {
self.agent_session = v; self.agent_session = v;
} }