Documentation
¶
Overview ¶
Package capabilities derives model reasoning capabilities (thinking mode and effort tiers) from the LiteLLM model registry. It is a BUILD-TIME helper used by cmd/synccaps to enrich the hand-maintained conf/providers templates; it is not wired into the runtime server (the runtime reads capabilities straight from the provider templates).
Matching is intentionally LIGHT: model identifiers enumerated in the official provider templates are already canonical (e.g. "claude-opus-4-6", "gpt-5.4", "grok-4"), so a canonical-equality match against the registry is enough. We deliberately avoid token-subset / version-veto fuzzing: a canonical miss simply falls back to the template's own legacy toggle default, which is safer than borrowing a sibling/repackaged entry's capabilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities struct {
// ThinkingMode is "", toggle, adaptive, or none. "" = unknown.
ThinkingMode string
// EffortLevels is the ordered effort tier list, or nil if unknown.
EffortLevels []string
// Vision / ToolCall / FileInput are nil when the registry is silent.
Vision *bool
ToolCall *bool
// FileInput mirrors supports_pdf_input: the provider API accepts documents
// (PDF) as native input parts.
FileInput *bool
// ContextWindow is nil when unknown.
ContextWindow *int
}
Capabilities is the fill payload derived from a registry entry. A zero/empty field means "registry did not provide this"; callers must only fill missing upstream values and never override explicit ones.
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver resolves model capabilities from a LiteLLM registry snapshot. It is a BUILD-TIME helper (used by cmd/synccaps) and is not part of the runtime path.
func NewResolver ¶
NewResolver parses a LiteLLM registry JSON body, prunes third-party reseller shells, and builds the lookup index.