Foundry Toolkit: GPT-6 luna tool calls fail in VS Code Chat because Chat Completions is used with reasoning
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 70/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- azure, javascript, vscode
Hướng nghiên cứu
The extension contains Responses API adapters, API capability checks, an in-memory preference cache, and a fallback from Chat Completions to Responses on OperationNotSupported. Locate the fallback handler that inspects 400 errors and the routing decision point for function tools. Done means Luna requests with tools route to /v1/responses (or reasoning_effort none) and the new 400 triggers retry, covered for streaming and non-streaming.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Product
Foundry Toolkit for VS Code
Environment
Foundry Toolkit: 1.6.18
OS: Windows
Host: VS Code Chat in Agent mode
Model: Microsoft Foundry deployment of gpt-6-luna
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-luna inference endpoint due to 400.
Function tools with reasoning_effort are not supported for gpt-6-luna 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-luna deployment in Foundry Toolkit 1.6.18.
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 Luna has reasoning enabled by default, the service rejects the combination of function tools and reasoning with HTTP 400.
Expected behavior
Tool-calling requests for Luna 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.
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 2.1k
- Fork
- 262
- Merge trung bình
- 51 phút
- Pull request đã merge (30 ngày)
- 31
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/foundry-dev-tools
-
DevPack daily smoke failuresĐang mởneeds attention
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/foundry-dev-tools#920 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs attention
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/foundry-dev-tools#913 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ppbirdCó thể đã có người làm @JerryYangKai đã nhận 5 ngày trước. Đang mởneeds attention
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
microsoft/foundry-dev-tools#904 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
error while deploying modelCó thể đã có người làm @JerryYangKai đã nhận 5 ngày trước. Đang mởneeds attention
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/foundry-dev-tools#899 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Unable to use the account even when I am logged in!Có thể đã có người làm @JerryYangKai đã nhận 5 ngày trước. Đang mởneeds attention
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/foundry-dev-tools#896 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/foundry-dev-tools
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
jellyfin/jellyfin-desktop#1290 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
zilliztech/memsearch#832 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
sindresorhus/serialize-error#120 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
sindresorhus/slugify#83 ·