trae_agent_rs_core/config/
model_config.rs1use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct ModelConfig {
8 pub model_provider: String,
10
11 pub model: String,
13
14 pub max_tokens: Option<u32>,
16
17 pub temperature: Option<f32>,
19
20 pub top_p: Option<f32>,
22
23 pub top_k: Option<u32>,
25
26 pub max_retries: Option<u32>,
28
29 pub parallel_tool_calls: Option<bool>,
31
32 pub stop_sequences: Option<Vec<String>>,
34}
35
36impl Default for ModelConfig {
37 fn default() -> Self {
38 Self {
39 model_provider: "anthropic".to_string(),
40 model: "claude-3-5-sonnet-20241022".to_string(),
41 max_tokens: Some(4096),
42 temperature: Some(0.5),
43 top_p: Some(1.0),
44 top_k: None,
45 max_retries: Some(3),
46 parallel_tool_calls: Some(true),
47 stop_sequences: None,
48 }
49 }
50}