`task` tool model override rejects BYOK models with "Model '...' is not available"
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
- Copilot Chat Extension Version:
- VS Code Version: 1.134.0
- OS Version: Linux
- Feature (e.g. agent/edit/ask mode): agent host
- Selected model : BYOK (Kimi K2.7 Code, Qwen3.8 27B)
Steps to Reproduce:
1. Configure a BYOK model in `User/chatLanguageModels.json`:
```json
[
{
"name": "Kimi K2.7 Code",
"vendor": "customendpoint",
"apiKey": "not needed",
"apiType": "responses",
"models": [
{
"id": "Kimi-K2.7-Code",
"name": "Kimi K2.7 Code",
"url": "http://127.0.0.1:8080/v1",
"toolCalling": true,
"vision": true,
"thinking": true,
"maxInputTokens": 224000,
"maxOutputTokens": 32000
}
{
"id": "Qwen3.8-27B",
"name": "Qwen3.8 27B",
"url": "http://127.0.0.1:8080/v1",
"toolCalling": true,
"vision": true,
"thinking": true,
"maxInputTokens": 224000,
"maxOutputTokens": 32000
}
]
}
]
```
2. In **Agent Host window**, I was asking my main model (Kimi K2.7 Code) to invoke the `task` tool with "Qwen3.8 27B" model for simpler coding/summarize tasks. Below is what I saw
```json
{
"agent_type": "task",
"name": "byok-test",
"description": "Test BYOK model override",
"prompt": "Reply only with the model identifier you are using.",
"model": "customendpoint/Kimi 2.7 Code/Qwen3.8-27B"
}
```
3. Observe the error:
```text
Model 'customendpoint/Kimi 2.7 Code/Qwen3.8-27B' is not available.
Available models: customendpoint/Kimi K2.7 Code/Kimi-K2.7-Code,
customendpoint/Kimi K2.7 Code/Qwen3.8-27B
```
Expected: The `task` subagent should start using the requested BYOK model.
Actual: The model override is rejected, even though the exact id appears in the available list.
Contributor guide
Assessment
This issue has not been assessed yet.