Skip to content
CAI
Software that uses CAICheck a score

openai-php/client

61.1

Adequate · 19 September 2026

27.1k

lines of production code

PHP

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is a PHP SDK for the OpenAI API, providing a strongly-typed client to interact with a comprehensive suite of AI services including Chat, Assistants, Audio, Images, and the newer Responses and Realtime APIs. It handles request construction, streaming responses, and webhook verification while ensuring type safety through dedicated response models for every endpoint. The library also includes robust testing utilities, such as a fake client and fixtures, to facilitate unit testing of API integrations.

How it got here

2022 — SDK v0.21.0 API expansion and refactoring

21 changes.

This period focused on releasing version 0.21.0, which significantly expanded the SDK's coverage to include new OpenAI APIs such as Responses, Realtime, and Containers. The work involved a major architectural refactoring of the transport layer to support streaming and diverse content types, alongside a comprehensive shift to strongly-typed response models for improved type safety and developer experience.

2023 — API response modeling and testing infrastructure

21 changes.

This period focused on implementing comprehensive response models for a wide range of OpenAI API resources, including Chat, Audio, Assistants, Threads, and Fine-Tuning, to support structured data access and streaming. Concurrently, a robust testing infrastructure was established with fake clients, traits, and extensive fixtures to enable reliable unit testing for these new features.

2024–2025 — Responses API and streaming support

20 changes.

This period focused on implementing comprehensive response models for the new OpenAI Responses API, including detailed support for streaming deltas, tool calls, and various output types. It also expanded coverage for other API areas such as Vector Stores, Batches, Realtime sessions, and Containers, while introducing webhook signature verification and associated test fixtures.

Features

Add Batches API response models

Introduced new response classes for the Batches API endpoint, including BatchListResponse, BatchResponse, BatchResponseErrors, BatchResponseErrorsData, and BatchResponseRequestCounts. These classes provide structured access to batch job details, status, errors, and request counts, enabling users to interact with the Batches API.

src/Responses/Batches · high confidence

Add Vector Store response models

Introduces new response classes for the Vector Stores API, including VectorStoreResponse, VectorStoreListResponse, and VectorStoreDeleteResponse, along with supporting models for file counts and expiration settings. These classes enable proper parsing and access to vector store data, file processing statuses, and deletion confirmations.

src/Responses/VectorStores · high confidence

Add fine-tuning response models for job listing, retrieval, and event streaming

This change introduces a new set of response classes in the FineTuning namespace to handle API responses for fine-tuning jobs. Specifically, it adds \ListJobsResponse\ and \RetrieveJobResponse\ to support listing and retrieving fine-tuning jobs, including handling of hyperparameters (where \n\_epochs\ can be an integer or string) and optional error details. It also adds \ListJobEventsResponse\, \ListJobEventsResponseEvent\, and \ListJobEventsResponseEventData\ to support retrieving and parsing fine-tuning job events, including training metrics like loss and accuracy. These classes ensure proper type handling for fields such as \has\_more\ for pagination and nullable error objects.

src/Responses/FineTuning · high confidence

Add moderation category and input type enums

New enums have been introduced to support the moderation API: Category defines the specific violation types (such as hate, harassment, illicit content, self-harm, sexual, and violence variants), and CategoryAppliedInputType specifies the media formats (text, image, audio) to which these categories apply.

src/Enums/Moderations · high confidence

Add response input models for the OpenAI Responses API

This change introduces a comprehensive set of new response model classes in the \src/Responses/Responses/Input\ directory to support the OpenAI Responses API. These models enable the library to correctly parse and expose API response data, including structured message content (text, images, files), various tool call outputs (function, custom, apply\_patch, computer, local shell), and specific interaction types like MCP approval responses and acknowledged safety checks. Users can now access detailed input-side data structures from API responses that were previously unsupported.

src/Responses/Responses/Input · high confidence

Add response models for Assistant API thread messages

This change introduces a comprehensive set of response classes for the Assistant API's thread messages, enabling structured handling of message data. It includes \ThreadMessageResponse\ and \ThreadMessageListResponse\ for retrieving individual and paginated message lists, along with \ThreadMessageDeleteResponse\ for deletion operations. The models support rich content types, including text with file citations and file paths, image files, and image URLs. Additionally, it defines structures for message attachments (file search and code interpreter tools) and incomplete message details, ensuring the library can correctly parse and expose the full schema of Assistant API message responses.

