Microsoft Foundry models seems to call GitHub copilot subagent instead of Azure model. #199777
Replies: 3 comments
-
|
This is expected behavior right now, though I get why it's frustrating. Here's what's happening: When you use Microsoft Foundry models through the Foundry Toolkit, the main chat/completion calls do go to your Azure Foundry endpoint. However, So what happens is:
This is because Is there a workaround? Not really at the moment, unfortunately. The sub-agent is tightly coupled to Copilot's internal pipeline. A couple of things you can do:
Refs: |
Beta Was this translation helpful? Give feedback.
-
|
No, not directly — and this is a known architectural limitation. Why it happens #runSubagent is a GitHub Copilot-native tool. When it spins up a subagent, it uses Copilot's own model routing internally — it doesn't inherit or forward your active Foundry model selection. So even if your main chat session is using a Foundry model, subagents fall back to GitHub Copilot's default models automatically. Avoid #runSubagent for Foundry workflows — instead use Foundry Toolkit's own agent runner in VS Code, which stays fully within the Foundry model context. |
Beta Was this translation helpful? Give feedback.
-
|
I would separate the parent model from the subagent runtime here. If #runSubagent is being handled by the GitHub Copilot agent host, the delegated subagent may still be executed by Copilot's supported model/runtime path, even when the parent request is using a Microsoft Foundry model through the Foundry Toolkit. In that case the Azure Foundry model is acting as the parent/orchestrator, but the subagent invocation is not necessarily routed back through the same Foundry provider. A practical way to verify it is to check the Copilot/Foundry Toolkit logs for the actual endpoint and model used during the subagent call. If the extension does not expose a separate provider/model setting for subagents, it is probably a current product limitation rather than a configuration issue. As a workaround, keep the Foundry model call explicit through a script, MCP/tool call, or your own task endpoint, and let Copilot orchestrate only the parts that do not require that specific Azure model. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Question
💬 Feature/Topic Area
Models
Body
Hi, I am using GitHub Copilot extension on VS Code, and uses Microsoft Foundry models via Foundry Toolkit. The problem is when the model uses #runSubagent, the model actually use GitHub Copilot models.
Is there a way to use #runSubagent with Microsoft Foundry models via Foundry Toolkit?
Beta Was this translation helpful? Give feedback.
All reactions