Skip to content

Conversation

knash94
Copy link
Contributor

@knash94 knash94 commented Oct 15, 2025

What:

  • Bug Fix
  • New Feature

Description:

This PR fixes an issue where OpenAI sometimes responds with the bytes being null instead of a integer in the response when retrieving a container file. I've simply allowed the bytes property to be nullable and added an additional test.

Example request & response showcasing null response

curl https://api.openai.com/v1/containers/cntr_68efad24888881938f8d8a661b5036450ac07bb92e293373/files/cfile_68efad3233308191ae2aea6fdc172940 \
  -H "Authorization: Bearer $OPENAI_API_KEY"

{
  "id": "cfile_68efad3233308191ae2aea6fdc172940",
  "object": "container.file",
  "created_at": 1760537906,
  "bytes": null,
  "container_id": "cntr_68efad24888881938f8d8a661b5036450ac07bb92e293373",
  "path": "/mnt/data/dummy_risk_priority_bar_chart.png",
  "source": "assistant"
}%   

@knash94 knash94 changed the title fix - Allow bytes to be nullable on ContainerFileResponse fix: Allow bytes to be nullable on ContainerFileResponse Oct 15, 2025
@iBotPeaches iBotPeaches merged commit 6b933f0 into openai-php:main Oct 15, 2025
12 checks passed
@iBotPeaches iBotPeaches added this to the v0.18.0 milestone Oct 15, 2025
@iBotPeaches
Copy link
Collaborator

thanks!

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.

2 participants