src/Responses/Threads/Messages · high confidence

Add response models for Assistant Thread Run Steps

Introduces a complete set of response classes for the Assistant API's thread run steps, enabling structured access to step details including code interpreter outputs (images and logs), file search results, and function call arguments and outputs. The new \ThreadRunStepListResponse\ and \ThreadRunStepResponse\ models support pagination, usage token tracking, and metadata, while implementing the \ResponseHasMetaInformationContract\ to expose request metadata alongside the step data.

src/Responses/Threads/Runs/Steps · high confidence

Add response models for Containers and Container Files APIs

This change introduces the response data structures for the new Containers and Container Files capabilities. It adds \CreateContainer\, \RetrieveContainer\, \ListContainers\, and \DeleteContainer\ to handle container lifecycle responses, including an \ExpiresAfter\ object for expiration settings. It also adds \ContainerFileResponse\, \ContainerFileListResponse\, and \ContainerFileDeleteResponse\ to handle file operations within containers, notably allowing the \bytes\ field to be nullable in the file response model.

src/Responses/Containers · high confidence

Add response models for Realtime Session and Transcription Session APIs

This change introduces new response classes for the OpenAI Realtime API, enabling structured handling of session configuration and transcription settings. Users can now access detailed session data including client secrets, audio formats, turn detection parameters, and tool definitions via the new \SessionResponse\ class. Additionally, a separate \TranscriptionSessionResponse\ class is provided to handle transcription-specific session details, such as supported transcription models (e.g., \gpt-4o-transcribe\, \whisper-1\) and language settings. Supporting value objects like \ClientSecret\, \TurnDetection\, \InputAudioTranscription\, and \FunctionTool\ are also added to represent nested configuration structures.

src/Responses/Realtime · high confidence

Add response models for the OpenAI Responses and Conversations APIs

This change introduces the PHP response classes required to parse data from the new OpenAI Responses API and the Conversations API. For the Responses API, it adds \CreateResponse\ (including reasoning, tool calls, and usage details), \CreateStreamedResponse\ (handling streaming events like reasoning text and rate limits), \DeleteResponse\, and \ListInputItems\. For the Conversations API, it adds \ConversationResponse\, \ConversationDeletedResponse\, \ConversationItemList\, and \ConversationItem\ (supporting message types like text, images, and computer screenshots). These classes enable the library to correctly deserialize API payloads into typed objects.

src/Responses/Responses · high confidence

Add streaming response types for the Responses API

Added a comprehensive set of streaming response classes in the \src/Responses/Responses/Streaming\ directory to support real-time event handling for the OpenAI Responses API. These new types cover streaming deltas and completion events for various output modalities, including text (\OutputTextDelta\, \OutputTextDone\), code interpreter execution (\CodeInterpreterCodeDelta\, \CodeInterpreterCodeDone\), function call arguments (\FunctionCallArgumentsDelta\, \FunctionCallArgumentsDone\), image generation (\ImageGenerationPartialImage\), reasoning summaries (\ReasoningSummaryTextDelta\, \ReasoningSummaryTextDone\), and tool calls such as file search, MCP, and apply patch operations. This enables users to process incremental updates and structured tool interactions as they occur during a streaming response.

src/Responses/Responses/Streaming · high confidence

Add support for text/plain content type

The Transporter now supports sending requests with a 'text/plain' content type. This allows users to interact with APIs that expect plain text payloads, in addition to the existing JSON and multipart/form-data support.

src/Enums/Transporter · high confidence

Add typed response classes for Fine-tunes API

The Fine-tunes response handling now uses dedicated, strongly-typed classes (such as ListResponse, RetrieveResponse, and their nested event/file/hyperparams models) instead of generic structures. This provides users with explicit property access and IDE support for fine-tune details, including model status, hyperparameters, training files, and events.

src/Responses/FineTunes · high confidence

Add typed response classes for the Embeddings API

The library now provides dedicated, strongly-typed response classes for the Embeddings endpoint. Users will receive structured objects (CreateResponse, CreateResponseEmbedding, CreateResponseUsage) instead of raw arrays, providing direct access to properties like the model name, embedding vectors, and token usage statistics with proper type safety.

src/Responses/Embeddings · high confidence

Add typed response models for the Edits API

The library now provides dedicated, strongly-typed response classes for the Edits resource, replacing or supplementing previous generic handling. Specifically, \CreateResponse\ now exposes structured properties for the edit object, creation timestamp, usage statistics (prompt, completion, and total tokens), and a list of choices, each backed by their own value objects (\CreateResponseChoice\, \CreateResponseUsage\). This allows users to access edit results with type safety and IDE autocomplete support, rather than relying on raw arrays or loosely typed objects.

src/Responses/Edits · high confidence

Added response models for Assistant streaming message deltas

Introduced a new set of response classes in the \src/Responses/Threads/Messages/Delta\ directory to handle streaming updates from the Assistants API. These classes (\ThreadMessageDeltaResponse\, \ThreadMessageDeltaObject\, and their content-specific counterparts) parse delta payloads containing text and image file content, including support for file citation and file path annotations with optional quote text. This enables users to correctly deserialize and access incremental message content during assistant streaming sessions.

src/Responses/Threads/Messages/Delta · high confidence

Added response models for Threads API runs and streaming

This change introduces a comprehensive set of response classes for the Threads API runs, enabling structured handling of run data and streaming events. Users can now access detailed run information via \ThreadRunResponse\ and \ThreadRunListResponse\, which include properties for status, required actions, tool usage, and token consumption. The update also adds specific model classes for run tools (code interpreter, file search, function), tool choices, and error/incomplete details. Additionally, \ThreadRunStreamResponse\ is introduced to parse streaming events, mapping incoming data to the appropriate response types for threads, runs, steps, and messages.

src/Responses/Threads/Runs · high confidence

Introduced new response classes (\VectorStoreSearchResponse\, \VectorStoreSearchResponseFile\, and \VectorStoreSearchResponseContent\) to handle the structured data returned by vector store search operations. These classes provide strongly-typed access to search results, including file metadata, relevance scores, and content snippets, enabling users to parse and interact with search API responses more safely and conveniently.

src/Responses/VectorStores/Search · high confidence

Added response models for streamed thread run step deltas

Introduced \ThreadRunStepDeltaObject\ and \ThreadRunStepDeltaResponse\ classes to handle streamed updates for thread run steps. These new response structures parse the \delta\ payload containing step details, supporting both message creation and tool call types (including code interpreter, file search, and function calls), enabling proper deserialization of incremental streaming data from the Assistants API.

src/Responses/Threads/Runs/Steps/Delta · high confidence

Added response models for the OpenAI Assistants API

This change introduces a new set of response classes in the \src/Responses/Assistants\ directory to handle data returned by the OpenAI Assistants API. The new models include \AssistantResponse\ for individual assistant details (supporting tools like code interpreter, file search, and custom functions, as well as reasoning effort), \AssistantListResponse\ for paginated lists, and \AssistantDeleteResponse\ for deletion confirmations. Supporting types such as \AssistantResponseToolFunctionFunction\, \AssistantResponseToolResources\, and specific tool/resource classes are also added to correctly parse the API's JSON structure into typed PHP objects.

src/Responses/Assistants · high confidence

Enhanced exception handling with specific error types and HTTP context

The exception handling system has been significantly improved to provide more granular error information and better resilience against varied API responses. New specific exception classes have been introduced: \InvalidArgumentException\, \RateLimitException\ (which exposes the HTTP response for rate-limit scenarios), \ServerException\ (exposing the response for server errors), \UnknownEventException\, and \WebhookVerificationException\ (with static factories for common webhook validation failures). The core \ErrorException\ has been refactored to accept the raw HTTP \ResponseInterface\, allowing it to expose the HTTP status code via \getStatusCode()\. It now robustly handles error payloads that may be strings, arrays, or objects, ensuring the error message is always a readable string even if the API returns an array of messages or null values. Additionally, \getErrorType()\ and \getErrorCode()\ now correctly handle null values, and \UnserializableResponse\ also exposes the underlying HTTP response.

src/Exceptions · high confidence

Expanded Response API tool support with new tool types and configuration options

