Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix(cos): respect provider defaultModel for standard tasks
Adam Eivy1d0a28e816db
diff --git a/.changelog/v0.9.x.md b/.changelog/v0.9.x.mdindex 33baf28517..365543fbe4 100644--- a/.changelog/v0.9.x.md+++ b/.changelog/v0.9.x.md@@ -99,6 +99,13 @@## 🐛 Bug Fixes+### Chief of Staff - Model Selection+- **Fixed default model selection to respect provider's defaultModel**: Standard tasks now use the provider's configured default model instead of always using the medium tier model+ - Changed `selectModelForTask()` to return `provider.defaultModel` for standard tasks instead of `provider.mediumModel`+ - Updated fallback logic to handle 'default' tier in addition to 'heavy', 'medium', and 'light'+ - This ensures that when a provider (like claude-code) has Opus set as the defaultModel, tasks without explicit model specifications will use Opus instead of Sonnet+ - Task-specific model selection (heavy for complex tasks, light for documentation) continues to work as before+### Chief of Staff - Multi-Provider CLI Support- **Fixed Codex CLI provider support**: Agent spawner was hardcoded to use Claude CLI arguments regardless of selected provider- Added `buildCliSpawnConfig()` function for provider-specific CLI invocationdiff --git a/server/services/subAgentSpawner.js b/server/services/subAgentSpawner.jsindex 37a9ff4bf5..5bbe4ea0cb 100644--- a/server/services/subAgentSpawner.js+++ b/server/services/subAgentSpawner.js@@ -128,8 +128,8 @@ async function selectModelForTask(task, provider) {};}- // Standard tasks → sonnet/medium (default)- return { model: provider.mediumModel || provider.defaultModel, tier: 'medium', reason: 'standard-task' };+ // Standard tasks → use provider's default model+ return { model: provider.defaultModel, tier: 'default', reason: 'standard-task' };}/**@@ -727,7 +727,8 @@ export async function spawnAgentForTask(task) {// Fall back to the appropriate tier model for this providerselectedModel = modelSelection.tier === 'heavy' ? provider.heavyModel :modelSelection.tier === 'light' ? provider.lightModel :- provider.mediumModel || provider.defaultModel;+ modelSelection.tier === 'medium' ? provider.mediumModel :+ provider.defaultModel;}}