Azure / Azure/azure-rest-api-specs

[OpenAI] Update swagger to add 'status' property in Error object model

Open
#26,095 0 comments 11 reactions 0 assignees View on GitHub
customer-reported OpenAI question Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

## [OpenAI] Update swagger to add 'status' property in Error model

### :information_source: Description

When generating an AzureOpenAI API client for versions of '2023-09-01-preview' or '2023-08-01-preview' an unexpected field is returned in the **Error model.**

The scenario where content_filter fails, an extra field called **"status"** is sent:
![content_filter_error](https://github.com/Azure/azure-rest-api-specs/assets/468690/573312ff-4cc9-407b-b21d-344b98e8bf1b)

The "status" property does not exist in swagger definition:
![imagen](https://github.com/Azure/azure-rest-api-specs/assets/468690/bef32083-8d20-4fd0-a90d-17751595508c)

### :information_source: Possible solutions:

- Add new property status

https://github.com/Azure/azure-rest-api-specs/blob/a26794fe26cdc68f4d18bc782e0b4f2f29e24b40/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-09-01-preview/inference.json#L803

- Add options: "additionalProperties": true to allow extra fields like this 'status' one.

### :pushpin: References
https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#example-scenario-an-input-prompt-containing-content-that-is-classified-at-a-filtered-category-and-severity-level-is-sent-to-the-completions-api

Contributor guide

Open the contributing guide

Research direction

Start by reading specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-09-01-preview/inference.json around line 803 and inspect the Error model. Apply the selected schema change for the cited preview API versions, then run the repository’s applicable specification validation; done means the model represents the returned status property.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
ai, api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.