Does it support configuring the model provider? · Issue #47 · github/copilot-language-server-release · GitHub
Skip to content

Does it support configuring the model provider? #47

Open

Description

@sisrnb

Does it support the environment variable configurations mentioned on the page at https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models#configuring-your-provider, such as COPILOT_PROVIDER_BASE_URL, COPILOT_PROVIDER_API_KEY, etc.? Will it be supported in the future?

Activity

  1. formulahendry commented on Jun 18, 2026

    @formulahendry

    @sisrnb , are you asking Copilot ACP to suppot BYOK?
    In latest version, it should be supported. You could be able to config acp.json of JetBrains IDE like below:

    {
        "agent_servers": {
            "GitHub Copilot npx": {
                "command": "npx",
                "args": [
                    "@github/copilot-language-server@latest",
                    "--acp"
                ],
                "env": {
                    "COPILOT_PROVIDER_BASE_URL": "https://openrouter.ai/api/v1",
                    "COPILOT_PROVIDER_API_KEY": "sk-or-v1-xxxxxx",
                    "COPILOT_MODEL": "cohere/north-mini-code:free"
                }
            }
        }
    }
  2. sisrnb commented on Jun 21, 2026

    @sisrnb
    Author

    @formulahendry Hi,

    I am using copilot-language-server to provide AI code completion for neovim.
    Line 108 of https://github.com/neovim/nvim-lspconfig/blob/master/lsp/copilot.lua specifies the startup command and arguments for copilot-language-server, which do not include the --acp parameter.
    copilot-language-server needs to run in LSP mode; otherwise, code completion does not work. I tried adding the --acp parameter, but code completion failed to function properly.

    I have confirmed that GitHub Copilot CLI supports BYOK (Bring Your Own Key). That is, after setting the following environment variables and then running the copilot command, copilot can directly converse without prompting for login:

    COPILOT_PROVIDER_TYPE
    COPILOT_PROVIDER_BASE_URL
    COPILOT_PROVIDER_API_KEY
    COPILOT_MODEL
    

    I downloaded the latest version 1.509.0 of copilot-language-server and replaced the older one, but it still does not respond to the above environment variables (when running without the --acp parameter).

    My operating system is Ubuntu 24.04.3 LTS.

  3. formulahendry commented on Jun 24, 2026

    @formulahendry

    For now, only with --acp parameter, the copilot-language-server will respect those COPILOT_PROVIDER_BASE_URL env.
    You may try with a neovim ACP Client: https://agentclientprotocol.com/get-started/clients#editors-and-ides

  4. bstoltefuss commented on Jul 2, 2026

    @bstoltefuss

    As far as i know BYOK/Offline mode has been implemented for Copilot in VSCode, Copilot CLI and has been announced to be implemented for VS Professional. Seems to be part of a new strategy at MS. So it should probably be enabled for LSP mode too. Otherwise integrations depending on LSP (f.e. the official copilot plugin for eclipse?) might not be able to implement this BYOK/Offline mode.

  5. sisrnb commented on Jul 7, 2026

    @sisrnb
    Author

    Thank you all for your replies.

    One more question: In the future, without the --acp parameter, will the copilot-language-server respect those COPILOT_PROVIDER_BASE_URL env vars?

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions