feat: add thinking mode support for agents

This commit is contained in:
wizardchen
2026-01-20 16:20:43 +08:00
committed by lyingbug
parent b1895f7443
commit aa4af5365e
21 changed files with 1118 additions and 481 deletions
+2
View File
@@ -29,6 +29,8 @@ type AgentConfig struct {
// MCP service selection
MCPSelectionMode string `json:"mcp_selection_mode"` // MCP selection mode: "all", "selected", "none"
MCPServices []string `json:"mcp_services"` // Selected MCP service IDs (when mode is "selected")
// Whether to enable thinking mode (for models that support extended thinking)
Thinking *bool `json:"thinking"`
}
// SessionAgentConfig represents session-level agent configuration
+2
View File
@@ -79,6 +79,8 @@ type CustomAgentConfig struct {
Temperature float64 `yaml:"temperature" json:"temperature"`
// Maximum completion tokens (only for normal mode)
MaxCompletionTokens int `yaml:"max_completion_tokens" json:"max_completion_tokens"`
// Whether to enable thinking mode (for models that support extended thinking)
Thinking *bool `yaml:"thinking" json:"thinking"`
// ===== Agent Mode Settings =====
// Maximum iterations for ReAct loop (only for agent type)