Skip to content

Encounter TypeError when generating database #13818

Closed

Description

@lulu10922

Environment

  • OS and Version: Ubuntu 20.04.2 LTS
  • VS Code Version: 1.87.2
  • C/C++ Extension Version: 1.26.3
  • If using SSH remote, specify OS of remote machine:

Bug Summary and Steps to Reproduce

Bug Summary:

Steps to reproduce:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior:

Configuration and Logs

Error in OUTPUT:

[ms-vscode.cpptools] provider FAILED
TypeError: vscodelm.selectChatModels is not a function 
at CopilotHoverProvider.provideHover (xxx/.vscode-server/extensions/ms-vscode.cpptools-1.26.3-linux-x64/dist/src/main.js:82266:44)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async f.provideHover (xxx/.vscode-server/cli/servers/Stable-863d2581ecda6849923a2118d93a088b0745d9d6/server/out/vs/workbench/api/node/extensionHostProcess.js:150:96498)

Other Extensions

No response

Additional context

No response

Activity

  1. bobbrow commented on Aug 5, 2025

    @bobbrow
    Contributor

    Luca (@lukka) Ben McMorran (@benmcmorran) do you know anything about this error?

  2. sean-mcmanus commented on Aug 5, 2025

    @sean-mcmanus
    Contributor

    lulu10922 Can you set "C_Cpp.copilotHover": "disabled" as a workaround?

  3. sean-mcmanus commented on Aug 5, 2025

    @sean-mcmanus
    Contributor

    VS Code Version: 1.87.2 is from Feburary 2024 -- the Copilot hover might require a newer version (1.90.0 or newer).

    lulu10922 Can you upgrade your VS Code version?

  4. sean-mcmanus commented on Aug 5, 2025

    @sean-mcmanus
    Contributor

    lulu10922 Do you have the GitHub Copilot (Chat) Extensions installed? If so, what versions?

  5. sean-mcmanus commented on Aug 5, 2025

    @sean-mcmanus
    Contributor

    The API was added in VS Code version 1.90.0 in commit microsoft/vscode@6990923 (it got renamed).

    Our code only checks that the lm exists and not the particular function.

            // Ensure the user has access to Copilot.
            const vscodelm = (vscode as any).lm;
            if (vscodelm) {
                const [model] = await vscodelm.selectChatModels(modelSelector);
  6. sean-mcmanus commented on Aug 5, 2025

    @sean-mcmanus
    Contributor

    In 1.87 of VS Code, that API was in a "proposed state" and was subject to breaking changes until it got out of the proposed state.

    I'm not sure if there's a recommended fix on our part.

    We only added the selectChatModels call in December 2024 in PR #12552 .

  7. added a commit that references this issue on Aug 5, 2025
    2f5d08e
  8. added
    fixedCheck the Milestone for the release in which the fix is or will be available.
    on Aug 6, 2025
  9. added 2 commits that reference this issue on Aug 6, 2025
    43a786e
    d321f0a
  10. sean-mcmanus commented on Aug 7, 2025

    @sean-mcmanus
    Contributor

    lulu10922 Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.27.0 (assuming you didn't fix it by upgrading VS Code).

  11. locked and limited conversation to collaborators on Sep 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: Copilot HoverGitHub Copilot hover "Generate Copilot summary" featureLanguage ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.

    Type

    Projects

    • Status
      Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions