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 Info ¶ added in v0.0.2
type Info struct {
ID string `json:"id"`
Model string `json:"model"`
DisplayName string `json:"displayName"`
Description string `json:"description"`
IsDefault bool `json:"isDefault"`
Hidden bool `json:"hidden"`
DefaultReasoningEffort string `json:"defaultReasoningEffort"`
SupportedReasoningEfforts []ReasoningEffortOption `json:"supportedReasoningEfforts"`
InputModalities []string `json:"inputModalities"`
SupportsPersonality bool `json:"supportsPersonality"`
Metadata map[string]any `json:"metadata,omitempty"`
}
Info describes a Claude model in a Codex-like model listing payload.
type ListResponse ¶ added in v0.0.2
type ListResponse struct {
Models []Info `json:"models"`
Metadata map[string]any `json:"metadata,omitempty"`
}
ListResponse is the static response payload backing ListModels.
func Response ¶ added in v0.0.2
func Response() ListResponse
Response returns the full static model list response payload.
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
// 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 All ¶
func All() []Model
All returns a copy of every known model in the static catalog. This is not a live account-specific list from the Claude CLI.
func ByCostTier ¶
ByCostTier returns all models matching the given cost tier.
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.
type ReasoningEffortOption ¶ added in v0.0.2
type ReasoningEffortOption struct {
Value string `json:"reasoningEffort"`
Label string `json:"description"`
}
ReasoningEffortOption describes a selectable reasoning effort level.