modelsdev

package
v2026.1116.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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