Skip to content
CAI
Software that uses CAICheck a score

openai-php/client

71.1

Strong · 17 November 2026

34.4k

lines of production code

PHP

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Response and Conversation API response models

Introduces a comprehensive set of response classes for the OpenAI Responses and Conversations APIs. This includes models for creating, retrieving, and deleting responses (CreateResponse, DeleteResponse, ListInputItems), handling streaming events (CreateStreamedResponse), and managing conversation state (ConversationResponse, ConversationItemList, ConversationDeletedResponse). The update also adds detailed support for various output types, tool calls, reasoning summaries, and usage metrics, enabling users to parse and interact with the new API structures. Also in this area: 1 commit (1 fix) fixing src/Actions, src/Responses.

src/Responses/Conversations, src/Responses/Responses, src/Responses/Responses/ToolChoice · medium confidence

Add Responses API input model classes

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 parse and structure various input types returned by the API, including \InputMessage\ (with support for text, image, and file content), \ComputerToolCallOutput\ (including screenshots and safety checks), \ApplyPatchToolCallOutput\, \CustomToolCallOutput\, \FunctionToolCallOutput\, \LocalShellCallOutput\, and \McpApprovalResponse\. This allows users to properly handle complex tool calls, multi-modal content, and approval workflows within the Responses API.

src/Responses/Responses/Input · 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 job response models and event listing support

This change introduces the PHP response classes for the fine-tuning API, enabling users to retrieve and list fine-tuning jobs and their associated events. The new \ListJobsResponse\ and \RetrieveJobResponse\ models expose job details including status, hyperparameters, and error information, while \ListJobEventsResponse\ and its related event models allow users to access training logs and metrics. These classes handle the deserialization of API responses, including pagination via \has\_more\ and nested data structures for events and hyperparameters.

src/Responses/FineTuning · high confidence

Add moderation category and input type enums

New enums are introduced to represent moderation categories (such as hate, harassment, illicit, self-harm, sexual, and violence) and the input types to which these categories apply (text, image, audio). These enums provide structured, type-safe constants for developers working with the moderation API responses.

src/Enums/Moderations · high confidence

Add response models for Assistant Thread Run Steps

Introduces a new set of response classes in \src/Responses/Threads/Runs/Steps\ to represent Assistant API thread run steps. This includes \ThreadRunStepListResponse\ and \ThreadRunStepResponse\ for paginated and individual step data, along with detailed sub-models for step details such as \ThreadRunStepResponseToolCallsStepDetails\ (covering code interpreter, file search, and function tool calls), \ThreadRunStepResponseMessageCreationStepDetails\, and usage metadata. These classes enable structured access to run step information, including tool call inputs/outputs and token usage.

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

Add response models for Containers and Container Files APIs

This change introduces the response structures for the new Containers and Container Files APIs. It adds \CreateContainer\, \RetrieveContainer\, \ListContainers\, and \DeleteContainer\ response classes to handle container lifecycle operations, including the \ExpiresAfter\ object for expiration settings. Additionally, it adds \ContainerFileResponse\, \ContainerFileListResponse\, and \ContainerFileDeleteResponse\ to support file operations within containers, with the \ContainerFileResponse\ correctly modeling the \bytes\ field as nullable to match the API specification.

src/Responses/Containers · high confidence

Add response models for Realtime Session and Transcription Session

New response classes have been added to the Realtime API to support ephemeral tokens and transcription features. This includes \SessionResponse\ and \TranscriptionSessionResponse\ as the main entry points, along with supporting models for \ClientSecret\ (handling expiration and values), \InputAudioTranscription\ (for both session and transcription contexts), \TurnDetection\ (configuring server VAD parameters), and \FunctionTool\ (defining function-calling tools). These classes enable structured access to session configuration, audio formats, voice settings, and tool definitions returned by the Realtime API.

src/Responses/Realtime · high confidence

Add response models for Threads API Runs

Introduces a comprehensive set of response classes for the Threads API Runs, including ThreadRunResponse and ThreadRunListResponse, which expose run details such as status, model, instructions, tools, and usage. The update also adds specific models for run components like required actions (with tool call details), last errors, incomplete details, and tool configurations (code interpreter, file search, function, and tool choice). Additionally, it includes ThreadRunStreamResponse to handle streaming events for threads and runs, mapping various stream events to their respective response objects.

src/Responses/Batches, src/Responses/Threads/Runs · high confidence

Add response models for vector store files including chunking strategy and attributes

This change introduces new response classes for the Vector Store Files API, enabling users to access detailed file metadata. The \VectorStoreFileResponse\ now exposes the \attributes\ map and the \chunking\_strategy\ (supporting both 'static' and 'other' types with their specific configuration details like \max\_chunk\_size\_tokens\). Additionally, new response models have been added for listing files (\VectorStoreFileListResponse\) and deleting files (\VectorStoreFileDeleteResponse\), along with specific models for last error details and chunking strategy variants.

src/Responses/VectorStores/Files · 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 enable users to process streaming outputs for various tool calls and content types, including code interpreter execution, function call arguments, file search, image generation, remote MCP tools, reasoning summaries, and apply patch operations, as well as standard text deltas and rate limit updates.

src/Responses/Responses/Streaming · high confidence

Add typed response classes for Embeddings API

The library now provides strongly-typed response structures for the Embeddings API, introducing \CreateResponse\, \CreateResponseEmbedding\, and \CreateResponseUsage\ classes. These classes replace generic array handling with dedicated objects, allowing users to access embedding data, model identifiers, and token usage statistics with type safety and improved IDE support.

src/Responses/Embeddings · high confidence

Add typed response models for the Edits API

Users can now access structured, strongly-typed response objects when calling the Edits endpoint. The library introduces \CreateResponse\, \CreateResponseChoice\, and \CreateResponseUsage\ classes that parse the API payload into dedicated properties (such as \choices\, \usage\, and \meta\ information) instead of returning raw arrays. This provides better IDE support, type safety, and easier access to specific fields like token usage and edit results.

src/Responses/Edits · high confidence

Add webhook event types and signature verification

Users can now identify specific webhook events using the new WebhookEvent enum (covering batch, eval, fine-tuning, response, and video events) and verify the authenticity of incoming webhook requests using the WebhookSignatureVerifier, which validates signatures and timestamps to prevent replay attacks.

src/Enums/Webhooks · high confidence

Added response models for Assistants API message deltas

New PHP response classes have been introduced in the \src/Responses/Threads/Messages/Delta\ directory to support streaming responses from the Assistants API. This includes \ThreadMessageDeltaResponse\ and \ThreadMessageDeltaObject\ to handle the delta payload, along with specific content types \ThreadMessageDeltaResponseContentTextObject\ and \ThreadMessageDeltaResponseContentImageFileObject\. These models parse streaming message updates, correctly handling text content with file citations and paths, as well as image file references, enabling users to process real-time assistant message chunks.

src/Responses/Threads/Messages/Delta · 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 assistant run step deltas

Introduced \ThreadRunStepDeltaObject\ and \ThreadRunStepDeltaResponse\ classes to handle delta events from the Assistants API streaming. These models parse the \step\_details\ payload, supporting \message\_creation\ and \tool\_calls\ (including \code\_interpreter\, \file\_search\, and \function\ types), allowing users to access incremental updates for run steps during streaming operations.

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, src/Responses/Skills · high confidence

Added support for text/plain content type

The ContentType enum now includes a TEXT\_PLAIN case, allowing the library to correctly handle requests and responses with a 'text/plain' content type header.

src/Enums/Transporter · high confidence

Expanded tool response models for the Responses API

The library now supports a wider variety of tool types in the Responses API by adding dedicated response classes for ApplyPatch, Code Interpreter, Computer Use, Custom, File Search (with compound filters and ranking options), Function, Image Generation, MCP (with name filtering), Namespace, Programmatic Tool Calling, and Shell (with container, local, and skill configurations). These new classes ensure that complex tool configurations and nested structures are correctly parsed and serialized, enabling users to interact with these advanced capabilities.

src/Responses/Responses/Tool · high confidence

Introduce Decisions API response models

Added new response classes for the Decisions API, including CreateResponse, PredicateAnswer, ChoiceAnswer, ScoreAnswer, and RefusalAnswer, enabling structured handling of decision-related API outputs with support for nullable names and boolean choice values.

src/Responses/Decisions · high confidence

Introduce structured response models for chat completions

