Hi Thiago Almeida,
Even though GPT-4.1 supports up to 1 million tokens, in Azure OpenAI, the full 1M-token context is only available on deployments of the gpt-4-1106-preview or newer models where explicitly enabled, and only for certain SKUs and regions.
Your West US 3 deployment and model configuration likely do not support the 1M context, even if you're using gpt-4.1. In most regions and configurations, the max context is still 128k tokens (some older ones are 32k).
Understanding GPT-4.1's Context Window in Azure OpenAI
While GPT-4.1 is advertised to support a context window of up to 1 million tokens, this capability is not universally available across all Azure OpenAI deployments. The actual context window limit can vary based on several factors:
1.Model Variant: Different variants of GPT-4.1 (e.g., gpt-4-1106-preview, gpt-4-32k) have different context window capacities. For instance, gpt-4-32k supports up to 32,768 tokens.
2.Deployment Region: Certain regions may not yet support the full 1 million token context window. It's essential to verify the capabilities available in your specific deployment region.
3.API Version: The API version used can influence the features and limitations accessible in your deployment.
In your case, deploying GPT-4.1 in the West US 3 region with the 2025-04-01-preview API version may not currently support the full 1 million token context window, which could explain the errors encountered when sending inputs around 300k tokens.
You can refer to the following official Azure documentation:
· Azure OpenAI Service Models: Provides an overview of available models and their capabilities.
· Quotas and Limits: Details the quotas and limitations associated with Azure OpenAI services.
o Azure OpenAI Quotas and Limits
· Transparency Note: Offers insights into the limitations and considerations when using GPT-4.1.
o Azure OpenAI Transparency Note
Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.
**
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.
Thank you!