Documentation
¶
Index ¶
- type FastmodeConfig
- type FastmodeManager
- func (m *FastmodeManager) Config() FastmodeConfig
- func (m *FastmodeManager) IsEnabled() bool
- func (m *FastmodeManager) MaxTokensFor(task TaskType) int
- func (m *FastmodeManager) SelectModel(task TaskType, primary types.ModelIdentifier) types.ModelIdentifier
- func (m *FastmodeManager) SetEnabled(enabled bool)
- type TaskType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FastmodeConfig ¶
type FastmodeConfig struct {
// Enabled toggles fastmode model substitution globally.
Enabled bool
// FastModel is the model identifier to use for quick operations.
// Defaults to claude-haiku-4-5-20251001 on the Anthropic provider.
FastModel types.ModelIdentifier
// MaxTokens caps output for fastmode calls to keep them cheap.
MaxTokens int
}
FastmodeConfig controls which model is used for low-latency background tasks (e.g. classifier calls, quick tool results) versus the primary model used for the main conversation loop.
func DefaultFastmodeConfig ¶
func DefaultFastmodeConfig() *FastmodeConfig
DefaultFastmodeConfig returns a sensible default configuration. The fast model can be overridden via SESHAT_FAST_MODEL env var (format: "provider:model").
type FastmodeManager ¶
type FastmodeManager struct {
// contains filtered or unexported fields
}
FastmodeManager applies the fastmode config to model selection decisions. It is safe for concurrent use.
func NewFastmodeManager ¶
func NewFastmodeManager(cfg *FastmodeConfig) *FastmodeManager
NewFastmodeManager creates a manager with the given config. Pass nil to use DefaultFastmodeConfig.
func (*FastmodeManager) Config ¶
func (m *FastmodeManager) Config() FastmodeConfig
Config returns a copy of the current configuration.
func (*FastmodeManager) IsEnabled ¶
func (m *FastmodeManager) IsEnabled() bool
IsEnabled reports whether fastmode is active.
func (*FastmodeManager) MaxTokensFor ¶
func (m *FastmodeManager) MaxTokensFor(task TaskType) int
MaxTokensFor returns the token cap to use for the given task. For main tasks zero is returned (meaning: use the caller's default).
func (*FastmodeManager) SelectModel ¶
func (m *FastmodeManager) SelectModel(task TaskType, primary types.ModelIdentifier) types.ModelIdentifier
SelectModel returns the model that should be used for the given task type and primary model. For TaskTypeMain, or when fastmode is disabled, the primary model is returned unchanged.
func (*FastmodeManager) SetEnabled ¶
func (m *FastmodeManager) SetEnabled(enabled bool)
SetEnabled toggles fastmode at runtime without replacing the config.
type TaskType ¶
type TaskType string
TaskType classifies the urgency/cost profile of a task so the manager can decide whether the fast model is appropriate.
const ( // TaskTypeClassifier is used for auto-mode permission classification calls. TaskTypeClassifier TaskType = "classifier" // TaskTypeQuick is used for short, latency-sensitive tool calls. TaskTypeQuick TaskType = "quick" // TaskTypeMain is used for the primary conversation turn — never substituted. TaskTypeMain TaskType = "main" )