This change adds a comprehensive set of typed response classes in \src/Responses/Chat\ to parse and expose chat completion data. Users can now access structured properties such as \reasoning\_content\ (for models like DeepSeek), \annotations\ with URL citations (for OpenAI Web Search), \tool\_calls\ with extra content support, and \logprobs\ for token-level confidence. The models also support multimodal outputs including \audio\ and \images\, and provide detailed token usage breakdowns (e.g., cached, audio, reasoning tokens) for both prompt and completion sides. Both standard and streamed responses are covered, ensuring consistent access to these fields across synchronous and streaming chat interactions.

src/Responses/Chat · high confidence

Introduces a fluent client factory and expands API resource coverage

Users can now configure the OpenAI client using a new \Factory\ class with a fluent API (e.g., \withApiKey\, \withOrganization\, \withProject\, \withHttpClient\, \withStreamHandler\) instead of the previous static \OpenAI::client\ method, which now delegates to this factory. This change also adds support for several new API resources and endpoints, including Responses, Conversations, Containers, Skills, Threads, Vector Stores, Audio, and Fine-tuning, while updating documentation links from the beta to the platform reference.

src · 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\ class and is included in the \toArray()\ output when present, allowing users to understand the context behind why content was flagged.

src/Responses/Moderations · high confidence

New API resource implementations for Assistants, Audio, Batches, Chat, Containers, Conversations, Fine-tuning, Images, Moderations, Realtime, Responses, and Skills

This change introduces a comprehensive set of new resource classes in \src/Resources\ that implement the OpenAI API endpoints. Specifically, it adds \Assistants\ (v2), \Audio\ (speech, transcription, translation with streaming), \Batches\, \Chat\ (with streaming), \Containers\ and \ContainerFile\, \Conversations\ and \ConversationsItems\, \FineTunes\ (legacy), \FineTuning\, \Images\ (generation, edit, variation with streaming), \Moderations\, \Realtime\ (ephemeral tokens), \Responses\ (create, retrieve, cancel, delete, streaming), and \SkillVersions\. These files provide the concrete HTTP transport logic, payload construction, and response parsing for these API areas, enabling users to interact with these specific OpenAI features through the library.

src/Resources · high confidence

New StreamResponse class for handling server-sent events

A new StreamResponse class has been added to src/Responses to handle streaming responses. It implements ResponseStreamContract and ResponseHasMetaInformationContract, providing an iterator that parses server-sent events (SSE) from the HTTP response body. The implementation includes logic to skip specific event types like 'ping', 'keepalive', and 'response.keep\_alive', handles error objects within the stream, and exposes response metadata via the meta() method.

src/Responses · high confidence

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

The library now exposes a comprehensive set of new interface contracts in \src/Contracts/Resources\ that define the API surface for modern OpenAI capabilities. This includes full CRUD and streaming support for Assistants, Threads, and Runs; new Audio endpoints for speech and streaming transcriptions; Batches for async processing; and dedicated contracts for Containers, Conversations, and Skills (including version management). It also introduces the new Responses API, Realtime ephemeral tokens, and updated Fine-tuning (FineTuningContract) alongside the legacy FineTunesContract. Finally, Vector Store management is expanded with file batches, file updates, and search capabilities, while the legacy Edits API is marked as deprecated.

src/Contracts/Resources · high confidence

New response models for Assistant API thread messages

This change introduces a comprehensive set of new response classes in the \src/Responses/Threads/Messages\ directory to support the Assistant API v2. Users can now properly parse thread message data, including detailed content types such as text with file citations and file paths, image files, and image URLs. The update also adds support for message attachments (file search and code interpreter tools), message deletion responses, and message listing responses, ensuring that all fields from the API are correctly mapped and accessible in the SDK.

src/Responses/Threads/Messages · high confidence

New response models for the Images resource

This change introduces the response data structures for the new Images resource (DALL-E). It adds \CreateResponse\, \EditResponse\, and \VariationResponse\ classes to handle standard image generation, editing, and variation requests, along with their corresponding data classes (\CreateResponseData\, \EditResponseData\, \VariationResponseData\). It also adds streaming support via \CreateStreamedResponse\ and \EditStreamedResponse\ to process partial and completed image generation events in real-time. Additionally, \ImageResponseUsage\ and \ImageResponseUsageInputTokensDetails\ are included to expose token usage statistics for these image operations.

