Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/phpaisdk/google/llms.txt

Use this file to discover all available pages before exploring further.

Each model entry in resources/models.json declares a list of capability strings that the SDK uses for two purposes: validating that a request feature is supported before sending it to the API, and answering runtime queries via ->supports(Capability::X) or ->capability(Capability::X). The capability constants live in the core AiSdk\Capability enum and are resolved against each model’s catalog entry.

Capability Reference

Capability stringConstantDescription
text_generationCapability::TextGenerationThe model can produce text output. All Gemini models in the catalog carry this capability.
streamingCapability::StreamingSupports Server-Sent Events (SSE) streaming via the ?alt=sse endpoint.
tool_callingCapability::ToolCallingSupports function calling — the model can invoke tools you register with a request.
structured_outputCapability::StructuredOutputReturns JSON validated against a response_schema you provide.
reasoningCapability::ReasoningExtended thinking / thinking tokens. Currently limited to gemini-3* and gemini-2.5*.
text_inputCapability::TextInputAccepts plain text in message content parts.
image_inputCapability::ImageInputAccepts image content parts (inline base64 or file references).
audio_inputCapability::AudioInputAccepts audio content parts.
file_inputCapability::FileInputAccepts document and file content parts uploaded via the Files API.
image_generationCapability::ImageGenerationCan generate image output — exclusive to the dedicated image models.

Checking Capabilities at Runtime

Both GoogleTextModel and GoogleImageModel implement ->supports(Capability) and ->capability(Capability). Use supports() for a quick boolean check, or capability() when you need the full CapabilitySupport object (which also carries a source label).
use AiSdk\Capability;
use AiSdk\Google;

Google::create(['apiKey' => 'your-api-key']);

// Boolean check — returns true for gemini-3* (matches gemini-3.5-flash)
$supportsReasoning = Google::model('gemini-3.5-flash')->supports(Capability::Reasoning);
// => true

// Full CapabilitySupport object
$support = Google::model('gemini-3.5-flash')->capability(Capability::Reasoning);
$support->isSupported(); // => true
use AiSdk\Capability;
use AiSdk\Google;

Google::create(['apiKey' => 'your-api-key']);

// Image model capability check
$supportsImageGen = Google::image('gemini-3.1-flash-image')->supports(Capability::ImageGeneration);
// => true

$supportsReasoning = Google::image('gemini-3.1-flash-image')->supports(Capability::Reasoning);
// => false

Unknown Model Fallback

If you pass a model ID that does not match any wildcard or exact entry in the catalog, GoogleTextModel::capability() applies a safe fallback specifically for TextGeneration. Rather than returning “not supported”, the SDK returns CapabilitySupport::supported($capability, 'unknown-model-fallback'), keeping your application functional while signalling that the model was not found in the catalog. This logic lives in GoogleTextModel:
$support = $this->catalog()->capability($this->modelId, $capability);
if (! $support->isSupported()
    && $capability === Capability::TextGeneration
    && $this->catalog()->capabilities($this->modelId) === []) {
    return CapabilitySupport::supported($capability, 'unknown-model-fallback');
}

return $support;
All other capabilities (streaming, tool calling, reasoning, etc.) return “not supported” for unknown model IDs. GoogleImageModel does not apply this fallback — image models must be present in the catalog.
If you need capabilities for models outside the built-in catalog — for example, a private fine-tuned endpoint — you can supply a custom ModelRegistry when constructing GoogleTextModel or GoogleImageModel directly. A registry entry overrides catalog resolution and lets you declare exactly which capabilities your custom model supports.
Return to the Models Overview to see which capability flags each Gemini family carries, and which image models are stable vs legacy.

Build docs developers (and LLMs) love