diff --git a/cmd/picoclaw/internal/agent/helpers.go b/cmd/picoclaw/internal/agent/helpers.go index 746e9755e..8d4422b9f 100644 --- a/cmd/picoclaw/internal/agent/helpers.go +++ b/cmd/picoclaw/internal/agent/helpers.go @@ -42,10 +42,9 @@ func agentCmd(message, sessionKey, model string, debug bool) error { return fmt.Errorf("error creating provider: %w", err) } - // Use the resolved model ID from provider creation - if modelID != "" { - cfg.Agents.Defaults.ModelName = modelID - } + // Don't overwrite ModelName with modelID - modelID is just the protocol-stripped + // model identifier, but ModelName should remain as the model_list entry name + // for proper fallback resolution. msgBus := bus.NewMessageBus() agentLoop := agent.NewAgentLoop(cfg, msgBus, provider) diff --git a/cmd/picoclaw/internal/gateway/helpers.go b/cmd/picoclaw/internal/gateway/helpers.go index a06625dc9..be191d13c 100644 --- a/cmd/picoclaw/internal/gateway/helpers.go +++ b/cmd/picoclaw/internal/gateway/helpers.go @@ -43,10 +43,9 @@ func gatewayCmd(debug bool) error { return fmt.Errorf("error creating provider: %w", err) } - // Use the resolved model ID from provider creation - if modelID != "" { - cfg.Agents.Defaults.ModelName = modelID - } + // Don't overwrite ModelName with modelID - modelID is just the protocol-stripped + // model identifier, but ModelName should remain as the model_list entry name + // for proper fallback resolution. msgBus := bus.NewMessageBus() agentLoop := agent.NewAgentLoop(cfg, msgBus, provider)