microsoft / microsoft/foundry-dev-tools

VS Code AI Toolkit cannot connect to a Foundry model through the default option "Authentication type: Key" (no other options possible)

Open
#324 7 comments 0 reactions 1 assignee View on GitHub

@a1exwang is already working on this.

Since Dec 30, 2025.

feature request needs attention
Dominant language
JavaScript
Stars
2.1k
Forks
260
Avg merge
42m
Merged PRs (30d)
29

Description

I am trying to use VS Code AI Toolkit Extension and I am able to connect to the project and create models. However, when I try to use the models from the playground in the VS Code, it tells me for example the following below.

2025-12-23 13:35:11.832 [error] Failed to chatStream. model = "Microsoft Foundry/(MYPROJECTNAME)gpt-4.1-mini", errorMessage = "Error: Unable to call the gpt-4.1-mini inference endpoint . Please check if the input or configuration is correct.", errorType = "u", errorObject = {"innerError":{}} 2025-12-23 13:35:11.833 [error] Unable to call the gpt-4.1-mini inference endpoint . Please check if the input or configuration is correct. key must be a non-empty string

The model works perfectly in the ai.azure.com playground, but not in AI Toolkit in VS Code. I am using external MCAPs subscription with the local authentication in CS Code.

When a new model is created with AI Toolkit or Foundry Extensions from the Model Catalog, there is a pre-selected option "Authentication type: Key" (no other options possible) and it seems that both extensions are trying to use keys which are not available after the deployment "API Authentication Keys are disabled".
Any help here? Building and testing locally managed agents is working fine.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.