modelsdev

package
v2026.909.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package modelsdev reads the public models.dev catalog used to enrich model selectors with provider-specific capabilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog map[string]Provider

func Load

func Load(ctx context.Context) (Catalog, error)

Load returns a cached catalog when available. The first caller downloads the public catalog; concurrent callers share that request.

func (Catalog) Lookup

func (c Catalog) Lookup(providerName, baseURL, modelID string) (Model, bool)

Lookup finds the exact model as served by a configured provider. It does not fall back to another provider because limits and supported input can differ.

type Model

type Model struct {
	ID         string `json:"id"`
	Modalities struct {
		Input []string `json:"input"`
	} `json:"modalities"`
	Limit struct {
		Context int `json:"context"`
		Output  int `json:"output"`
	} `json:"limit"`
}

type Provider

type Provider struct {
	API    string           `json:"api"`
	ID     string           `json:"id"`
	Models map[string]Model `json:"models"`
	Name   string           `json:"name"`
}

Jump to

Keyboard shortcuts

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