NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1076 most downloaded on Packagist
PHP library for interacting with AI platform provider.
Latest stable
v0.15.0
Last release 27 days ago
26 Oct 2026
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 17 of 17 stable releases
Nothing withdrawn
no release was ever pulled
11 months old
18 releases · first in 2025
Drag across the ruler to compare, or tap a release to open it.
minor #2823 Prep Release v1.0-BETA1 (@chr-hertel)
Changelog (https://github.com/symfony/ai-platform/compare/v0.15.0...v1.0.0-BETA1)
MessageBag::latestAs() (@chr-hertel)model_catalog platform option with custom service, models, API catalog and cache (@chr-hertel)symfony/polyfill-php85 for array_first() (@chr-hertel)CachedModelCatalog and smoother model catalog DX (@chr-hertel)feature #2745 Resolve models from the Hub API with a model class per task (@chr-hertel)
Changelog (https://github.com/symfony/ai-platform/compare/v0.14.1...v0.15.0)
asObject() for static analysis (@chr-hertel)Your coding agent can read these notes before it upgrades. Set up the MCP server →
Test\InMemoryPlatform in favor of Test\MockPlatformFactory::createPlatform()DeferredResult::asObject(), asserting the structured output is an instance of that class and letting static analysis infer it as the return typeException\RetryableExceptionInterface, implemented by ServerException and RateLimitExceededException, so a consumer wiring platform calls into a queue with a retry policy can tell a transient failure from a permanent one without enumerating every exception class itselfPlatformOptions::MAX_OUTPUT_TOKENS, a canonical output token limit that the Anthropic, Bedrock (Claude and Nova), Gemini, Vertex AI, Mistral and generic completions bridges translate to their own field; an explicit provider-specific limit like max_tokens still wins, and Claude now sets its default of 1000 tokens through the canonical optionbug #2612 Keep TraceablePlatform stream cache across reset() (@chr-hertel)
Changelog (https://github.com/symfony/ai-platform/compare/v0.14.0...v0.14.1)
bug #2593 Honor non-promoted constructor defaults in JSON Schema (@ineersa, @chr-hertel)
Changelog (https://github.com/symfony/ai-platform/compare/v0.13.0...v0.14.0)
Eden AI gateway (@welcoMattic)Venice support (@Guikingone, @chr-hertel)Together platform bridge (@Guikingone)Result\BatchResult, Result\BatchItem and Result\BatchItemCase, the outcome of a batch of requests as one item per request, reached through DeferredResult::asBatch(); a successful item carries the ordinary result its request would have produced synchronously, and one without a result states whether it errored or was never sent because the batch was canceled or expiredCapability::REALTIME_SESSION and Result\RealtimeSessionResult for long-lived realtime sessions (ephemeral client credentials for WebRTC/WebSocket voice agents)server_tools option to the Anthropic ModelClient, mapping web_search and code_execution to their versioned Anthropic tool spec, mirroring the Gemini and Vertex AI bridges' name-to-params map shape; unmapped tool names throw instead of being silently forwarded, and the raw tools option remains the escape hatch for anything not mapped. The Anthropic ResultConverter now merges the server_tool_use/web_search_tool_result pair of a web search into a single Result\WebSearchResult carrying query, id and status, instead of dropping the blocks (or throwing when a response carries only web-search blocks)Result\Stream\Delta\WebSearchComplete, emitted once per provider-hosted web search, so a streamed turn carries its searches into Result\Stream\AssistantMessageStreamListener and replays them like a buffered oneTokenUsage\TokenUsageInterface::getModel(), reporting the model a provider says consumed the tokens, so a run mixing models (a chat model and an embeddings one, say) can be priced per call; TokenUsageAggregation::getModel() answers only when every usage it sums up agrees on a model, and null otherwise. Test\Recording\ResultSerializer records and replays it alongside the token counts, and a cassette recorded before the field existed still replaysResultConvertedEvent and ResultErrorEvent, so listeners can attribute a resolved result to the provider that produced it (e.g. to release held capacity)Stopwatch to TraceablePlatform, timing each invocation until its result is converted or its stream is consumedTest\Replay\BodyRedactor and redact recorded request bodies in HttpCassette by default; replay verification retries against the redacted body, so a cassette recorded before redaction keeps replayingResult\JobResult, whose Job\JobHandle is serializable and can be resolved in another process through the job client of the bridge that started it, which creates the handle including the provider name. The handle also states how long that kind of job may take (getMaxDuration()) and how often it is worth asking about it (getPollInterval()), so a Job\JobRunner waits at the right cadence without the caller knowing the provider; a runner or a single wait() call can overrule both, and cap the whole wait to a number of requests with maxPollsbug #2465 Fix structured output arrays, CLI errors and stream deltas (@chr-hertel)
Changelog (https://github.com/symfony/ai-platform/compare/v0.12.0...v0.13.0)
CustomToolCallResult for custom_tool_call items (@valtzu)ListenerInterface::onError() and Result\Stream\ErrorEvent, dispatched when draining a StreamResult throws, so a listener can finalize on a failed stream where onComplete() never fires; AbstractStreamListener provides a no-op defaultTest\Replay\CassetteHttpClient and Test\Replay\HttpCassette to record real HTTP responses (when the cassette file is missing) and replay them offline through the real bridge pipeline (Contract, ModelClient, ResultConverter) in tests, including raw Server-Sent Event streams; binary response bodies (images, audio, ...) are elided to a metadata stub (content type, byte size) and replayed as a small placeholder bodyTemplateRendererListener now renders templates without template_vars; consequently, an expression referencing an absent variable now throws instead of reaching the normalizer as an empty objectTest\Recording\RecordingProvider (with Cassette/ResultSerializer) to record a real provider's result once (when the cassette file is missing) and replay it offline in tests, preserving the result metadata a provider reports alongside the answer - scalars, null, arrays, FinishReason\FinishReason and token usage - so a replayed result can be asserted on for usage; a metadata value the serializer cannot rebuild throws instead of being dropped silentlyTokenUsage\TokenUsageAggregation::getTokenUsages() to read back the individual usages an aggregation sums upTest\Recording\Cassette with JSON_THROW_ON_ERROR and JSON_PRESERVE_ZERO_FRACTION and check the write, so a result holding a value JSON cannot represent (NAN, INF, invalid UTF-8) raises instead of truncating the cassette and destroying the interactions already recorded in it, and a recorded float with no fractional part no longer replays as an integerTest\Replay\AbstractBridgeReplayTestCase for cassette-driven bridge replay tests, and make the examples/ corpus a record/replay harness: examples/runner --record captures every HTTP interaction of an example into a committed cassette and refreshes the replay goldens, ExamplesReplayTest re-runs each recorded example offline through the full bridge pipeline in CI, without credentials, against those goldensResult\Stream\AssistantMessageStreamListener, which rebuilds the assistant turn - text, thinking blocks with their signatures, tool calls, in provider order - from a streamed responseStreamResult in Message::ofAssistant() and add StreamResult::getAssistantMessage(), so a streamed turn is replayed like a buffered one, draining the stream if the caller has not read itResult\CustomToolCallResult for custom_tool_call output items reported by provider-specific server-side tools (e.g. xAI's x_search), converted the same way as the other built-in tool call results instead of being surfaced as a ToolCall the application is expected to executefeature #2317 Let the model router select the model, not just the provider (@chr-hertel)
Changelog (https://github.com/symfony/ai-platform/compare/v0.11.0...v0.12.0)
ModelRouterInterface::resolve() to accept non-empty-string|Model and return the new ModelRouter\RoutingDecision instead of a ProviderInterface, so a router can select the model - by input, rule set, or cost - and rewrite the invocation options for the selected provider, not only pick the provider serving the request. Platform now routes Model instances through the router and ModelRoutingEvent as well, instead of resolving them on a separate pathModelNotFoundException instead of RuntimeException when a provider has no ModelClient registered for a model, so a routing decision naming a provider that cannot serve the model fails consistently with an unknown model namefeature #2290 Normalize finish_reason metadata across all bridges (@chr-hertel)
Changelog (https://github.com/symfony/ai-platform/compare/v0.10.0...v0.11.0)
response_format option looks like a class, but is not (@lyrixx)MiniMax (@Guikingone)description (@valtzu)$context argument to Contract\JsonSchema\Factory build methods to limit schema to subset of propertiesTool::getMetadata() and Tool::getMetadataValue() to carry arbitrary custom data attached to a toolMessageBag::isLastMessageFrom() to check whether the last message has a given roleMaxOutputTokensException for completed responses truncated by output token limitsweb_search_call, file_search_call, code_interpreter_call, image_generation_call, mcp_call, mcp_list_tools, mcp_approval_request, computer_call, local_shell_call) into typed results instead of skipping them. Adds Result\WebSearchResult, Result\FileSearchResult, Result\McpCallResult, Result\McpListToolsResult, Result\McpApprovalRequestResult, Result\ComputerCallResult, and Result\LocalShellCallResult (code interpreter reuses ExecutableCodeResult/CodeExecutionResult, image generation reuses BinaryResult), plus the matching Message\Content classes so the results round-trip through Message::ofAssistant(). Benefits the OpenAI, Azure OpenAI, and Scaleway bridges.Capability::INPUT_MULTIPLE from all embedding models since every embedding bridge already accepts multiple inputs in a single API callResultConvertedEvent and ResultErrorEvent, dispatched when the deferred result is actually converted (or conversion fails) instead of when the not-yet-resolved ResultEvent fires, so listeners can act on the resolved resultprovider and context arguments to #[Schema] plus SchemaProviderInterface to contribute JSON Schema fragments computed at runtime (env, database, services) for tool parameters and structured output properties; provider accepts any container service ID and context is passed to getSchemaFragment()PartialJsonParser for recovering partial JSON from streaming outputDeferredResult::asPartialJsonStream() yielding the largest recoverable JSON value from each streamed deltaDeferredResult::asStreamedObject(); combining stream: true with response_format: SomeClass::class no longer throws and yields progressively populated typed objects through the new PartialObjectStreamListenerTest\MockPlatformFactory, Test\MockModelClient, Test\MockResultConverter, Test\MockModelCatalog) for any-result-type mocks in tests, complementing Test\InMemoryPlatformToolCallMessage to hold Content\ContentInterface parts (variadic constructor) instead of a single string content, mirroring UserMessage: getContent() now returns Content\ContentInterface[] and asText() returns the flattened text. Message::ofToolCall() accepts strings, \Stringable, and Content\ContentInterface values, upcasting strings to Content\Text. This enables multimodal tool results (e.g. text and images): the Anthropic and Amazon Bedrock (Nova/Converse) bridges render them as tool_result content blocks, the Gemini and Vertex AI bridges attach them as inline_data parts next to the functionResponse, and bridges without multimodal tool-result support degrade to text.ServerException, thrown on transient server errors (HTTP 5xx) by HttpStatusErrorHandlingTrait and the bridge converters so consumers can retry without parsing error messagesCapability::TEXT_TO_SPEECH_ASYNC, Capability::VIDEO_FRAME_TO_FRAME, Capability::VIDEO_WITH_SUBJECT, and Capability::MUSIC casesgpt-image-* models (gpt-image-1, gpt-image-1-mini, gpt-image-1.5, gpt-image-2), routed to the images endpoint by the model catalogimages/edits endpoint: pass the source image as a Content\Image through the image option of Platform::invoke()DallE bridge to Image (Bridge\OpenAi\DallE → Bridge\OpenAi\Image, and the Bridge\OpenAi\DallE\* namespace → Bridge\OpenAi\Image\*) and remove the dall-e-2/dall-e-3 catalog entries retired by OpenAIImageResult, Base64Image, and UrlImage classes of the OpenAI image bridge with the generic Result\BinaryResult (single image) and Result\MultiPartResult (multiple images), matching the other multi-modal bridgesresponse_format option looks like a class, but is notfinish_reason result metadata, exposing why a model stopped generating as a FinishReason\FinishReason object that normalizes the provider value (length, max_tokens, MAX_TOKENS, ...) into a FinishReason\FinishReasonCase while keeping the raw value. Set for buffered and streamed results by the OpenAI, Anthropic, Gemini, VertexAI, Amazon Bedrock, Azure, Ollama, Cohere, Mistral, DeepSeek, Cerebras, Scaleway, Docker Model Runner, Perplexity, MiniMax, amazee.ai and Generic bridgesbug #2170 Parse SSE streams that omit the text/event-stream content type (@fabpot)
Changelog (https://github.com/symfony/ai-platform/compare/v0.9.0...v0.10.0)
RawSseStream to parse Server-Sent Events from backends that omit the text/event-stream content type (used by the OpenResponses bridge for the ChatGPT Codex backend); SseStream now decodes only content-type-advertised SSEIncompleteStreamException, thrown by bridge converters when a stream ends before its terminal eventModelNotFoundException on HTTP 404 responses in the shared HttpStatusErrorHandlingTraitJsonBodyEncodingTrait so model clients can encode JSON request bodies without aborting on malformed UTF-8Model instance to Platform::invoke() (and Provider::invoke()) instead of a model name string, bypassing the model catalog; widen ProviderInterface::supports() to string|Model to route a model instance to the first provider whose model clients accept itMessageBag::prepend() and MessageBag::removeSystemMessage()MessageBag::withoutToolMessages() to strip tool-call messages and tool-call-only assistant messagesfeature #2015 Add tool-call trace metadata for ClaudeCode and Codex bridges (@wachterjohannes)
Changelog (https://github.com/symfony/ai-platform/compare/v0.8.0...v0.9.0)
@var (@HypeMC)ValidatorSubscriber to validate structured output using Symfony ValidatorMessageBagAssistantMessage to hold ContentInterface parts (variadic constructor) instead of a single string content plus separate tool-call/thinking fields. Adds Message\Content\Thinking, Message\Content\ExecutableCode, and Message\Content\CodeExecution content classes, and makes Result\ToolCall implement ContentInterface. Message::ofAssistant() accepts strings, ContentInterface, and ResultInterface values, mapping TextResult/ThinkingResult/ToolCallResult/ExecutableCodeResult/CodeExecutionResult/MultiPartResult to their content equivalents; result types without a known mapping throw InvalidArgumentException so unhandled cases surface instead of being silently dropped.signature field to Message\Content\Text, Result\ToolCall, and Result\TextResult for provider-scoped signatures (currently used by Gemini/Vertex AI for thoughtSignature round-trip).DeferredResult::getResult() so subsequent calls re-throw the cached exception instead of re-running the converterClaudeCode and Codex CLI bridges as ToolCallResult parts of a MultiPartResult, mirroring the inference-API behavior of the Anthropic and Gemini bridgesbug #1982 Align model catalog with official docs (@wachterjohannes)
Changelog (https://github.com/symfony/ai-platform/compare/v0.8.0...v0.8.1)
feature #1968 Expose API errors uniformly across bridges through a shared trait (@Amoifr)
Changelog (https://github.com/symfony/ai-platform/compare/v0.7.0...v0.8.0)
ref to # attribute (@valtzu)MultiPartResult for multi-part responses (@valtzu)MultiPartResult for multi-part results (@valtzu)MultiPartResult (@valtzu)ImageResult::$revisedPrompt to private readonly; use getRevisedPrompt() insteadMultiPartResult for exposing the parts inside a messageExecutableCodeResult, CodeExecutionResult for exposing the executed code blocks and resultsVectorResult, ToolCallResult, RerankingResult, ToolCallComplete, and ImageResult (OpenAI DallE bridge)#[With] attribute to #[Schema] and WithAttributeDescriber to SchemaAttributeDescriberref property to #[Schema] attribute to allow providing schema as fileDiscriminatorMap and DateTimeImmutable for structured output and tool callsContract::create() no longer accepts variadic NormalizerInterface arguments; pass an array insteadpublic array $calls and public \WeakMap $resultCache to private in TraceablePlatform - use getCalls() and getResultCache() insteadProviderInterface and Provider abstraction for inference backends, with Platform becoming a router over one or more providersModelRouterInterface with CatalogBasedModelRouter as default strategy, and CompositeModelCatalog merging provider catalogsModelRoutingEvent dispatched by Platform before resolution, allowing listeners to observe/modify routing or short-circuit it by setting a providerPlatform constructor signature changed from (modelClients, resultConverters, modelCatalog, contract, eventDispatcher) to (providers, modelRouter, eventDispatcher)HttpStatusErrorHandlingTrait and expose API errors (AuthenticationException, BadRequestException, RateLimitExceededException) across the Mistral, DeepSeek, Cerebras, Perplexity, Cohere, Gemini and OpenAI (Embeddings, DallE, TextToSpeech) bridgesfeature #1908 Add model list command and sync catalog with Bedrock API (@chr-hertel)
Changelog (https://github.com/symfony/ai-platform/compare/v0.6.0...v0.7.0)
Speech support (@Guikingone, @chr-hertel)ElevenLabsApiCatalog as ModelCatalog (@Guikingone)# (@valtzu)asFile() method to BinaryResult and DeferredResult (@chr-hertel)ModelCatalog by OllamaApiCatalog (@Guikingone)ResponsesModelClient (@pkothmair)MessageBag handling (@Guikingone)structured_output (@Guikingone)TraceablePlatform profiler decorator moved from AI BundleasFile() method to BinaryResult and DeferredResult for saving binary content to a fileTextDelta, ThinkingDelta, ThinkingStart, ThinkingSignature, ToolCallStart, ToolInputDelta, BinaryDelta, ChoiceDelta, ToolCallComplete, ThinkingComplete) implementing DeltaInterfaceSymfony\AI\Platform\Bridge\Ollama\OllamaMessageChunk; Ollama streams now yield semantic deltas (TextDelta, ThinkingDelta, ToolCallComplete, TokenUsage) like the other bridgesMetadataDelta streaming support and use it for Perplexity citations/search results instead of provider-specific stream delta classes and listenersDeltaInterface from BinaryResult, ChoiceResult, and ToolCallResultUsage and ThinkingContent classes in favor of TokenUsage and ThinkingCompleteDeltaEvent replacing ChunkEvent in ListenerInterfaceRerankingResult, RerankingEntry, and Capability::RERANKINGdescription and example properties to #[With] attributeasTextStream() method to DeferredResult to get a stream of TextDelta objects onlyreasoning_content serialization in shared AssistantMessageNormalizer for OpenAI-compatible endpointsfeature #1644 Add support for prompt caching (@fabpot)
Changelog (https://github.com/symfony/ai-platform/compare/v0.5.0...v0.6.0)
ElevenLabs platform (@Guikingone)ClaudeModelClient (@aszenz)gemini-3.1-pro-preview (@alex-ception)Symfony\AI\Platform\Contract\JsonSchema\Factory constructor signature in order to make schema generation extensiblefeature #1615 Improve support for ScopingHttpClient (@Guikingone)
Changelog (https://github.com/symfony/ai-platform/compare/v0.4.0...v0.5.0)
ScopingHttpClient (@Guikingone)feature #1594 Add bridge (colorfield)
Changelog (https://github.com/symfony/ai-platform/compare/v0.3.3...v0.4.0)
ModelResolver (fabpot)gemini-3-flash-preview (alex-ception)AssistantMessageNormalizer to support tools properly (fabpot)ScopingHttpClient (Guikingone)AssistantMessagetemplate_vars optionresponse_format optionAdd StreamListenerInterface to hook into response streams
StreamListenerInterface to hook into response streamsTokenUsageAggregation::__construct() from variadic to arrayTokenUsageAggregation::add() method to add more token usagesCachedPlatform has been renamed CachePlatform and moved as a bridge, please require symfony/ai-cache-platform and use Symfony\AI\Platform\Bridge\Cache\CachePlatformMetadata::merge() method signature has changed to accept Metadata instead of arrayMetadata::add() has changed to merge existing keys instead of overwriting themSymfony\AI\Platform\Serializer\StructuredOutputSerializer to Symfony\AI\Platform\StructuredOutput\Serializer[BC BREAK] Change ChoiceResult::__construct() from variadic to accept array of ResultInterface
ChoiceResult::__construct() from variadic to accept array of ResultInterface* Add the component
One column per month.