BYOLLM with Azure OpenAI (GPT-4o / GPT-5-mini) fails in AI Agent Studio - Error while calling openAI
Summary:
BYOLLM integration with Azure OpenAI models (GPT-4o and GPT-5-mini) fails in Oracle Fusion AI Agent Studio with "Error while calling open ai". Both models are listed as supported in 25D documentation. The issue is caused by Agent Studio sending incompatible payload parameters to Azure OpenAI.
Content (please ensure you mask any confidential information):
We configured BYOLLM in AI Agent Studio (Credentials > LLM tab) with Azure OpenAI GPT-4o and GPT-5-mini. Both fail with "Error while calling open ai".We verified the Azure endpoints work correctly via direct curl calls. The issue is in how Agent Studio constructs the LLM request payload:Issue 1 - GPT-4o: Agent Studio sends max_tokens: 32000, but Azure GPT-4o (gpt-4o-2024-08-06) supports max 16,384 output tokens.Error: "max_tokens is too large: 32000. This model supports at most 16384 completion tokens"Issue 2 - GPT-5-mini: Agent Studio sends "max_tokens" parameter, but this model requires "max_completion_tokens" instead.Error: "Unsupported parameter: 'max_tokens' is not supported with this model.