The library now supports a broader range of tools within the OpenAI Responses API. This includes dedicated response models for the Apply Patch, Code Interpreter, Computer Use, Custom, File Search, Function, Image Generation, MCP (Model Context Protocol), Namespace, Programmatic Tool Calling, Tool Search, and Web Search tools. Additionally, it introduces granular configuration classes for File Search (comparison and compound filters, ranking options), Web Search (user location, image settings), and MCP tools (tool name filters), enabling more precise control over tool behavior and input handling.

src/Responses/Responses/Tool · high confidence

Introduce comprehensive Chat response models with tool calls, annotations, and usage details

This change adds a complete set of response classes for the Chat completion endpoint, enabling users to access structured data from both standard and streamed responses. The new models support tool calls (including extra content for providers like Gemini), URL citation annotations for web search results, and audio/image modalities in message content. Additionally, usage details now include granular breakdowns such as cached tokens, audio tokens, reasoning tokens, and prediction tokens, while logprobs are exposed for content analysis.

src/Responses/Chat · high confidence

Introduce dedicated parsing actions for OpenAI Responses API objects

This change adds a suite of new static parsing classes in \src/Actions/Responses\ (and \src/Actions/Conversations\) to handle the deserialization of OpenAI Responses API data. These new components—\ItemObjects\, \OutputObjects\, \ToolObjects\, \ToolChoiceObjects\, \CustomToolInputObjects\, \NamespaceToolObjects\, and \OutputText\—centralize the logic for mapping raw API payloads into strongly-typed response objects. This supports the new Responses API capabilities, including tool search, programmatic tool calling, apply patch, compaction, and various tool types (web search, computer use, MCP, etc.), ensuring that users receive properly structured objects for messages, tool calls, outputs, and tool choices.

src/Actions · high confidence

Introduce new API resource classes for Assistants, Audio, Batches, Chat, Containers, Conversations, Fine-tuning, Images, Moderations, Realtime, and Responses

This change adds a comprehensive set of new resource classes in src/Resources that implement the OpenAI API endpoints for Assistants (v2), Audio (speech, transcription, translation), Batches, Chat (with streaming), Containers and ContainerFiles, Conversations and ConversationItems, Fine-tuning (new API), Images (generation, edits, variations), Moderations, Realtime sessions, and the new Responses API (with streaming and cancellation). Each class provides strongly-typed request/response handling for its respective domain, enabling users to interact with these specific OpenAI capabilities through a consistent, object-oriented interface.

src/Resources · high confidence

Introduce structured API response metadata classes

The library now exposes a dedicated \MetaInformation\ object (and supporting classes \MetaInformationOpenAI\, \MetaInformationRateLimit\, and \MetaInformationCustom\) that parses HTTP response headers into a structured format. This allows users to access details such as the model name, processing time, rate limit status, and request ID directly from the response object, rather than relying on raw header strings.

src/Responses/Meta · high confidence

Moderation response now includes category applied input types

The moderation response structure has been updated to expose the \category\_applied\_input\_types\ field, which indicates which input types triggered specific moderation categories. This new data is now accessible via the \CreateResponseResult\ and \CreateResponse\ classes, allowing users to see detailed context on why content was flagged beyond simple category scores and violation flags.

src/Responses/Moderations · high confidence

New API resource contracts for Assistants, Audio, Batches, Containers, Conversations, Fine-Tuning, Realtime, Responses, Threads, and Vector Stores

The library now exposes interface contracts for a wide range of OpenAI API resources, enabling developers to interact with Assistants, Audio (including speech and streaming transcriptions), Batches, Containers and their files, Conversations and their items, Fine-Tuning (replacing the legacy Fine-Tunes endpoint), Realtime ephemeral tokens, the new Responses API (with streaming support), Threads with runs and messages, and Vector Stores (including file management, batches, and search). Additionally, the Edits API contract is marked as deprecated, and the legacy Fine-Tunes contract remains available for existing workflows.

src/Contracts/Resources · high confidence

New StreamResponse class for handling server-sent event streams

A new \StreamResponse\ class has been added to the \src/Responses\ directory to handle streaming responses. This class implements \ResponseStreamContract\ and \ResponseHasMetaInformationContract\, providing a \getIterator\ method that parses Server-Sent Events (SSE) from the HTTP response body. It supports reading lines in chunks, handles specific event types like 'ping' and 'keepalive' by skipping them, and correctly processes error objects embedded in the stream. The class also exposes response metadata via the \meta()\ method, allowing users to access HTTP headers associated with the stream.

src/Responses · high confidence

New response models for image generation, editing, and variations

The \src/Responses/Images\ directory now includes dedicated response classes for image operations: \CreateResponse\ (generation), \EditResponse\ (editing), and \VariationResponse\ (variations), each exposing a \created\ timestamp, a \data\ array, and optional \usage\ statistics. The \CreateResponseData\ model adds a \revised\_prompt\ property to capture the refined prompt used during generation, while \ImageResponseUsage\ and \ImageResponseUsageInputTokensDetails\ provide structured token usage data (total, input, output, and text/image token breakdowns). Streaming support is introduced via \CreateStreamedResponse\ and \EditStreamedResponse\, which dispatch events like \image\_generation.partial\_image\, \image\_generation.completed\, \image\_edit.partial\_image\, \image\_edit.completed\, and \error\ to corresponding models (\ImageGenerationPartialImage\, \ImageGenerationCompleted\, \Error\), enabling real-time progress tracking and error handling for image tasks.

src/Responses/Images · high confidence

Response objects now support array access and expose meta information

Response objects in the library can now be accessed like arrays (e.g., $response\['key'\]) via the new ArrayAccessible trait, while the HasMetaInformation trait provides a meta() method to retrieve response metadata. This allows users to interact with response data using familiar array syntax and easily access associated metadata without needing to rely solely on object property access.

src/Responses/Concerns · high confidence

Support for new Responses API output types and tool calls

The library now includes response models for a wide range of new output types and tool calls introduced in the OpenAI Responses API. This adds support for parsing \apply\_patch\ operations (create, update, delete files), \code\_interpreter\ outputs (files and logs), and \computer\ actions (click, double-click, drag, keypress, move, screenshot, scroll, type, wait) including pending safety checks. Additionally, it introduces models for \compaction\, \custom\_tool\_call\, \file\_search\_call\ with results, \function\_call\ with namespace support, \image\_generation\_call\ with detailed metadata, and \local\_shell\_call\ with execution context.

src/Responses/Responses/Output · high confidence

Webhook signature verification and event enumeration

Added a WebhookSignatureVerifier class that validates incoming webhook requests by checking the webhook-id, webhook-timestamp, and webhook-signature headers against an HMAC-SHA256 signature, including timestamp tolerance checks to prevent replay attacks. Also introduced a WebhookEvent enum defining supported webhook event types such as batch, eval run, fine-tuning job, response, and video events.

src/Enums/Webhooks, src/Webhooks · high confidence

Behavioural changes

Add typed response models for Files API operations

The Files API now returns strongly-typed response objects for Create, Retrieve, List, and Delete operations. Users will receive structured instances (e.g., CreateResponse, RetrieveResponse) that expose properties like id, status, and expiresAt, replacing previous generic array or untyped responses. The ListResponse includes pagination fields (firstId, lastId, hasMore) and maps each item to a typed RetrieveResponse, while CreateResponse and RetrieveResponse now include the expiresAt field to reflect file expiration times.

src/Responses/Files · high confidence

Add typed response models for the Models resource

The Models resource now uses dedicated, strongly-typed response classes (\DeleteResponse\, \ListResponse\, and \RetrieveResponse\) instead of generic structures. This provides users with explicit access to model details such as ID, object type, creation timestamp, and ownership, while ensuring consistent handling of API metadata and array access across delete, list, and retrieve operations.

src/Responses/Models · high confidence

Audio transcription and translation response models now support speaker diarization and word-level timestamps

The audio response classes in src/Responses/Audio have been updated to reflect the latest OpenAI API capabilities. TranscriptionResponseSegment now includes optional speaker and type fields to support diarized JSON responses, and TranscriptionResponseWord has been added to expose word-level start and end timestamps. TranslationResponseSegment has also been updated to include the transient field. Additionally, new streaming response classes (SpeechStreamResponse, TranscriptionStreamResponse, and associated streaming types) have been introduced to support streamed audio responses.

src/Responses/Audio · high confidence

HttpTransporter refactored with granular request methods and robust error handling

