Azure / Azure/LogicAppsUX

Agent Max Tokens Invalid Input Range

Open
#9,025 1 comment 0 reactions 0 assignees View on GitHub
Agentic bug needs-investigation priority:medium
Dominant language
TypeScript
Stars
111
Forks
109
Avg merge
1d 23h
Merged PRs (30d)
20

Description

### Severity

P3 - Medium (Minor functionality affected)

### Describe the Bug with repro steps

Excepted Behavior:
- MAX Tokens will be reflective of the MAX Tokens limits for the model selected in the agent configuration. For gpt-4o - 16k and for gpt-4.1 32k
Actual Behaviour:
- UI is limiting the MAX Tokens to 8192

Steps to Reproduce:
- in the azure portal create an autonomous agent
- configure the agent
- select GPT-4o or GPT-4.1
- Advanced Parameters -> MAX TOKENS (max limit is always 8192 regardless of the model selected)

### What type of Logic App Is this happening in?

Standard (Portal)

### Are you experiencing a regression?

_No response_

### Which operating system are you using?

Windows

### Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

### Workflow JSON

```json
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"actions": {
"Agent": {
"type": "Agent",
"inputs": {
"parameters": {
"deploymentId": "gpt-4.1",
"messages": [
{
"role": "system",
"content": "test"
}
],
"agentModelType": "AzureOpenAI",
"agentModelSettings": {
"agentHistoryReductionSettings": {
"agentHistoryReductionType": "maximumTokenCountReduction",
"maximumTokenCount": 128000
},
"deploymentModelProperties": {
"name": "gpt-4.1",
"format": "OpenAI",
"version": "2025-04-14"
}
}
},
"modelConfigurations": {
"model1": {
"referenceName": "agent"
}
}
},
"tools": {},
"runAfter": {},
"limit": {
"count": 100
}
}
},
"outputs": {},
"triggers": {
"When_an_HTTP_request_is_received": {
"type": "Request",
"kind": "Http"
}
}
},
"kind": "Stateful"
}
```

### Screenshots or Videos

_No response_

### Environment

- Microsoft Edge for Business Version 146.0.3856.84

### Additional context

when using the agentic activity we are encountering token limits; this is resulting in us having to use the Azure Open AI - Get Chat Completions call where we are able to set the MAX Tokens value to the desired upper limit

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.