Before dispatching any request the SDK inspects the target model’s declared capabilities and compares them against what the request actually needs. If the model does not support a required capability — and you have not opted into it viaDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/phpaisdk/core/llms.txt
Use this file to discover all available pages before exploring further.
assume() or allowUnknownCapabilities() — a MissingCapabilityException is raised before any HTTP call is made. This keeps errors fast, local, and descriptive.
The Capability enum
Capability is a pure PHP enum (no backing type). Each case represents one discrete feature a model can advertise.
| Case | Name string | What it means |
|---|---|---|
TextGeneration | text_generation | The model can produce text completions. Required for all Generate::text() calls. |
Streaming | streaming | The model supports token-by-token streaming via ->stream(). |
ToolCalling | tool_calling | The model can invoke structured tools and return tool-call payloads. |
StructuredOutput | structured_output | The model can return output conforming to a JSON schema via ->output(). |
Reasoning | reasoning | The model exposes a reasoning/thinking trace alongside its response. |
ImageGeneration | image_generation | The model can generate images. Required for all Generate::image() calls. |
TextInput | text_input | The model accepts plain text as input content. |
ImageInput | image_input | The model accepts image content parts (also aliased as vision). |
AudioInput | audio_input | The model accepts audio content parts. |
FileInput | file_input | The model accepts arbitrary file content parts. |
Capability::fromName() resolves a snake_case string to a case. The alias 'vision' maps to ImageInput for backwards-compatibility with model catalogs that predate the unified naming scheme.How required capabilities are derived
PendingTextRequest inspects the fully-built request to determine the minimum capability set before it calls ModelResolver::resolve():
TextGenerationis always required.Streamingis appended when you call->stream()instead of->run().StructuredOutputis required when->output()has been set.ToolCallingis required when at least one tool has been registered.Reasoningis required when->reasoning()has been called.TextInput,ImageInput,AudioInput, orFileInputare added based on theContenttypes present in the message array.
Generate::image() always requires ImageGeneration.
Querying a model’s capabilities
Boolean check
Rich capability object
capability() returns a CapabilitySupport value object with additional context:
CapabilitySupport and CapabilitySupportState
CapabilitySupport is an immutable value object produced by the three factory methods below.
CapabilitySupportState is the backing enum with three cases:
| Case | Value | Meaning |
|---|---|---|
Supported | 'supported' | Model natively supports the capability. |
NotSupported | 'not_supported' | Model does not support the capability. |
Adapted | 'adapted' | Capability is emulated by the provider adapter with a specific strategy. |
isSupported() returns true for both Supported and Adapted — the caller does not need to distinguish between native and emulated support unless auditing the strategy.
Listing all capabilities a model exposes
Capability name aliases
Capability name aliases
Capability::fromName() accepts both the canonical snake_case name and the legacy alias 'vision' for ImageInput. All other cases have exactly one canonical name. Provider catalog JSON files should use the canonical names.