modelsdev

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAPIURL = "https://models.dev/api.json"
)

Variables

This section is empty.

Functions

func CacheStale

func CacheStale() bool

CacheStale returns true if the cache is missing or older than 24h.

func FetchOverrides

func FetchOverrides(ctx context.Context) (map[string]sdk.ModelOverride, error)

FetchOverrides fetches the models.dev API and returns a map of overrides keyed by "provider/id" (lowercased). The host uses these to regenerate models.yaml from its embedded curated list, preserving cost and metadata.

func Refresh

func Refresh(ctx context.Context, ext *sdk.Extension) (int, error)

Refresh fetches API data and writes models.yaml via the host RPC, preserving cost data and metadata from the embedded curated list.

func Register

func Register(e *sdk.Extension)

Register registers the modelsdev extension's OnInit handler and commands.

Types

This section is empty.

Directories

Path Synopsis
Modelsdev extension binary.
Modelsdev extension binary.

Jump to

Keyboard shortcuts

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