An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
Hello @Justin Tran ,
Thank you for your patience while we were working on the update.
The top_p parameter controls nucleus sampling by defining the cumulative probability mass from which tokens are selected. From a functional and mathematical standpoint, this requires a value strictly greater than 0 and less than or equal to 1 (0 < top_p ≤ 1). A value of 0 represents an empty probability set, which is not meaningful for token selection.
Earlier service behavior did not consistently enforce this constraint at runtime, which allowed requests with top_p = 0 to succeed without error. Recent updates have introduced uniform runtime validation, and such requests are now rejected with an HTTP 400 response indicating an invalid parameter value. This reflects enforcement alignment rather than a change in model behavior.
The concern regarding documentation accuracy is valid. Existing references typically describe top_p as a value “between 0 and 1,” without explicitly clarifying whether 0 is inclusive or exclusive. In addition, some earlier or schema-style specifications listed a minimum value of 0, which can reasonably be interpreted as inclusive.
For reference, the closest official documentation currently available includes:
- OpenAI Chat Completions API - Chat | OpenAI API Reference
- Azure OpenAI REST API – Chat Completions (see
top_punder request body parameters) https://learn.microsoft.com/azure/ai-services/openai/reference/chat-completions?view=azure-ai-rest-1.0
At present, there is no single authoritative reference that explicitly states the constraint as (0,1].
For tracking API and validation updates
While parameter-level enforcement changes may not always be announced individually, the following official sources provide the most reliable visibility into platform updates:
- OpenAI API changelog - Changelog | OpenAI API
- Azure OpenAI API version lifecycle - Azure OpenAI in Microsoft Foundry Models v1 API - Microsoft Foundry | Microsoft Learn
- Azure service updates (AI & Machine Learning) - Azure updates | Microsoft Azure
- SDK and client library release notes (Azure SDK repositories on GitHub)
Monitoring these sources together helps identify upcoming validation changes, deprecations, and behavioral alignments before they impact production workloads.
Thank you