The HTTP transporter now exposes distinct methods for different response types—\requestObject\ for JSON, \requestStringOrObject\ for adaptable content (including text/plain), \requestContent\ for raw strings, and \requestStream\ for streaming—replacing the single generic request method. This change introduces dedicated handling for rate limits (429) and server errors (5xx) via new exception types, ensures full stream reading to prevent data loss, and supports custom headers and query parameters for more precise API interactions.

src/Transporters · high confidence

Introduces a fluent client factory and expands API resource coverage

The library now provides a \Factory\ class that allows users to configure the OpenAI client using a fluent builder pattern (e.g., \withApiKey\, \withOrganization\, \withProject\, \withHttpClient\), replacing the previous static \OpenAI::client\ method which is now a convenience wrapper. This change also significantly expands the client's capabilities by adding dedicated resource methods for the Responses API, Conversations API, Containers API, Threads API, Vector Stores, Realtime API, and Fine-tuning, while updating documentation links from the beta to the platform reference.

src · high confidence

Introduces typed response classes for Completions API

The Completions response handling now uses dedicated, strongly-typed classes (CreateResponse, CreateResponseChoice, CreateResponseUsage, CreateResponseChoiceLogprobs, and CreateStreamedResponse) instead of raw arrays. This provides structured access to completion data, including token usage statistics and logprobs, and ensures that nullable fields like finish\_reason and completion\_tokens are handled correctly in both standard and streamed responses.

src/Responses/Completions · high confidence

Introduction of streaming support and interface decoupling in resource concerns

This change introduces a new Streamable concern trait that provides helper methods to manage streaming parameters and enforce correct usage by throwing an exception if streaming is requested on non-streamable endpoints. Additionally, the Transportable concern has been updated to depend on the TransporterContract interface instead of the concrete Transporter class, decoupling the concern from specific implementations and improving testability and flexibility.

src/Resources/Concerns · high confidence

Refactor HTTP transport layer to support multipart uploads and custom headers

The internal HTTP transport logic in src/ValueObjects has been restructured to support more flexible API interactions. The transport now uses PSR-17 factories instead of Guzzle-specific classes, enabling support for multipart file uploads (e.g., for file processing) and custom query parameters. New value objects (AdaptableResponse, QueryParams) and updated classes (Headers, Payload, ResourceUri) allow for better handling of metadata, project-specific headers, and varied request methods (modify, cancel, delete). The API token value object has also been renamed to ApiKey for clarity.

src/ValueObjects · high confidence

Refactored client and transport contracts to support new API resources and streaming

The \ClientContract\ interface has been expanded to include methods for newly supported OpenAI API resources, including Responses, Conversations, Realtime, Containers, Batches, and Vector Stores, while retaining existing endpoints like Chat, Completions, and Audio. The transport layer has been significantly restructured: the previous \Transporter\ interface (which returned raw arrays) has been replaced by \TransporterContract\, which introduces distinct methods for requesting objects, strings/objects, content, and streams, enabling better type safety and support for streaming responses. Additionally, internal contracts for response handling (\ResponseContract\, \MetaInformationContract\, \ResponseHasMetaInformationContract\, \ResponseStreamContract\) have been introduced to standardize how API responses and their metadata are accessed.

src/Contracts · high confidence

Release v0.21.0 with Responses API enhancements and build cleanup

This release updates the package to version 0.21.0, introducing programmatic tool calling and \apply\_patch\ tool support in the Responses API, alongside fixes for streamed response processing, \FileSearchTool\ nullability, and web search image results. The configuration has been updated to exclude the \src/Testing\ directory from PHPStan analysis, and the PHPUnit configuration now uses the \\<source\>\ tag instead of the deprecated \\<coverage\>\ tag. Additionally, the \rector.php\ configuration file has been removed, and the \art\ directory is now ignored in \.gitignore\ and \.gitattributes\.

(repo-wide) · high confidence

Vector store file responses now include attributes and chunking strategy details

The response models for vector store files have been expanded to expose additional metadata returned by the API. Users can now access custom key-value \attributes\ on individual files and lists, as well as detailed \chunking\_strategy\ information (including static strategy parameters like \max\_chunk\_size\_tokens\ and \chunk\_overlap\_tokens\) when retrieving file details or listing files. These changes ensure that response objects accurately reflect the full structure of the API's file-related endpoints.

