Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Foundry Toolkit: GPT-6 luna tool calls fail in VS Code Chat because Chat Completions is used with reasoning

オープン
#924 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
70/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
azure, javascript, vscode
領域
api, tooling

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

needs attention

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.

主要言語
JavaScript
スター
2.1k
フォーク
262
平均マージ
51分
マージ済み PR(30日)
31

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/foundry-dev-tools のほかの issue

microsoft/foundry-dev-tools の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。