routing

package
v0.101.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatalogModels

func CatalogModels(infos []ai.ModelInfo) []config.ModelInfoLite

func ClientForProvider

func ClientForProvider(prov config.Provider, name string, maxRetries int) (ai.Client, error)

func ClientForProviderOptional

func ClientForProviderOptional(prov config.Provider, name string, maxRetries int) (ai.Client, error)

func DefaultEffortFor

func DefaultEffortFor(catalogs map[string]config.Catalog, provName, modelID, pinned string) string

func RefreshCatalogs

func RefreshCatalogs(cfg *config.Config, force bool) map[string]config.Catalog

func ResolveWithRefresh

func ResolveWithRefresh(cfg *config.Config, modelName, provName string) (config.Provider, config.Model, string, error)

func ResolvedProvider

func ResolvedProvider(cfg *config.Config, model, prov string) string

func SelectionNames

func SelectionNames(cfg *config.Config, mdl config.Model, modelName, provName string) (string, string)

func SubModelFor

func SubModelFor(cfg *config.Config, model, provider string) (agent.SubModel, error)

func TaskDefaultFor

func TaskDefaultFor(cfg *config.Config, provider string) (agent.SubModel, error)

func TokenLimits

func TokenLimits(mdl config.Model, cat config.Catalog, apiID string) (contextLimit, maxOut int)

Types

type Route

type Route struct {
	ModelName    string
	ProviderName string
	Provider     config.Provider
	Model        config.Model
	APIModel     string
	Client       ai.Client
	ContextLimit int
	MaxOutput    int
}

func ResolveRoute

func ResolveRoute(cfg *config.Config, modelName, providerName string, optional bool) (Route, error)

func (Route) Configured

func (r Route) Configured() bool

Jump to

Keyboard shortcuts

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