Skip to content

Failed to render content: ModelService: Cannot add model because it already exists! #283154

Closed as not planned

Description

Type: Bug

Failed to render content: ModelService: Cannot add model because it already exists!

Extension version: 0.28.0
VS Code version: Code 1.101.0 (Universal) (dfaf441, 2025-06-11T15:00:50.123Z)
OS version: Darwin arm64 24.5.0
Modes:

System Info
Item Value
CPUs Apple M2 (8 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 2, 4, 4
Memory (System) 16.00GB (0.05GB free)
Process Argv --crash-reporter-id c568c04f-e505-476e-9c7c-225b0a815643
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vscod805:30301674
binariesv615:30325510
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
pythonrstrctxt:31112756
nativeloc2:31192216
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
9064b325:31222308
copilot_t_ci:31222730
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
c7cif404:31314491
e77a2192:31326280
pythonpulldiagcf:31325931
996jf627:31283433
pythonrdcb7cf:31303019
usemplatestapi:31297334
0aa6g176:31307128
7bj51361:31289155
jjjhb125:31275178
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
gendocf:31295004
0g0a1943:31327026
82j33506:31327384

Activity

  1. changed the title [-]Cannot use github mcp[/-] [+]Failed to render content: ModelService: Cannot add model because it already exists![/+] on Jun 15, 2025
  2. mmartensson commented on Jun 16, 2025

    @mmartensson

    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.

  3. somewhatabstract commented on Jul 2, 2025

    @somewhatabstract

    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.

  4. danielp370-msft commented on Jul 5, 2025

    @danielp370-msft

    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 ?

  5. francovp commented on Oct 29, 2025

    @francovp

    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 :/

  6. Abhi225test commented on Nov 1, 2025

    @Abhi225test

    I am seeing the same issue.

  7. francovp commented on Nov 2, 2025

    @francovp

    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.

  8. DoofDilla commented on Nov 6, 2025

    @DoofDilla

    Just happend with claude-sonnet-4.5 while accessing my own custom mcp server

    Version: 1.106.0-insider (user setup)
    Commit: 402271f

  9. vs-code-engineering commented on Dec 12, 2025

    @vs-code-engineering
    Contributor

    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!

  10. added
    bug
    on Dec 12, 2025
  11. connor4312 commented on Dec 12, 2025

    @connor4312
    Member

    This shouold be fixed in recent VS Code versions. Lmk if you reproduce it in 1.107 onwards!

  12. 1 remaining item

  13. added
    *duplicate
    on Dec 12, 2025
  14. jraylan commented on Dec 12, 2025

    @jraylan
    Image
  15. connor4312 commented on Dec 12, 2025

    @connor4312
    Member

    Can you share your repro steps Jefferson Raylan (@jraylan)?

  16. jraylan commented on Dec 12, 2025

    @jraylan
    • Copilot Chat Extension Version: 0.35.0
    • VS Code Version: 1.107.0
    • OS Version: Windows NT x64 10.0.26200
    • Feature (e.g. agent/edit/ask mode): Agent
    • 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>
    
  17. jraylan commented on Dec 12, 2025

    @jraylan

    Just happened again after retrying, right after it called context7.

    I disabled it and seems to be working again.

  18. connor4312 commented on Dec 12, 2025

    @connor4312
    Member

    I'm having some difficulty repro'ing. Any chance you could capture a gif so I can see exactly how it gets triggered?

    /gifPlease

  19. vs-code-engineering commented on Dec 12, 2025

    @vs-code-engineering
    Contributor

    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.

    Happy coding!

  20. added
    info-needed
    on Dec 12, 2025
  21. jraylan commented on Dec 14, 2025

    @jraylan

    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.

  22. connor4312 commented on Dec 15, 2025

    @connor4312
    Member

    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

  23. removed
    *duplicate
    on Dec 15, 2025
  24. vs-code-engineering commented on Dec 23, 2025

    @vs-code-engineering
    Contributor

    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.

  25. locked and limited conversation to collaborators on Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buginfo-neededmodel-picker

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions