modelresolve

package
v0.66.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package modelresolve owns the one effective-model merge used by the control plane and runtime snapshot. Catalog data is a lower layer, fetched IDs add discovery, and sparse provider overrides win field by field.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RuntimeCost

func RuntimeCost(c config.ProviderModelCost) ai.ModelCost

RuntimeCost materializes omitted config rates into a runtime cost. In particular, an omitted reasoning rate inherits output while an explicit zero remains free.

Types

type Result

type Result struct {
	Model    config.ProviderModel
	Source   string
	Override *config.ProviderModelOverride
	Catalog  *modelcatalog.Model
	Found    bool
}

func Resolve

func Resolve(provider config.Provider, modelID string, fetched bool, catalog *modelcatalog.Catalog) Result

Resolve merges catalog metadata, fetched discovery, and a provider override. The fetched layer currently carries IDs only, so it contributes discovery and enabled defaults while catalog metadata remains the value source.

Jump to

Keyboard shortcuts

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