Share via

Showing error 400 unsupported parameter max token after I changed the model to 5.1

KWOK, Lon Lee (Admin) 0 Reputation points
2026-03-04T02:26:22.5133333+00:00

I have a web app hosting Azure OpenAI gpt services. I have changed the model from gpt-4o to gpt-5.1 recently. However I received error 400-unsupported parameter, max token is not supported in this model.

I have changed the name to max-completion_tokens in the Environment Variables in the Web App services but still returned the same error when using the gpt services.

Azure OpenAI Service
Azure OpenAI Service

An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.

{count} votes

1 answer

Sort by: Most helpful
  1. KWOK, Lon Lee (Admin) 0 Reputation points
    2026-03-05T08:03:12.28+00:00

    Hi SRILAKSHMI C,

    Thanks for you guide.

    I have tried to follow your instruction but not able to solve the issue.

    Previously I deployed GPT-4o from the portal to an Azure Web services. It seems like the only place where I can change the max_completion_token is at the Environment Variables in that Web App services. I tried to deploy GPT-5.1 to another web app from the portal but that option does not display. However if I change the model to GPT-4o, the deploy option will appear.

    Therefore I'm not sure whether is it there is an issue on model GPT-5 and above to be deployed to Azure Web services.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.