Skip to content

Fix undefined array key "created" #458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

BjornValkOptimizers
Copy link

Fixed the instance of Models RetrieveResponse not containing 'created' attribute when using Azure OpenAI

What:

  • [X ] Bug Fix
  • New Feature

Description:

Fix an exception when calling client->models()->list() with an Azure OpenAI configuration.
The Azure OpenAI does not return created and owned_by in it's response. Instead use created_at for the created property and an empty string for the ownedBy property

Related:

#457

@gehrisandro gehrisandro self-assigned this Aug 20, 2024
@gehrisandro gehrisandro added the Non-OpenAI Model Not an OpenAI Model. label Aug 20, 2024
Copy link
Collaborator

@iBotPeaches iBotPeaches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit torn on this. If this is a specific difference of OpenAI on Azure vs main, then we should talk about making some of these nullable.

Since keeping the typing happy with just check after check to fallback to a 0 doesn't seem right. Either way CI failed because the ?? aren't going to work when its typed to always be there.

@iBotPeaches iBotPeaches marked this pull request as draft April 8, 2025 23:52
@the-fermi-paradox the-fermi-paradox mentioned this pull request Apr 27, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Non-OpenAI Model Not an OpenAI Model.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants