routing

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModelSelector

type ModelSelector struct{}

func NewModelSelector

func NewModelSelector() *ModelSelector

func (*ModelSelector) GetRationale

func (m *ModelSelector) GetRationale(selectedModel string) string

GetRationale returns the translation key that explains why a model was chosen

func (*ModelSelector) SelectBestModel

func (m *ModelSelector) SelectBestModel(operation string, estimatedTokens int) string

SelectBestModel selects the optimal model based on the operation and token count

Smart Routing Strategy:

  • Small operations (< 1k tokens): Flash-Lite (most economical)
  • Medium operations (1k-10k tokens): Flash (balance cost/quality)
  • Large operations (> 10k tokens): 3.0 Flash (better context, avoids hallucinations)
  • Releases/Issues: 3.0 Flash (maximum writing quality)

SelectBestModel selects the optimal model based on the operation and token count

Jump to

Keyboard shortcuts

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