refactor!: remove hardcoded default models, require explicit config

REMOVED all hardcoded default backend/model values from defaultModelsConfig.
Now ~/.codeagent/models.json is REQUIRED - missing config returns clear error
with example configuration.

BREAKING CHANGE: Users must configure ~/.codeagent/models.json before using
--agent or parallel tasks with agent: field.

Generated with SWE-Agent.ai

Co-Authored-By: SWE-Agent.ai <noreply@swe-agent.ai>
This commit is contained in:
cexll
2026-01-26 17:47:21 +08:00
parent 3d76d46336
commit e9a8013c6f
9 changed files with 273 additions and 147 deletions

View File

@@ -254,7 +254,11 @@ func buildSingleConfig(cmd *cobra.Command, args []string, rawArgv []string, opts
var resolvedBackend, resolvedModel, resolvedPromptFile, resolvedReasoning string
if agentName != "" {
var resolvedYolo bool
resolvedBackend, resolvedModel, resolvedPromptFile, resolvedReasoning, _, _, resolvedYolo = config.ResolveAgentConfig(agentName)
var err error
resolvedBackend, resolvedModel, resolvedPromptFile, resolvedReasoning, _, _, resolvedYolo, err = config.ResolveAgentConfig(agentName)
if err != nil {
return nil, fmt.Errorf("failed to resolve agent %q: %w", agentName, err)
}
yolo = resolvedYolo
}