You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Failed to render content: ModelService: Cannot add model because it already exists! #283154
changed the title [-]Cannot use github mcp[/-][+]Failed to render content: ModelService: Cannot add model because it already exists![/+]on Jun 15, 2025
I just had the same issue while testing my MCP server, but was able to get around it by cancelling a couple of pending tool runners. A single text prompt had triggered two tools that both still had the Continue|Cancel dialog up when I restarted my server and attempted a retry of the query.
I get this occasionally in my Copilot Agent sessions - I haven't spotted an obvious pattern for reproduction though. It often happens when I'm not looking at VSCode (i.e. it's not the foreground window). In the most recent case, it was about to propose using the git_commit tool from the Git MCP server.
I'm getting this too. I think it occurs occasionally when I ignore a tool call (I dont press continue or cancel) and ask another prompt. I managed to move on from it by going back and pressing cancel. I think the bug here is that asking another prompt should just cancel any pending ?
This is happening to me when asking to get more that one Jira Issues at the same time using jira_get_issue tool using https://github.com/sooperset/mcp-atlassian MCP server. Only the first one gets called, but for the others tool calls the chat just throw "Failed to render content: ModelService: Cannot add model because it already exists!" and I cannot get any responde from the model :/
Happened to me also with context7 MCP server, when asking it to search documentation for 3 packages. The model (claude-haiku-4.5) tried to make the 3 resolve-libray-id tool calls at the same time, only the first one works, the others throw the error.
Thanks for creating this issue! It looks like you may be using an old version of VS Code; the latest stable release is 1.107.0. Please try upgrading to the latest version and checking whether this issue remains.
Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): Opus 4.5
Logs: Falha ao renderizar o conteúdo: ModelService: Cannot add model because it already exists!
The task was cerate a Draw.IO extension.
This erros often occurs, indeed, after consecutives calls to context7 MCP server.
The last reasoning was (translated):
I need to check how react-drawio configures plugins. I'll look in the documentation or see how it's handled:
Executado Resolve Context7 Library ID
Completed with input: {
"libraryName": "react-drawio"
}
Executado Get Library Docs
Completed with input: {
"context7CompatibleLibraryID": "/jgraph/drawio",
"topic": "plugins urlParameters configuration"
}
I'll check how react-drawio accepts plugins in urlParameters:
Searched marcveens/react-drawio for "plugins urlParameters configuration", 64 results.
I found that react-drawio accepts `urlParameters` including `plugins`.
I need to check how it works. I'll look at the Draw.io documentation for plugins:
<crash>
Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, .gif files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.
If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (Developer: Toggle Screencast Mode in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.
I don't exactly know how to trigger the error, and I’m not sure witch information might be helpful, so I'll share what I’ve noticed so far.
For me, it usually happens after calling context7 (not blaming it, just pointing the pattern).
I have another tool that is used far more often than context7, but that one does not trigger this error.
The main difference between them, besides their purpose, is that context7 was using stdio and my other tool is installed through vscode.lm.registerTool. Also, context7 was the only tool using stdio on my workspaces.
If i figure out how to trigger it, or if I managed to capture the error when it happens, I'll share it here.
If there are any log that i can provide that would make debugging easier, I don't mind sharing it.
This issue has been closed as it has been labeled with info-needed and has not received the additional information that was requested from the issue author. It has been labeled as info-needed for 7 days.
Activity
[-]Cannot use github mcp[/-][+]Failed to render content: ModelService: Cannot add model because it already exists![/+]mmartensson commentedon Jun 16, 2025
I just had the same issue while testing my MCP server, but was able to get around it by cancelling a couple of pending tool runners. A single text prompt had triggered two tools that both still had the Continue|Cancel dialog up when I restarted my server and attempted a retry of the query.
somewhatabstract commentedon Jul 2, 2025
I get this occasionally in my Copilot Agent sessions - I haven't spotted an obvious pattern for reproduction though. It often happens when I'm not looking at VSCode (i.e. it's not the foreground window). In the most recent case, it was about to propose using the
git_committool from the Git MCP server.danielp370-msft commentedon Jul 5, 2025
I'm getting this too. I think it occurs occasionally when I ignore a tool call (I dont press continue or cancel) and ask another prompt. I managed to move on from it by going back and pressing cancel. I think the bug here is that asking another prompt should just cancel any pending ?
francovp commentedon Oct 29, 2025
This is happening to me when asking to get more that one Jira Issues at the same time using
jira_get_issuetool using https://github.com/sooperset/mcp-atlassian MCP server. Only the first one gets called, but for the others tool calls the chat just throw "Failed to render content: ModelService: Cannot add model because it already exists!" and I cannot get any responde from the model :/Abhi225test commentedon Nov 1, 2025
I am seeing the same issue.
francovp commentedon Nov 2, 2025
Happened to me also with context7 MCP server, when asking it to search documentation for 3 packages. The model (
claude-haiku-4.5) tried to make the 3resolve-libray-idtool calls at the same time, only the first one works, the others throw the error.DoofDilla commentedon Nov 6, 2025
Just happend with claude-sonnet-4.5 while accessing my own custom mcp server
Version: 1.106.0-insider (user setup)
Commit: 402271f
vs-code-engineering commentedon Dec 12, 2025
Thanks for creating this issue! It looks like you may be using an old version of VS Code; the latest stable release is 1.107.0. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
connor4312 commentedon Dec 12, 2025
This shouold be fixed in recent VS Code versions. Lmk if you reproduce it in 1.107 onwards!
1 remaining item
jraylan commentedon Dec 12, 2025
connor4312 commentedon Dec 12, 2025
Can you share your repro steps Jefferson Raylan (@jraylan)?
jraylan commentedon Dec 12, 2025
Falha ao renderizar o conteúdo: ModelService: Cannot add model because it already exists!The task was cerate a Draw.IO extension.
This erros often occurs, indeed, after consecutives calls to
context7 MCP server.The last reasoning was (translated):
jraylan commentedon Dec 12, 2025
Just happened again after retrying, right after it called context7.
I disabled it and seems to be working again.
connor4312 commentedon Dec 12, 2025
I'm having some difficulty repro'ing. Any chance you could capture a gif so I can see exactly how it gets triggered?
/gifPlease
vs-code-engineering commentedon Dec 12, 2025
Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats,
.giffiles are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (
Developer: Toggle Screencast Modein the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.Happy coding!
jraylan commentedon Dec 14, 2025
I don't exactly know how to trigger the error, and I’m not sure witch information might be helpful, so I'll share what I’ve noticed so far.
For me, it usually happens after calling
context7(not blaming it, just pointing the pattern).I have another tool that is used far more often than
context7, but that one does not trigger this error.The main difference between them, besides their purpose, is that
context7was usingstdioand my other tool is installed throughvscode.lm.registerTool. Also, context7 was the only tool usingstdioon my workspaces.If i figure out how to trigger it, or if I managed to capture the error when it happens, I'll share it here.
If there are any log that i can provide that would make debugging easier, I don't mind sharing it.
connor4312 commentedon Dec 15, 2025
A request log if you see it happen would also be useful https://github.com/microsoft/vscode/wiki/Copilot-Issues#language-model-requests-and-responses That contains the exact info so I can try and recreate the structure
vs-code-engineering commentedon Dec 23, 2025
This issue has been closed as it has been labeled with
info-neededand has not received the additional information that was requested from the issue author. It has been labeled asinfo-neededfor 7 days.