Skip to documentation
Documentation navigation

Documentation navigation

Documentation / guides

Capabilities

Gate optional request features with secret-free model capabilities.

developer

Capabilities is local gating and informational metadata. It is never serialized onto the provider wire. A custom model starts with every capability off; options explicitly opt features in.

API surface

type Capabilities struct {
	AcceptsImages             bool
	Tools                     bool
	Thinking                  bool
	StructuredOutput          bool
	StructuredOutputWithTools bool
	PromptCaching             bool
}
CapabilityUsed by
AcceptsImagesRequest validation when any message contains an image, including nested tool-result blocks
ToolsTool request admission and model catalogue metadata
ThinkingExtended-thinking request policy
StructuredOutputOutputSchema admission
StructuredOutputWithToolsStructured output when ordinary tools are also exposed; implies Tools and StructuredOutput
PromptCachingCodec opt-in for explicit cache_control breakpoints
descriptor := model.CustomModel(
	model.ProviderName("acme"), model.APIFormatAnthropic,
	"https://api.example.test", "reasoner",
	model.WithThinking(), model.WithPromptCaching(),
)
if !descriptor.Caps.Thinking {
	panic("the option was not applied")
}

Model.Validate rejects StructuredOutputWithTools unless both prerequisite booleans are true. It does not decide whether a provider really supports a label; that policy belongs to the integration layer.

Proof

Related: Feature validation, Structured output requests.

← back to documentation