src/Responses/Images · high confidence

Response objects now support array access and expose meta information

Response objects can now be accessed like arrays (e.g., $response\['key'\]) via the new ArrayAccessible trait, while read-only semantics are enforced by throwing exceptions on set or unset operations. Additionally, the new HasMetaInformation trait provides a meta() method on responses to retrieve associated meta information, making request metadata directly available to users.

src/Responses/Concerns · high confidence

Support for diverse Responses API output types in conversation parsing

The \ItemObjects\ class in the Conversations action now handles a comprehensive set of output item types returned by the Responses API. Users can now correctly parse and receive structured objects for shell calls, file search, function calls, web search, computer use, reasoning traces, MCP interactions, image generation, code interpretation, program execution, and patch application, ensuring that all these specific response formats are properly deserialized into their respective PHP classes.

src/Actions/Conversations · high confidence

Support for new Responses API output types and tool calls

The library now parses a comprehensive set of new output types and tool calls from the OpenAI Responses API. This includes structured models for code interpreter outputs (files and logs), file search results, and image generation details. It also adds support for computer use actions (click, drag, type, screenshot, etc.) with safety checks, local shell execution actions, and programmatic tool calling via apply patch operations (create, update, delete files). Additionally, a new compaction output type is available for handling conversation history compression.

src/Responses/Responses/Output · high confidence

Unified Responses API object parsing infrastructure

The SDK now includes a dedicated set of parser classes in the \src/Actions/Responses\ namespace 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 JSON responses into strongly-typed PHP objects. This change supports the full range of Responses API capabilities, including tool calling (function, custom, MCP, shell, code interpreter, web search, image generation, computer use, programmatic tool calling, and apply patch), output handling (messages, reasoning, compaction, programs), and tool choice configurations, ensuring consistent and type-safe interaction with the API.

src/Actions/Responses · high confidence

Behavioural changes

1 commit (0 fixes) modifying src/Responses/Vaults

