task

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2025 License: MIT Imports: 1 Imported by: 0

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

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

func SelectModel(t Type) model.ModelName

SelectModel selects the appropriate model for a task type. Uses the default model map unless overridden.

func TierForTask

func TierForTask(t Type) model.Tier

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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL