Skip to content

"Reached max token limit" keeps appearing even though I'm using BYOK via Azure Foundry #568

Description

@ot513

Foundry Toolkit for VS Code keeps popping up with a message saying "You have reached max token limit. Increase the limit or start a new chat" whilst processing a rqeuest. Whilst it's popping up, it does look as though its able to retry and proceed but this pop-up seems to be slowing it down/disrupting the flow. I can see in the Azure output terminal that its reconnecting to the Azure subscription each time it bumps into this error.

Unclear what this is referring to or how I change the limit if I'm using Azure Foundry and Foundry Toolkit extension. There shouldn't be a max token limit if you're BYOK? I don't believe I'm maxxing out on the Azure Foundry limits as they're set to 10,000 per minute and 10,000,000 tokens per minute.

I have set the BYOK utility model to an Azure Foundry model as well.

VS Code:
Version: 1.129.1 (user setup)
Commit: 8a7abeba6e03ea3af87bfbce9a1b7e48fed567b8
Date: 2026-07-17T15:35:09Z
Electron: 42.6.0
ElectronBuildId: 14623276
Chromium: 148.0.7778.280
Node.js: 24.18.0
V8: 14.8.178.38-electron.0
OS: Windows_NT x64 10.0.26200

Foundry Toolkit version:
Identifier: ms-windows-ai-studio.windows-ai-studio
Version: 1.6.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs attentionThe issue needs contributor's attention

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions