matcher

package
v0.2.42 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Candidate

type Candidate struct {
	ID           string
	Intelligence float64
	Speed        float64
	// Cost is a relative cost metric derived from pricing (higher means
	// more expensive). When zero, cost information is either unknown or
	// intentionally omitted.
	Cost float64
	// BaseModel is the model name without provider prefix and version suffix.
	BaseModel string
	// Version carries a parsed version token (e.g., date or semver-ish) for tie-breaking.
	Version string
}

Candidate represents a model scored along multiple dimensions.

type Matcher

type Matcher struct {
	// contains filtered or unexported fields
}

Matcher holds a snapshot of all candidates and can pick the best one for given preferences.

func New

func New(c []Candidate) *Matcher

New builds a matcher from supplied candidates.

func (*Matcher) Best

func (m *Matcher) Best(p *llm.ModelPreferences) string

Best returns ID of the highest-ranked candidate or "" when none.

Jump to

Keyboard shortcuts

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