Opus 4.5+ and Sonnet 4.6+ support a new "effort" knob that controls how
much budget the model spends on thinking and tool calls. Plumb it through
end to end so each agent can pick its own level.
Storage & shape:
- New TEXT column agents.effort (default '') added via TryAddColumn.
- AgentRecord.Effort + INSERT/UPDATE in DatabaseService.Agents.cs.
- ChatContext.Effort + SubAgentContext.Effort so the value travels with the
request alongside model and tool settings.
Agent editor:
- Effort dropdown above git-commit behavior in the agent form (low/medium/
high/xhigh/max plus empty = "use default"). Always visible; on OpenAI
providers the value is sent but silently ignored.
- agent-page.js load/save and AgentEndpoint create/update wired up.
Anthropic API path:
- StreamChat and RunNonStreamingToolLoop add output_config: { effort } when
effort is set and not "high" – empty/null/"high" means "omit and let the
API pick its default".
- Sub-agents (preparer/review/finalizer) get the parameter through
RunAgentChat so each step uses its own agent's effort.
Anthropic CLI path:
- ClaudeCliService.ChatStreamingAsync takes an effort parameter and exports
CLAUDE_CODE_EFFORT_LEVEL on the spawned process. Env-var beats the
--effort flag because it also covers "max" and "ultracode".
- StreamChatViaCli, ChatNonStreamingViaCli, RunSubAgentViaCli, and the
ChatEndpoint anthropic branches all hand the value through.
ARCHITECTURE.md / ARCHITECTURE_QUICK.md updated with the new field.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
56 lines
1.8 KiB
C#
56 lines
1.8 KiB
C#
using System.Collections.Generic;
|
|
using Gott.Services;
|
|
|
|
namespace Gott.Models;
|
|
|
|
public class ChatContext
|
|
{
|
|
public string ChainId { get; set; }
|
|
public string SessionId { get; set; }
|
|
public string ModelId { get; set; }
|
|
public string Provider { get; set; } // "" = Anthropic, "nvidia" = OpenAI-kompatibler Provider
|
|
public string Workspace { get; set; }
|
|
public string AgentId { get; set; }
|
|
public string SystemPromptText { get; set; }
|
|
public List<object> SystemPrompt { get; set; }
|
|
public List<PromptBlock> PromptBlocks { get; set; }
|
|
public string ToolChoice { get; set; }
|
|
public bool UseMemory { get; set; }
|
|
public string WebSearchVersion { get; set; }
|
|
public string Effort { get; set; }
|
|
public int MaxIterations { get; set; }
|
|
public AgentRecord Agent { get; set; }
|
|
public SessionRecord Session { get; set; }
|
|
public bool PlanMode { get; set; }
|
|
public string ApiToken { get; set; }
|
|
|
|
// Preparer-Agent (vor dem Worker)
|
|
public SubAgentContext Preparer { get; set; }
|
|
|
|
// Review-Agent
|
|
public SubAgentContext Review { get; set; }
|
|
|
|
// Finalizer-Agent
|
|
public SubAgentContext Finalizer { get; set; }
|
|
}
|
|
|
|
public class SubAgentContext
|
|
{
|
|
public string ModelId { get; set; }
|
|
public string Provider { get; set; } // "" = Anthropic, "nvidia"/"openai"/etc. = OpenAI-kompatibel
|
|
public List<object> SystemPrompt { get; set; }
|
|
public string AgentId { get; set; }
|
|
public string Workspace { get; set; }
|
|
public bool UseMemory { get; set; }
|
|
public string WebSearchVersion { get; set; }
|
|
public string ToolChoice { get; set; }
|
|
public string Effort { get; set; }
|
|
public AgentRecord Agent { get; set; }
|
|
|
|
// Preparer-spezifisch
|
|
public bool AllowUserChoice { get; set; }
|
|
|
|
// Review-spezifisch
|
|
public int MaxReviewIterations { get; set; }
|
|
}
|