A change to existing behaviour in src/Responses/Vaults — 1 commit, 6 files: “feat(OpenAI): add Vaults API (\#818)” (refs \#818).

src/Responses/Vaults · medium confidence · unverified

3 commits (0 fixes) modifying src/Responses/Agents

A change to existing behaviour in src/Responses/Agents — 3 commits, 20 files: “feat(OpenAI): add Agent Environments API (\#819)”; “feat(OpenAI): add Agents API (\#817)”; “feat(OpenAI): add Agent Sessions API (\#820)” (refs \#819, \#817, \#820).

src/Responses/Agents · medium confidence · unverified

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

Adds typed response models for Fine-tunes API resources

Introduces dedicated, strongly-typed PHP response classes for the Fine-tunes resource, including \ListResponse\, \RetrieveResponse\, \ListEventsResponse\, and supporting value objects for events, files, and hyperparameters. This change replaces generic array handling with structured objects, providing users with predictable property access (e.g., \fineTunedModel\, \hyperparams\, \status\) and consistent serialization via \toArray()\ methods for both standard and streamed responses.

src/Responses/FineTunes · 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

Introduce structured MetaInformation response objects

The library now exposes a dedicated \MetaInformation\ class (alongside \MetaInformationOpenAI\, \MetaInformationRateLimit\, and \MetaInformationCustom\) to parse and expose HTTP response headers. This change standardizes access to model metadata (model, organization, project, version, processing time), rate limit details (requests and tokens), and the request ID, while also capturing any custom headers. Users can now reliably access these values via a structured object rather than raw headers, with proper handling for null/missing values and case-insensitive header matching.

src/Responses/Meta · 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. Also in this area: 1 commit (1 fix) fixing src/ValueObjects.

src/ValueObjects, src/ValueObjects/Transporter · medium confidence

Refactored client and transport contracts with new API interfaces

The client contract has been expanded to include new resource interfaces for the Responses, Conversations, Realtime, Skills, Batches, and Vector Stores APIs, while marking the Edits, Fine Tunes, Assistants, and Threads APIs as deprecated. The transport layer has been restructured: the old Transporter interface was replaced by TransporterContract, which now exposes distinct methods for requesting objects, strings/objects, content, and streams, and the Stringable interface was renamed to StringableContract for consistency.

src/Contracts · high confidence

Release v0.21.0 with Responses API updates and build cleanup

This release updates the changelog to v0.21.0, adding support for programmatic tool calling and the \apply\_patch\ tool in the Responses API, while fixing streamed response processing and nullable fields in \FileSearchTool\. The \rector.php\ configuration file has been removed, and the \.gitattributes\ and \.gitignore\ files have been updated to exclude the \art\ directory and \.idea\ folder. Documentation has been refreshed to reflect the new package name \openai-php/client\, updated badges, and a shift to the Responses API as the primary example, alongside a PHP version requirement bump to 8.2+.

(repo-wide) · high confidence

Fixes

1 commit (1 fix) fixing src/Webhooks

A fix in src/Webhooks — 1 commit (1 fix), 1 file: “fix(OpenAI): skip malformed entries of the webhook-signature header (\#839)” (refs \#839). Also in this area: Add webhook event types and signature verification.

src/Webhooks · low confidence · unverified

Refined exception hierarchy and robust error handling

The exception handling in the library has been significantly improved to provide more specific error types and better resilience against malformed API responses. New specific exceptions have been introduced for distinct failure scenarios: \RateLimitException\ for HTTP 429 errors, \ServerException\ for server-side errors, \InvalidArgumentException\ for invalid inputs, \UnknownEventException\ for unrecognized events, and \WebhookVerificationException\ with dedicated static factories for webhook signature validation failures. The core \ErrorException\ has been updated to accept the raw HTTP response, exposing the status code via \getStatusCode()\ and making the error type and code properties nullable to handle cases where the API returns incomplete error objects. Additionally, \ErrorException\ now gracefully handles error messages that are arrays or strings, ensuring a readable message is always generated. The \UnserializableResponse\ exception also now includes the raw response for further debugging.

src/Exceptions · high confidence

Test coverage

1 commit adding/updating tests in src/Testing, tests; 3 commits adding/updating tests in src/Testing/Responses/Fixtures/Agents; Added OverrideStrategy enum for testing fakeable traits; Added architectural and fixture tests for API resources; 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 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 fixtures for image API responses; Added test resources for Assistants, Threads, Vector Stores, and new APIs; 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 cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 69.5 → 71.1 (+1.6)
  • Rubric changed (rubric-2026.11.2 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 98.0 → 96.2 (-1.8)
  • Architecture 85.5 → 88.8 (+3.3)
  • Maturity 57.2 → 60.1 (+2.9)
  • Readiness 79.9 → 79.9 (0.0)
  • Security 76.8 → 76.8 (0.0)

Resolved (78)

  • Duplicated block (25 lines × 2) (src/Actions/Conversations/ItemObjects.php)
  • Duplicated block (6 lines × 3) (src/Resources/Files.php)
  • Duplicated block (6 lines × 4) (src/Resources/Conversations.php)
  • Duplicated block (7 lines × 2) (src/Responses/Meta/MetaInformationOpenAI.php)
  • Hotspot: src/Actions/Conversations/ItemObjects.php (src/Actions/Conversations/ItemObjects.php)
  • Hotspot: src/Actions/Responses/ItemObjects.php (src/Actions/Responses/ItemObjects.php)
  • Hotspot: src/Actions/Responses/ToolObjects.php (src/Actions/Responses/ToolObjects.php)
  • Off-boarding risk: anonymized user #1
  • Orphaned file (src/Contracts/Resources/ResponsesContract.php)
  • Orphaned file (src/Contracts/Resources/ThreadsRunsContract.php)
  • Orphaned file (src/Factory.php)
  • Orphaned file (src/Resources/Audio.php)
  • Orphaned file (src/Resources/Batches.php)
  • Orphaned file (src/Resources/Files.php)
  • Orphaned file (src/Resources/FineTunes.php)
  • Orphaned file (src/Resources/FineTuning.php)
  • Orphaned file (src/Resources/Images.php)
  • Orphaned file (src/Resources/Responses.php)
  • Orphaned file (src/Resources/VectorStores.php)
  • Orphaned file (src/Responses/Assistants/AssistantListResponse.php)
  • …and 58 more

New (36)

  • Circular dependency (src/Actions/Conversations/ItemObjects.php)
  • Duplicated block (28 lines × 2) (src/Actions/Conversations/ItemObjects.php)
  • Edited copies of one member (3 members, 10+ corresponding lines) (src/Responses/Responses/Input/FunctionToolCallOutput.php)
  • Edited copies of one member (3 members, 13+ corresponding lines) (src/Responses/Containers/Files/ContainerFileListResponse.php)
  • Edited copies of one member (3 members, 27+ corresponding lines) (src/Actions/Conversations/ItemObjects.php)
  • Edited copies of one member (3 members, 6+ corresponding lines) (src/Resources/Batches.php)
  • Edited copies of one member (3 members, 6+ corresponding lines) (src/Resources/Files.php)
  • Edited copies of one member (3 members, 6+ corresponding lines) (src/Resources/Files.php)
  • Edited copies of one member (3 members, 6+ corresponding lines) (src/Responses/Chat/CreateResponseChoice.php)
  • Edited copies of one member (3 members, 7+ corresponding lines) (src/Responses/Responses/Streaming/ApplyPatchCallOperationDiffDone.php)
  • Edited copies of one member (3 members, 9+ corresponding lines) (src/Responses/Responses/Streaming/ShellCallCommandDelta.php)
  • Edited copies of one member (4 members, 6+ corresponding lines) (src/Resources/Conversations.php)
  • Edited copies of one member (4 members, 7+ corresponding lines) (src/Responses/Responses/Streaming/ImageGenerationPart.php)
  • Edited copies of one member (4 members, 8+ corresponding lines) (src/Responses/Responses/Streaming/ApplyPatchCallOperationDiffDelta.php)
  • Edited copies of one member (6 members, 10+ corresponding lines) (src/Responses/Completions/CreateResponse.php)
  • Edited copy of a member (10 corresponding lines) (src/Responses/Decisions/ChoiceAnswer.php)
  • Edited copy of a member (10 corresponding lines) (src/Responses/FineTuning/ListJobEventsResponse.php)
  • Edited copy of a member (10 corresponding lines) (src/Responses/Skills/SkillResponse.php)
  • Edited copy of a member (11 corresponding lines) (src/Responses/Images/Streaming/ImageGenerationCompleted.php)
  • Edited copy of a member (12 corresponding lines) (src/Responses/Audio/Streaming/TranscriptTextDelta.php)
  • …and 16 more

Changes since last survey

  • 18 commits — 4 feature/other, 14 fixes

By area

  • src/Responses — 12 commits
  • src/Testing — 3 commits
  • (root) — 1 commit
  • src/Actions — 1 commit
  • src/Webhooks — 1 commit

Notable commits

  • fix: fix(OpenAI): add shutdown_date to the models retrieve and list responses (#851)
  • fix: fix(OpenAI): add the default fake fixtures of the streamed transcription and image responses (#840)
  • fix: fix(OpenAI): add the fake fixture of VectorStoreFileBatchResponse (#843)
  • fix: fix(OpenAI): handle the response.compaction.compacting streaming event (#837)
  • fix: fix(OpenAI): handle the transcript.text.segment event of streamed diarized transcriptions (#838)
  • fix: fix(OpenAI): keep logprobs on streamed chat choices (#849)
  • fix: fix(OpenAI): parse compaction and tool search items when listing conversation and response input items (#836)
  • fix: fix(OpenAI): parse reasoning item content (#848)
  • fix: fix(OpenAI): parse reasoning_text content of conversation messages (#842)
  • fix: fix(OpenAI): parse the local_shell and web_search_2025_08_26 tools of a response (#841)
  • fix: fix(OpenAI): skip malformed entries of the webhook-signature header (#839)
  • fix: fix(OpenAI): stream every output item a non-streamed response parses (#833)
  • fix: fix(OpenAI): support image outputs and null code in code interpreter calls (#830)
  • fix: fix(chat): accept reasoning alias in completion messages (#834)
  • change: docs: use a current model in the README Chat examples (#831)
  • change: feat(OpenAI): add list, retrieve, update and delete for stored chat completions (#846)
  • change: feat(OpenAI): add the input token count endpoint of the Responses API (#844)
  • change: feat(OpenAI): expose message.refusal and delta.refusal on Chat (#835)

Written by cca.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 17 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit c073ad9ae13b84b4fa7081e376a18de29b34b1de — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.85+preprod-eba6548ac50f.