fix(config): add missing llm wrapper structs for agents and tools TOM…#47
Merged
Conversation
…L sections The TOML config uses [agents.llm] and [tools.llm] nested structures (matching [global.llm]), but the Go structs mapped [agents] and [tools] directly to AgentsLLMConfig/ToolsLLMConfig without the intermediate llm level. This caused all per-agent and per-tool provider overrides to be silently ignored, falling back to the global default. Add AgentsConfig and ToolsConfig wrapper structs to match the TOML layout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Model() method to Engine interface and implementations, publish model_info events from RunAgentLoop and ConductorAgent, and display the active model name in the TUI footer status bar (e.g. "◷ Running [deepseek-v4-pro]..."). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reviewer's GuideAdds wrapper structs for agents and tools LLM config sections to align with TOML structure, and introduces an Engine.Model API that is used to publish and display the current LLM model name in the TUI status bar while tasks run. Sequence diagram for publishing and displaying LLM model info in the TUIsequenceDiagram
actor User
participant ConductorAgent
participant Executor as ExecutorRunAgentLoop
participant Publisher
participant EventLoop as EventChannel
participant TUI as TUIModel
User->>ConductorAgent: start task (Run)
ConductorAgent->>ConductorAgent: LLM.Model()
ConductorAgent->>Publisher: Publish(model_info, {model, agent}, agentName)
Publisher-->>EventLoop: push taskEvent model_info
User->>Executor: start tool-based task
Executor->>Executor: cfg.LLM.Model()
Executor->>Publisher: Publish(model_info, {model, agent}, AgentName)
Publisher-->>EventLoop: push taskEvent model_info
loop task event handling
EventLoop-->>TUI: taskEventMsg(model_info)
TUI->>TUI: extract model from Content
TUI->>TUI: currentModel = model
TUI->>TUI: Update view
TUI-->>User: status bar shows Running [model]...
end
EventLoop-->>TUI: taskCompleteMsg
TUI->>TUI: taskRunning = false
TUI->>TUI: currentModel = ""
TUI-->>User: status bar cleared of model name
Class diagram for updated configuration wrappers and LLM engine interfaceclassDiagram
direction LR
class Config {
+TopLevelConfig Global
+AgentsConfig Agents
+ToolsConfig Tools
+AppConfig App
+AgentConfig Agent
+ContextCompactConfig Compact
+string resolveAgentProvider(agentName)
+AgentLLMOverride getAgentOverride(agentName)
+string resolveToolProvider(toolName)
+ToolLLMOverride getToolOverride(toolName)
+string resolveEffectiveProviderName()
}
class TopLevelConfig {
+GlobalLLMConfig LLM
}
class AgentsConfig {
+AgentsLLMConfig LLM
}
class ToolsConfig {
+ToolsLLMConfig LLM
}
class AgentsLLMConfig {
+string UseProvider
+AgentLLMOverride Conductor
+AgentLLMOverride Coding
+AgentLLMOverride Repo
+AgentLLMOverride Chat
+AgentLLMOverride Meta
+AgentLLMOverride DevOps
}
class ToolsLLMConfig {
+string UseProvider
+ToolLLMOverride MicroAgent
+ToolLLMOverride Thinking
+ToolLLMOverride ImplPlan
}
class Engine {
<<interface>>
+GenerateContent(ctx, messages, tools, opts) Response
+Model() string
}
class OpenAIEngine {
-client
-string model
+OpenAIEngine NewOpenAIEngine(baseURL, apiKey, model)
+GenerateContent(ctx, messages, tools, opts) Response
+Model() string
}
class LoggingEngine {
-Engine inner
+GenerateContent(ctx, messages, tools, opts) Response
+Model() string
}
class ConductorAgent {
+string Name()
+Engine LLM
+Publisher Publisher
+Run(ctx, input, mem) string
}
class ExecutorConfig {
+Engine LLM
+Publisher Publisher
+string AgentName
+bool SystemAsHuman
}
class Publisher {
+Publish(eventType, content, source)
}
Config --> TopLevelConfig : has
Config --> AgentsConfig : has
Config --> ToolsConfig : has
Config --> AppConfig : has
Config --> AgentConfig : has
Config --> ContextCompactConfig : has
AgentsConfig --> AgentsLLMConfig : wraps
ToolsConfig --> ToolsLLMConfig : wraps
OpenAIEngine ..|> Engine
LoggingEngine ..|> Engine
ConductorAgent --> Engine : uses as LLM
ConductorAgent --> Publisher : publishes events
ExecutorConfig --> Engine : uses as LLM
ExecutorConfig --> Publisher : publishes events
Publisher <.. ConductorAgent : calls Publish
Publisher <.. ExecutorConfig : calls Publish
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Wrap agents and tools LLM configuration sections in dedicated structs and surface the active LLM model in the TUI status bar by publishing model metadata from agents and exposing model names via the LLM engine interface.
New Features:
Enhancements:
Tests: