Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

OpenAI API - response data structure for the models endpoint is wrong #1019

@byjlw

Description

@byjlw

🐛 Describe the bug

Output is wrong format. Please refer to the spec https://platform.openai.com/docs/api-reference/models/list
Currently returns this

{
  "data": [
    {
      "id": "string",
      "created": "integer",
      "owner": "string",
      "object": "string"
    }
  ],
  "object": "string"
}

Required format

{
  "object": "string",
  "data": [
    {
      "id": "string",
      "object": "string",
      "created": "integer",
      "owned_by": "string"
    }
  ]
}

Differences:
Owner Key Name:
In current, the key for the owner of the model is named "owner".
In required, the key for the owner of the model is named "owned_by".
Order of Keys:
In current, the "object" key at the root level appears after the "data" key.
In required, the "object" key at the root level appears before the "data" key.
Data Array Content:
current contains models with specific versions and instructions in their IDs (e.g., "meta-llama/Llama-2-7b-chat-hf").
required contains models with more generic IDs and versions (e.g., "llava:34b").

Versions

does not apply

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions