Documentation
¶
Overview ¶
Package models provides a catalog of known Claude models and their capabilities. It is the source of truth for model metadata within the SDK.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Capabilities ¶
Capabilities is a convenience function that returns capability strings for the given model ID. Returns nil if the model is not found.
Types ¶
type Capability ¶
type Capability string
Capability represents a model capability such as vision or tool use.
const ( // CapVision indicates the model supports image/vision inputs. CapVision Capability = "vision" // CapToolUse indicates the model supports tool/function calling. CapToolUse Capability = "tool-use" // CapReasoning indicates the model supports extended reasoning. CapReasoning Capability = "reasoning" // CapStructuredOutput indicates the model supports structured JSON output. CapStructuredOutput Capability = "structured-output" )
type Model ¶
type Model struct {
// ID is the API model identifier (e.g. "claude-opus-4-6").
ID string
// Name is the human-readable display name.
Name string
// Aliases are shorthand names accepted by the CLI (e.g. "opus").
Aliases []string
// CostTier is the relative cost tier for this model.
CostTier CostTier
// Capabilities lists what the model supports.
Capabilities []Capability
// ContextWindow is the default context window size in tokens.
ContextWindow int
// MaxOutputTokens is the maximum number of output tokens.
MaxOutputTokens int
}
Model holds metadata for a single Claude model.
func ByCostTier ¶
ByCostTier returns all models matching the given cost tier.
func ByID ¶
ByID looks up a model by its identifier. It checks in order:
- Exact match on ID
- Alias match
- Prefix match (for dated model IDs like "claude-opus-4-6-20260205")
Returns nil if no model is found.
func (Model) CapabilityStrings ¶
CapabilityStrings returns capabilities as a string slice for interop with string-based systems.
func (Model) HasCapability ¶
func (m Model) HasCapability(capability Capability) bool
HasCapability reports whether the model supports the given capability.