Skip to content

fix: guard missing vector store response description for Azure OpenAI compatibility#765

Merged
iBotPeaches merged 1 commit intoopenai-php:mainfrom
jesse-bos:fix/azure-vector-store-missing-description
Apr 29, 2026
Merged

fix: guard missing vector store response description for Azure OpenAI compatibility#765
iBotPeaches merged 1 commit intoopenai-php:mainfrom
jesse-bos:fix/azure-vector-store-missing-description

Conversation

@jesse-bos
Copy link
Copy Markdown
Contributor

What:

  • Bug Fix
  • New Feature

Description:

This package targets the OpenAI API, but the same SDK also works against Azure OpenAI, which exposes an OpenAI-compatible surface. For teams on Azure (often for compliance, data-residency, or enterprise-procurement reasons) it's nice to be able to stay on the same client as everyone else.

v0.19.1 added a new description field to VectorStoreResponse and reads it unconditionally in VectorStoreResponse::from(). Azure OpenAI's vector-store endpoint does not (yet) return that field, so calls against Azure now fail with:

Undefined array key "description"

This guards the read with ?? null, matching the pattern already used for other optional fields across the codebase (e.g. CreateResponse, CreateStreamedResponse, CreateResponseMessage). The constructor parameter is already ?string, so behavior against OpenAI is unchanged, but Azure users no longer have to pin to <0.19.1 while waiting for parity on Microsoft's side.

A small, defensive change that costs nothing for OpenAI users and unblocks the Azure ones.

…bility

Azure OpenAI's vector-store endpoint does not yet return the `description`
field that was added in v0.19.1, causing "Undefined array key description"
errors. Default to null when the key is absent, consistent with how other
optional fields are handled across the codebase.
@iBotPeaches iBotPeaches merged commit b9f02a6 into openai-php:main Apr 29, 2026
14 checks passed
@iBotPeaches
Copy link
Copy Markdown
Collaborator

thanks!

@iBotPeaches iBotPeaches added this to the v0.20.0 milestone Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants