Documentation
¶
Overview ¶
Package models is the built-in model catalog. A model has a lab (who made it) and a provider (which kind of maitake account serves it); with custom sources these can differ.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var LabForProvider = map[string]string{"claude": "anthropic", "codex": "openai"}
LabForProvider is the lab whose models a built-in provider serves.
var Labs = []Lab{
{ID: "anthropic", Name: "Anthropic"},
{ID: "openai", Name: "OpenAI"},
}
var ProviderForLab = map[string]string{"anthropic": "claude", "openai": "codex"}
ProviderForLab is the reverse of LabForProvider.
Functions ¶
func Allowed ¶
Allowed reports whether a model passes a key's allow-list; an empty list allows everything.
func DisplayName ¶
DisplayName turns an ID like "claude-opus-4-5-20251101" into "Claude Opus 4.5".
func GuessProvider ¶
GuessProvider routes unknown model IDs by family so new upstream models work immediately.
func Match ¶
Match reports whether a glob pattern matches a model, checked against both its bare and canonical names ("claude-*" and "anthropic/*" both match claude-opus-5).
func SplitEffort ¶
SplitEffort separates an optional "(effort)" suffix: "gpt-5.5(high)" → "gpt-5.5", "high".
Types ¶
type Model ¶
type Model struct {
// ID is the name the upstream expects, e.g. "claude-opus-5".
ID string `json:"id"`
// Canonical is "lab/id", the OpenRouter-style name.
Canonical string `json:"canonical"`
Lab string `json:"lab"`
Provider string `json:"provider"`
Name string `json:"name"`
ContextLength int `json:"contextLength"`
MaxOutput int `json:"maxOutput"`
// Efforts are the reasoning levels the model accepts; empty when unknown or budget-only.
Efforts []string `json:"efforts,omitempty"`
Custom bool `json:"custom"`
}