src/Responses/VectorStores/Files · high confidence

Test coverage

Added OverrideStrategy enum for testing fakeable traits; Added architectural and fixture tests for the SDK; Added test fixture for Moderation Create response; Added test fixtures for Assistant API v2 and Thread Run streaming; Added test fixtures for Audio Transcription and Translation responses; Added test fixtures for Container and Container File APIs; Added test fixtures for Conversation API responses; Added test fixtures for Edits and Files API responses; Added test fixtures for Model API responses; Added test fixtures for Realtime Session and Transcription Session responses; Added test fixtures for Vector Store API responses; Added test fixtures for chat completion responses; Added test fixtures for fine-tuning job responses; Added test stubs for new API resources; Added testing support for faking API responses; New testing utilities for mocking API interactions; Updated embedding response fixture to match API schema.

Dependencies

Upgrade to PHP 8.2+ and modernize HTTP client dependencies

The package now requires PHP 8.2 or higher, dropping support for PHP 8.1. It replaces the direct Guzzle dependency with a flexible PSR-18/PSR-7/PSR-17 implementation using \php-http/discovery\, allowing users to integrate their preferred HTTP client libraries. Development tooling has also been updated, including upgrades to Pest (v3/v4), PHPStan, and Symfony Var-Dumper, along with the addition of type-coverage testing and parallel linting.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 61.

Lenses

  • Code Health 98
  • Architecture 100
  • Maturity 37
  • Readiness 80
  • Security 77

Changes since last survey

  • 300 commits — 203 feature/other, 97 fixes

By area

  • src/Responses — 111 commits
  • (root) — 69 commits
  • (repo) — 33 commits
  • .github/workflows — 18 commits
  • src/Testing — 15 commits
  • src/Contracts — 9 commits
  • src/Resources — 9 commits
  • tests/Fixtures — 8 commits
  • src/Exceptions — 7 commits
  • src/Factory.php — 3 commits
  • src/OpenAI.php — 2 commits
  • src/Transporters — 2 commits
  • src/ValueObjects — 2 commits
  • tests/Resources — 2 commits
  • tests/Responses — 2 commits
  • .github/SECURITY.md — 1 commit
  • .github/dependabot.yml — 1 commit
  • src/Actions — 1 commit
  • src/Enums — 1 commit
  • tests/OpenAI.php — 1 commit

Notable commits

  • fix: Assistants Streaming | Fixed createAndRunStreamed using the wrong transporter method
  • fix: Assistants Streaming | Updated Readme & Fixed some errors
  • fix: Fix attachments error
  • fix: Fix faking response metadata
  • fix: Fix incorrect response variable for assistant streaming (#393)
  • fix: Fix missing output parameter on streamed code interpreter outputs - fixes #404 (#406)
  • fix: Fix optional attributes for assistant streaming (#392)
  • fix: Fix type definition for responses in ClientFake::addResponses method (#382)
  • fix: Fix(OpenAI): Add filename property to OutputMessageContentOutputTextAnnotationsFileCitation (#696)
  • fix: Merge pull request #414 from openai-php/fix-faking-response-metadata
  • fix: Merge pull request #421 from SovjakMartin/fix-missing-threadrunstreamresponse-event
  • fix: Merge pull request #422 from knash94/bug/fix-content-image-url
  • fix: Merge pull request #435 from TyperEJ/fix-vector-stores-file-batches-cancel
  • fix: Merge pull request #460 from mayconmedeiroz/bugfix/fix-excepted-parameter-of-type-clientfake-vectorstoretest-provided
  • fix: Merge pull request #462 from JanSuthacheeva/hotfix/fake-b64_json-string-for-testing
  • fix: Merge pull request #499 from openai-php/fix-fine-tuning-job-response-error
  • fix: Revert "WIP Assistants Streaming: Updated readme to include a reference for assistant streaming"
  • fix: assistants streaming: Fix existing tests
  • fix: chore(OpenAI) fix: use proper order of parameters for Response construct (#615)
  • fix: fix Expected parameter of type '\OpenAI\Testing\ClientFake', 'VectorStoresTestResource' provided
  • …and 280 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

openai-php/client was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit ebec896ab0b0dff3917a70d30db67c7a64c548c0 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.