Agent host can't list model in different custom endpoints but model have same id
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: 1.131
- OS Version: Windows 11
Steps to Reproduce:
1. Set models in custom endpoint (json), 2 endpoint (different name, diferrent URL) but model have same ID
example:
first endpoint:
```json
{
"name": "SVCS OpenAI",
"vendor": "customendpoint",
"apiKey": "${input:chat.lm.secret.3879ea94}",
"apiType": "responses",
"models": [
{
"id": "databricks-gpt-5-6-luna",
"name": "(SVCS) GPT 5.6 Luna",
"url": "http://server-1st.org/api/responses",
"toolCalling": true,
"vision": true
}
}
```
second endpoint:
```json
{
"name": "SVCS VN OpenAI",
"vendor": "customendpoint",
"apiKey": "${input:chat.lm.secret.ht54hf74}",
"apiType": "responses",
"models": [
{
"id": "databricks-gpt-5-6-luna",
"name": "(SVCS VN) GPT 5.6 Luna",
"url": "http://server-2nd.org/api/responses",
"toolCalling": true,
"vision": true
}
}
```
2. When select Local agent, model list is show corrected with 2 custom endpoint.
3. When select Copilot Agent Host, only first custom endpoint showed.
Log for 2 event:
```
2026-07-30 00:29:21.116 [info] [Window] [ChatModelSelection] event=initialize surface="workbench" sessionKey=undefined conversationKey=undefined modelTarget=undefined storageKey="chat.currentLanguageModel.panel" widgetViewKind="quick" configuredModel=undefined rememberedModel="customendpoint/SVCS VN OpenAI/databricks-gpt-5-6-luna" availableModels="customendpoint/SVCS VN OpenAI/databricks-gpt-5-6-luna,customendpoint/SVCS VN OpenAI/databricks-gpt-5-6-sol,customendpoint/SVCS VN OpenAI/databricks-gpt-5-6-terra,customendpoint/SVCS Anthropic/databricks-claude-haiku-4-5,customendpoint/SVCS Anthropic/databricks-claude-opus-4-8,customendpoint/SVCS Anthropic/databricks-claude-sonnet-5,customendpoint/SVCS OpenAI/databricks-gpt-5-6-luna,customendpoint/SVCS OpenAI/databricks-gpt-5-6-sol,customendpoint/SVCS OpenAI/databricks-gpt-5-6-terra,copilot/auto,copilot/claude-haiku-4.5,copilot/claude-opus-4.8,copilot/claude-opus-5,copilot/claude-sonnet-5,customendpoint/SVMB Local/deepseek-v4-flash,copilot/gemini-3.6-flash,copilot/gpt-5.4,copilot/gpt-5.5,copilot/gpt-5.6-luna,copilot/gpt-5.6-sol,copilot/gpt-5.6-terra,copilot/mai-code-1-flash-picker,customendpoint/SVMB Local/MiniMax-M2.7,customendpoint/SVMB Local/Qwen3.6-27B" selection="apply" resultModel="customendpoint/SVCS VN OpenAI/databricks-gpt-5-6-luna" resultReason="remembered" pendingReference=undefined
2026-07-30 00:29:25.421 [info] [Window] [ChatModelSelection] event=initialize surface="workbench" sessionKey="agent-host-copilotcli" conversationKey="agent-host-copilotcli:/untitled-c35cd402-c5c7-41aa-a5f9-beaa016dff12" modelTarget="agent-host-copilotcli" storageKey="chat.currentLanguageModel.panel.agent-host-copilotcli" widgetViewKind="quick" configuredModel=undefined rememberedModel="agent-host-copilotcli:customendpoint/databricks-gpt-5-6-terra" availableModels="agent-host-copilotcli:customendpoint/databricks-claude-haiku-4-5,agent-host-copilotcli:customendpoint/databricks-claude-opus-4-8,agent-host-copilotcli:customendpoint/databricks-claude-sonnet-5,agent-host-copilotcli:customendpoint/databricks-gpt-5-6-luna,agent-host-copilotcli:customendpoint/databricks-gpt-5-6-sol,agent-host-copilotcli:customendpoint/databricks-gpt-5-6-terra,agent-host-copilotcli:auto,agent-host-copilotcli:claude-opus-4.8,agent-host-copilotcli:claude-opus-5,agent-host-copilotcli:claude-sonnet-5,agent-host-copilotcli:customendpoint/deepseek-v4-flash,agent-host-copilotcli:gpt-5.6-luna,agent-host-copilotcli:gpt-5.6-sol,agent-host-copilotcli:gpt-5.6-terra,agent-host-copilotcli:mai-code-1-flash-picker,agent-host-copilotcli:customendpoint/MiniMax-M2.7,agent-host-copilotcli:customendpoint/Qwen3.6-27B" selection="apply" resultModel="agent-host-copilotcli:customendpoint/databricks-gpt-5-6-terra" resultReason="remembered" pendingReference=undefined
```
I think the issue is Agent Host is not passed the custom endpoint information like Local agent
Contributor guide
Assessment
This issue has not been assessed yet.