Skip to content

Commit 332e11d

Browse files
Merge pull request #274689 from mrbullwinkle/mrb_05_08_2024_manage_costs_update
[Azure OpenAI] Supportability update
2 parents 5c0e2d7 + a5a9d7b commit 332e11d

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

articles/ai-services/openai/concepts/content-filter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ data: [DONE]
982982
```
983983
984984
> [!IMPORTANT]
985-
> When content filtering is triggered for a prompt and a `"status": 400` is received as part of the response there may be a charge for this request as the prompt was evaluated by the service. [Charges will also occur](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/) when a `"status":200` is received with `"finish_reason": "content_filter"`. In this case the prompt did not have any issues, but the completion generated by the model was detected to violate the content filtering rules which results in the completion being filtered.
985+
> When content filtering is triggered for a prompt and a `"status": 400` is received as part of the response there will be a charge for this request as the prompt was evaluated by the service. [Charges will also occur](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/) when a `"status":200` is received with `"finish_reason": "content_filter"`. In this case the prompt did not have any issues, but the completion generated by the model was detected to violate the content filtering rules which results in the completion being filtered.
986986
987987
## Best practices
988988

articles/ai-services/openai/faq.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,15 @@ sections:
113113
How do I fix InternalServerError - 500 - Failed to create completion as the model generated invalid Unicode output?
114114
answer:
115115
You can minimize the occurrence of these errors by reducing the temperature of your prompts to less than 1 and ensuring you're using a client with retry logic. Reattempting the request often results in a successful response.
116+
- question: |
117+
We noticed charges associated with API calls that failed to complete with status code 400. Why are failed API calls generating a charge?
118+
answer:
119+
If the service performs processing, you will be charged even if the status code is not successful (not 200).
120+
Common examples of this are, a 400 error due to a content filter or input limit, or a 408 error due to a timeout. Charges will also occur when a `status 200` is received with a `finish_reason` of `content_filter`.
121+
In this case the prompt did not have any issues, but the completion generated by the model was detected to violate the content filtering rules which results in the completion being filtered.
122+
123+
If the service doesn't perform processing, you won't be charged.
124+
For example, a 401 error due to authentication or a 429 error due to exceeding the Rate Limit.
116125
117126
- name: Getting access to Azure OpenAI Service
118127
questions:

articles/ai-services/openai/how-to/manage-costs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: mbullwin
66
ms.custom: subject-cost-optimization
77
ms.service: azure-ai-openai
88
ms.topic: how-to
9-
ms.date: 08/22/2023
9+
ms.date: 05/08/2024
1010
---
1111

1212

@@ -69,7 +69,7 @@ You can pay for Azure OpenAI Service charges with your Azure Prepayment credit.
6969

7070
### HTTP Error response code and billing status in Azure OpenAI Service
7171

72-
If the service performs processing, you may be charged even if the status code is not successful (not 200).
72+
If the service performs processing, you will be charged even if the status code is not successful (not 200).
7373
For example, a 400 error due to a content filter or input limit, or a 408 error due to a timeout.
7474

7575
If the service doesn't perform processing, you won't be charged.

0 commit comments

Comments
 (0)