Download the PHP package aisdk/mistral without Composer
On this page you can find all versions of the php package aisdk/mistral. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aisdk/mistral
More information about aisdk/mistral
Files in aisdk/mistral
Package mistral
Short Description Official Mistral provider for the PHP AI SDK.
License MIT
Homepage https://github.com/phpaisdk/mistral
Informations about the package mistral
aisdk/mistral
Official Mistral provider for the PHP AI SDK. Uses Mistral's OpenAI-compatible Chat Completions API and embeddings endpoint.
Installation
Basic Usage
Default model shorthand:
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
MISTRAL_API_KEY |
API key for authentication | Required |
MISTRAL_BASE_URL |
Base URL for API requests | https://api.mistral.ai/v1 |
Programmatic Configuration
Supported Capabilities
| Capability | Support |
|---|---|
| Text generation | Native |
| Streaming | Native |
| Tool calling | Native |
| Structured output | Adapted (json_object + instruction); exact native support can be declared at runtime |
| Embeddings | Native |
| Text input | Native |
| Image input | Supported by the adapter; the selected model is validated by Mistral |
Streaming
Embeddings
Mistral's embedding request schema does not expose a dimensions field, so this adapter rejects the portable dimensions() option before sending a request.
Structured Output
Without an exact runtime capability override, the provider adapter degrades json_schema to json_object with an injected JSON instruction:
Models with native json_schema support (openai/gpt-oss-20b, openai/gpt-oss-120b, moonshotai/kimi*) use the native format directly.
Tools
Model IDs and Capabilities
Mistral model IDs pass through unchanged and do not need to be registered. The package does not ship a model inventory; the Mistral API remains the authority on whether a particular model accepts a requested feature.
Capabilities describe what the Mistral adapter can serialize. The Mistral API returns a normalized SDK exception if the selected model or requested feature is rejected.
Provider-Specific Options
Raw provider options can be passed as an escape hatch:
Testing
Documentation
Community
- Contributing
- Support
- For private security reports, email [email protected].