Product
Foundry Toolkit for VS Code
Environment
- Foundry Toolkit:
1.6.13
- OS: Windows
- Host: VS Code Chat in Agent mode
- Model: Microsoft Foundry deployment of
gpt-6-astra
Problem
The model works in the Foundry Toolkit chat/playground, but fails when selected as the model in VS Code Chat Agent mode. Requests without function tools are not the problematic case; the failure occurs when VS Code Chat supplies function tools.
Error
Unable to call the gpt-6-astra inference endpoint due to 400.
Function tools with reasoning_effort are not supported for gpt-6-astra in /v1/chat/completions.
To use function tools, use /v1/responses or set reasoning_effort to 'none'.
Project/resource identifiers and client request IDs have been omitted.
Steps to reproduce
- Connect a Microsoft Foundry project containing a
gpt-6-astra deployment in Foundry Toolkit 1.6.13.
- Select that deployment as the model in VS Code Chat.
- Use Agent mode so VS Code sends function tools.
- Submit a request that allows tool use.
Actual behavior
Foundry Toolkit routes the request to /v1/chat/completions. Because Astra has reasoning enabled by default, the service rejects the combination of function tools and reasoning with HTTP 400.
Expected behavior
Tool-calling requests for Astra should use /v1/responses, preserving reasoning and tool-calling support. As a compatibility fallback, Chat Completions could explicitly set reasoning_effort: "none", but Responses API is the preferred path.
Investigation
The installed extension already contains:
- Responses API request/stream adapters;
- API capability checks;
- an in-memory API preference cache keyed by endpoint host and deployment;
- fallback from Chat Completions to Responses API when an error is recognized as
OperationNotSupported.
However, this newer HTTP 400 message is not recognized by the existing fallback condition, so no retry occurs.
Verified workaround
A local test expanded the existing unsupported-operation detection to also recognize:
Function tools with reasoning_effort are not supported
The existing caller then cached responses for the deployment and retried through the Responses API. The modified bundle passed JavaScript syntax validation and produced no VS Code diagnostics.
Recommended fix
Prefer proactive routing rather than relying only on error text:
- When the model advertises Responses API support and a request includes function tools plus non-
none/default reasoning, route directly to Responses API.
- Also recognize this 400 as a fallback signal and retry through Responses API for forward compatibility.
- Add coverage for both streaming and non-streaming VS Code Language Model API requests.
Relevant Microsoft guidance: https://learn.microsoft.com/azure/foundry/openai/how-to/reasoning#tool-calling-with-reasoning-models
That guidance recommends Responses API when reasoning is combined with function/custom tools.
Product
Foundry Toolkit for VS Code
Environment
1.6.13gpt-6-astraProblem
The model works in the Foundry Toolkit chat/playground, but fails when selected as the model in VS Code Chat Agent mode. Requests without function tools are not the problematic case; the failure occurs when VS Code Chat supplies function tools.
Error
Project/resource identifiers and client request IDs have been omitted.
Steps to reproduce
gpt-6-astradeployment in Foundry Toolkit 1.6.13.Actual behavior
Foundry Toolkit routes the request to
/v1/chat/completions. Because Astra has reasoning enabled by default, the service rejects the combination of function tools and reasoning with HTTP 400.Expected behavior
Tool-calling requests for Astra should use
/v1/responses, preserving reasoning and tool-calling support. As a compatibility fallback, Chat Completions could explicitly setreasoning_effort: "none", but Responses API is the preferred path.Investigation
The installed extension already contains:
OperationNotSupported.However, this newer HTTP 400 message is not recognized by the existing fallback condition, so no retry occurs.
Verified workaround
A local test expanded the existing unsupported-operation detection to also recognize:
The existing caller then cached
responsesfor the deployment and retried through the Responses API. The modified bundle passed JavaScript syntax validation and produced no VS Code diagnostics.Recommended fix
Prefer proactive routing rather than relying only on error text:
none/default reasoning, route directly to Responses API.Relevant Microsoft guidance: https://learn.microsoft.com/azure/foundry/openai/how-to/reasoning#tool-calling-with-reasoning-models
That guidance recommends Responses API when reasoning is combined with function/custom tools.