models

package
v0.7.39 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 5 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 models exposes the embedded catalog of supported model identifiers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterByProvider

func FilterByProvider(provider string) []string

FilterByProvider returns provider/model pairs for the requested provider.

func HasProvider

func HasProvider(provider string) bool

HasProvider reports whether the provider exists in the catalog.

func List

func List() []string

List returns the supported provider/model pairs in catalog order.

func ProviderOf

func ProviderOf(model string) string

ProviderOf extracts the provider prefix from a provider/model identifier.

func Providers

func Providers() []string

Providers returns the unique provider names in first-seen order.

Types

type Entry

type Entry struct {
	ID                 string `json:"id"`
	InputTokens        int    `json:"input_tokens"`
	OutputTokens       int    `json:"output_tokens"`
	SupportsImageInput bool   `json:"supports_image_input"`
	// InputCostPerMTok and OutputCostPerMTok are the model's USD price per
	// million input and output tokens, when known.
	InputCostPerMTok  float64 `json:"input_cost_per_mtok,omitempty"`
	OutputCostPerMTok float64 `json:"output_cost_per_mtok,omitempty"`
}

Entry describes a supported API model and its key token/modal capability limits.

func Entries

func Entries() []Entry

Entries returns the structured model catalog in catalog order.

func EntriesByProvider

func EntriesByProvider(provider string) []Entry

EntriesByProvider returns structured catalog entries for the requested provider.

func Lookup

func Lookup(id string) (Entry, bool)

Lookup returns the model entry for the provided model identifier.

Jump to

Keyboard shortcuts

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