Agent/Ask/Plan not switching properly with customendpoint BYOK model
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
We have the GPT-5.6 models available in our enterprise setup. We use a LiteLLM proxy to access the models. To make the usable with VSCode Copilot, we use the `customendpoint` BYOK configuration below:
```json
[
{
"name": "LiteLLM-Gateway",
"vendor": "customendpoint",
"apiKey": "${input:chat.lm.secret.-}",
"models": [
{
"id": "azure/gpt-5.6-luna",
"name": "EAI ALL gpt-5.6-luna",
"url": "https:///v1/responses",
"apiType": "responses",
"toolCalling": true,
"vision": true,
"maxInputTokens": 1050000,
"maxOutputTokens": 128000
},
{
"id": "azure/gpt-5.6-terra",
"name": "EAI ALL gpt-5.6-terra",
"url": "https:///v1/responses",
"apiType": "responses",
"toolCalling": true,
"vision": true,
"maxInputTokens": 1050000,
"maxOutputTokens": 128000
},
{
"id": "azure/gpt-5.6-sol",
"name": "EAI ALL gpt-5.6-sol",
"url": "https:///v1/responses",
"apiType": "responses",
"toolCalling": true,
"vision": true,
"maxInputTokens": 1050000,
"maxOutputTokens": 128000
}
]
}
]
```
When we start a session in Plan mode, the planning works as expected. Once done I get the _Start implementation_ button shown. But when I click it, I see that the the mode changes to Agent mode, but I get an error that I am still in Planning mode and I need to _handoff_ to Agent mode to start the implementation. Any further action results in the error that it is not possible to switch to the Agent mode to start the implementation.
This is probably similar to [#313121](https://github.com/microsoft/vscode/issues/313121) which has been fixed. But using a `customendpoint` BYOK model seems to still bring that issue up.
I tested also using the available Copilot models directly, which do not show this error. The switch from Plan to Agent mode works as expected. So it doesn't seem to be a general issue in VSCode Copilot.
I tested also using the [LiteLLM Provider](https://marketplace.visualstudio.com/items?itemName=vivswan.litellm-vscode-chat), which does not show the error. The switch from Plan to Agent mode also works correctly. So I assume that the issue is not related to the LiteLLM proxy itself.
For me it looks like an issue with the VSCode Copilot Extension when using a BYOK model with a `customendpoint`.
- VS Code Version: 1.129.0
- OS Version: Windows 11
- Feature (e.g. agent/edit/ask mode): Switch from Plan to Agent mode
- Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): GPT-5.6-Terra
- Logs:
Contributor guide
Assessment
This issue has not been assessed yet.