Add swarmModel field to per-agent settings and workerModel to spin config#736
Add swarmModel field to per-agent settings and workerModel to spin config#736
Conversation
Complexity Assessment - Issue #735Detailed Analysis CompleteChanges Required:
Complexity EvaluationMetrics:
Key Observations:
Assumptions Table
Complexity AssessmentClassification: SIMPLE Metrics:
Reasoning: This is a straightforward schema extension with minimal logic changes. The fallback chain is already well-understood and documented, and both modified files are well-architected. No architectural decisions required - implementation follows directly from requirements with low integration risk. |
Combined Analysis & Plan - Issue #735Executive SummaryAdd a Questions and Key Decisions
Implementation OverviewHigh-Level Execution Phases
Quick Stats
Complete Analysis & Implementation Details (click to expand)Research FindingsProblem Space
Codebase Research
Affected Files
Integration Points
Medium Severity Risks
Implementation PlanAutomated Test Cases to CreateTest File: Click to expand test structure (15 lines)// In describe('swarm-specific model overrides'):
it('uses per-agent swarmModel when configured', /* ... */)
it('per-agent swarmModel beats blanket swarm worker model', /* ... */)
it('per-agent swarmModel beats spin.swarmModel', /* ... */)
it('spin.swarmModel acts as blanket override when no swarm-worker.model set', /* ... */)
it('agents.iloom-swarm-worker.model beats spin.swarmModel', /* ... */)
// In describe('renderSwarmWorkerAgent'):
it('uses spin.swarmModel for worker frontmatter when agents.iloom-swarm-worker.model not set', /* ... */)
it('agents.iloom-swarm-worker.model beats spin.swarmModel for worker frontmatter', /* ... */)Test File: // Schema validation tests for swarmModel on BaseAgentSettingsSchema and SpinAgentSettingsSchema
it('accepts swarmModel on agent settings', /* ... */)
it('accepts swarmModel on spin settings', /* ... */)Files to Modify1.
|
Implementation CompleteSummaryAdded Changes Made
Validation Results
Detailed Changes by File (click to expand)src/lib/SettingsManager.tsChanges: Schema extensions
src/lib/SwarmSetupService.tsChanges: Fallback chain extension
src/lib/SwarmSetupService.test.tsChanges: 8 new test cases
src/lib/SettingsManager.test.tsChanges: 5 schema validation tests
docs/iloom-commands.mdChanges: Documentation updates
|
Implementation Complete - Issue #735 ✅SummaryAdded Changes Made
Validation Results
📋 Detailed Changes by File (click to expand)Files Modified
|
9914f12 to
fac0d29
Compare
Add swarmModel field to BaseAgentSettingsSchema and SpinAgentSettingsSchema, extending the swarm model fallback chain with two new priorities: - Per-agent swarmModel (priority 2) between swarm-specific override and blanket worker model - spin.swarmModel (priority 4) between blanket worker model and built-in defaults Also updates worker agent frontmatter to fall back to spin.swarmModel. Includes 8 new tests covering all fallback priority combinations. Fixes #735
…des. Fixes #735 - Remove complex nested agents.iloom-swarm-worker.agents structure and blanket swarm worker model fallback chain - Make spin.swarmModel apply only to spin orchestrator, not phase agents - Add mode parameter to SettingsManager.getSpinModel() for swarm-specific model selection - Update SwarmSetupService to use simplified per-agent swarmModel overrides - Clarify documentation on spin.swarmModel vs per-agent swarmModel behavior - Remove obsolete tests for removed fallback chain patterns
fac0d29 to
f0678c1
Compare
iloom Session SummaryKey Themes:
Session Details (click to expand)Key Insights
Decisions Made
Challenges Resolved
Lessons Learned
Generated with 🤖❤️ by iloom.ai |
Fixes #735
Add swarmModel field to per-agent settings and workerModel to spin config
Problem
Configuring swarm-specific models for individual phase agents currently requires a verbose nested structure under
agents.iloom-swarm-worker.agents:{ "agents": { "iloom-swarm-worker": { "model": "sonnet", "agents": { "iloom-issue-implementer": { "model": "sonnet" }, "iloom-issue-complexity-evaluator": { "model": "haiku" } } } } }This is awkward because:
Proposed Solution
1. Add `swarmModel` to `BaseAgentSettingsSchema`
Allow each agent to declare its own swarm-specific model directly:
```json
{
"agents": {
"iloom-issue-implementer": {
"model": "opus",
"swarmModel": "sonnet"
},
"iloom-issue-complexity-evaluator": {
"model": "haiku",
"swarmModel": "haiku"
}
}
}
```
This would insert into the fallback chain in `SwarmSetupService.ts` at a logical priority (e.g., between the existing `agents.iloom-swarm-worker.agents..model` and `agents.iloom-swarm-worker.model` steps):
2. Add `workerModel` to `SpinAgentSettingsSchema`
The spin config controls the orchestrator, but there's no way to set the worker model from the spin config. A `workerModel` field would allow co-locating orchestrator and worker model config:
```json
{
"spin": {
"model": "sonnet",
"workerModel": "sonnet"
}
}
```
This is especially useful for presets, which need to configure both the orchestrator and worker together.
Impact
This PR was created automatically by iloom.