Documentation
¶
Overview ¶
Package task provides task-based model selection for LLM operations.
Core types:
- TaskType: Type of task (investigation, implementation, review, etc.)
- Selector: Selects appropriate model based on task type
Task types:
- TaskInvestigation: Code exploration, impact analysis
- TaskImplementation: Writing code, making changes
- TaskReview: Code review, validation
- TaskArchitecture: Design decisions, high-stakes reasoning
- TaskSimple: Quick searches, formatting
Example usage:
selector := task.NewSelector(task.Config{
Investigation: "claude-opus-4-20250514",
Implementation: "claude-sonnet-4-20250514",
Review: "claude-opus-4-20250514",
Simple: "claude-haiku-3-5-20241022",
})
model := selector.ModelFor(task.TaskReview)
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultModelMap = map[Type]model.ModelName{ Investigate: model.ModelOpus, Architecture: model.ModelOpus, VoteJudge: model.ModelOpus, Implement: model.ModelSonnet, Review: model.ModelSonnet, Validate: model.ModelSonnet, Fix: model.ModelSonnet, Search: model.ModelHaiku, Transform: model.ModelHaiku, Summarize: model.ModelHaiku, }
DefaultModelMap maps task types to default models.
Functions ¶
func NewSelector ¶
func NewSelector(opts ...model.SelectorOption) *model.Selector
NewSelector creates a model selector configured for dev workflow tasks. It uses the standard task-to-tier mapping.
func SelectModel ¶
SelectModel selects the appropriate model for a task type. Uses the default model map unless overridden.
func TierForTask ¶
TierForTask returns the appropriate tier for a task type.
Types ¶
type Type ¶
type Type string
Type represents the type of task an agent is performing. This determines which model tier is appropriate.
const ( // Investigation and architecture - need reasoning Investigate Type = "investigate" Architecture Type = "architecture" VoteJudge Type = "vote_judge" // Standard dev tasks - default tier Implement Type = "implement" Review Type = "review" Validate Type = "validate" Fix Type = "fix" // Fast tasks - can use smaller models Search Type = "search" Transform Type = "transform" Summarize Type = "summarize" )
Click to show internal directories.
Click to hide internal directories.