Documentation
¶
Overview ¶
Package routing resolves which model serves each role and task: the main agent, the delegated children (delegate subagents and workers) and, later, auxiliary helper calls. With no models: section and no routing flags every task resolves to the main model.
Index ¶
Constants ¶
const ( RoleMain = "main" RoleDelegated = "delegated" RoleAuxiliary = "auxiliary" )
Roles.
const ( TaskMain = "main" TaskDelegate = "delegate" TaskWorker = "worker" TaskCompaction = "compaction" TaskReview = "review" )
Tasks.
const SourceMain = "main model"
SourceMain is the Source of a task that falls back to the main model.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Route ¶
type Route struct {
Role string `json:"role"`
Task string `json:"task"`
Model string `json:"model"`
Source string `json:"source"` // the flag or config key that chose Model, or SourceMain
// Fallbacks is the role's fallback chain for Model (models.<role>.
// fallback_models), empty with --no-fallback.
Fallbacks []string `json:"fallback_models,omitempty"`
}
Route is the resolved model of one task.
func Auxiliary ¶
func Auxiliary(cfg config.AgentConfig, main, task string) Route
Auxiliary resolves an auxiliary task (TaskCompaction or TaskReview): --route <task>=, then models.auxiliary.tasks.<task>, then --aux-model, then models.auxiliary.model, then the main model.
func Delegated ¶
func Delegated(cfg config.AgentConfig, main, task string) Route
Delegated resolves a delegated task (TaskDelegate or TaskWorker): --route <task>=, then the task override (models.delegated.tasks.<task>, or its alias subagents.model / subagents.workers.model), then --delegate-model, then the role default models.delegated.model, then the main model.