Skip to content

Commit 2d456de

Browse files
Merge pull request #5451 from mrbullwinkle/mrb_06_09_2025_500
[Azure OpenAI] Server error (500): Unexpected special token
2 parents f89564b + d3fa42b commit 2d456de

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

articles/ai-services/openai/faq.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,16 @@ sections:
109109
How do I fix InternalServerError - 500 - Failed to create completion as the model generated invalid Unicode output?
110110
answer:
111111
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.
112+
- question: |
113+
How do I fix Server error (500): Unexpected special token
114+
answer: |
115+
This is a a known issue. 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+
117+
If reducing temperature to less than 1 does not reduce the frequency of this error an alternative workaround is set presence/frequency penalties and logit biases to their default values. In some cases, it may help to set `top_p` to a non-default, lower value to encourage the model to avoid sampling tokens with lower probability tokens.
118+
112119
- question: |
113120
We noticed charges associated with API calls that failed to complete with status code 400. Why are failed API calls generating a charge?
114-
answer:
121+
answer:
115122
If the service performs processing, you will be charged even if the status code is not successful (not 200).
116123
Common examples of this are, a 400 error due to a content filter or input limit, or a 408 error due to a time-out. Charges will also occur when a `status 200` is received with a `finish_reason` of `content_filter`.
117124
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 result in the completion being filtered.

0 commit comments

Comments
 (0)