modelsdev

package
v0.2.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(baseURL string) *Client

func (*Client) ListModels

func (c *Client) ListModels(ctx context.Context) ([]Model, error)

ListModels fetches the full models.dev catalog and flattens it into a provider-keyed list of native models. Entries are returned sorted by provider code then slug to keep sync output deterministic.

type Model

type Model struct {
	ProviderCode  string
	Slug          string
	ExternalID    string
	DisplayName   string
	ContextWindow int
	MaxOutput     int
	InputPrice    string
	OutputPrice   string
}

Model is a provider-native model entry as published by models.dev. Slug is the exact identifier the provider's own API accepts (no OpenRouter-style prefix), and ProviderCode is the models.dev provider key (e.g. "google-vertex").

Jump to

Keyboard shortcuts

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