From c35fdbd42f500af866909e4e896e2c43119d8142 Mon Sep 17 00:00:00 2001 From: Aditi Babar <117682480+Aditi16-ctrl@users.noreply.github.com> Date: Tue, 25 Aug 2026 12:29:22 +0530 Subject: [PATCH 1/4] Update environment variables for model provider configuration Added new environment variables for model provider configuration, including bearer token, wire API, and Azure-specific settings. --- .../customize-copilot/use-byok-models.md | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md b/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md index 7872d4ded2df..50dfdff65ece 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md @@ -46,10 +46,30 @@ You configure your model provider by setting environment variables before starti | Environment variable | Required | Description | |---|---|---| -| `COPILOT_PROVIDER_BASE_URL` | Yes | The base URL of your model provider's API endpoint. | -| `COPILOT_PROVIDER_TYPE` | No | The provider type: `openai` (default), `azure`, or `anthropic`. | -| `COPILOT_PROVIDER_API_KEY` | No | Your API key for the provider. Not required for providers that do not use authentication, such as a local Ollama instance. | -| `COPILOT_MODEL` | Yes | The model identifier to use. You can also set this with the `--model` command-line flag. | + +| `COPILOT_PROVIDER_BASE_URL`| Yes | The base URL of your model provider's API endpoint. | + +| `COPILOT_PROVIDER_TYPE` | No |The provider type: `openai` (default), `azure', or 'anthropic`. | + +I| `COPILOT_PROVIDER_API_KEY`| No |Your API key for the provider. Not required for providers that do not use authentication, such as a local Ollama instance. | + +| `COPILOT_PROVIDER_BEARER_TOKEN`| No | Bearer token used for provider authentication when API-key authentication is not used. | + +| `COPILOT PROVIDER_WIRE_API` | No | Specifies the API protocol used when communicating with the provider. | + +| `COPILOT_PROVIDER_AZURE_API_VERSION` | Azure only | The Azure OpenAI API version used for requests. | + +| `COPILOT_PROVIDER_MODEL_ID` | Azure only | The Azure OpenAI deployment name used to route requests. | + +| `COPILOT_PROVIDER_WIRE_MODEL` | Azure only | The underlying model name associated with the deployment. | + +| `COPILOT_PROVIDER_MAX_PROMPT_TOKENS` | No |Maximum number of prompt tokens allowed in a request. | generated in a response. | + +| `COPILOT_PROVIDER_MAX_OUTPUT_TOKENS`| No | Maximum number of tokens identifier to use. You can also set this with the `--model command-line flag. | + +| `COPILOT_MODEL` | Yes | The model identifier to use. You can also sent this with the `--model` command-line flag.| + + ## Connecting to an OpenAI-compatible endpoint From 44ffbe2dd5037896a566a571ccf920cd888966e2 Mon Sep 17 00:00:00 2001 From: Aditi Babar <117682480+Aditi16-ctrl@users.noreply.github.com> Date: Tue, 25 Aug 2026 12:33:37 +0530 Subject: [PATCH 2/4] Revise documentation for BYOK model configuration Updated environment variable documentation for using custom models in GitHub Copilot CLI. Added Azure-specific variables and corrected formatting issues. --- .../customize-copilot/use-byok-models.md | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md b/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md index 50dfdff65ece..b50cee8d1264 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md @@ -1,3 +1,4 @@ + --- title: Using your own LLM models in GitHub Copilot CLI shortTitle: Use your own model provider @@ -43,33 +44,19 @@ Models must support **tool calling** (also called function calling) and **stream ## Configuring your provider You configure your model provider by setting environment variables before starting {% data variables.copilot.copilot_cli_short %}. - | Environment variable | Required | Description | |---|---|---| - -| `COPILOT_PROVIDER_BASE_URL`| Yes | The base URL of your model provider's API endpoint. | - -| `COPILOT_PROVIDER_TYPE` | No |The provider type: `openai` (default), `azure', or 'anthropic`. | - -I| `COPILOT_PROVIDER_API_KEY`| No |Your API key for the provider. Not required for providers that do not use authentication, such as a local Ollama instance. | - -| `COPILOT_PROVIDER_BEARER_TOKEN`| No | Bearer token used for provider authentication when API-key authentication is not used. | - -| `COPILOT PROVIDER_WIRE_API` | No | Specifies the API protocol used when communicating with the provider. | - +| `COPILOT_PROVIDER_BASE_URL` | Yes | The base URL of your model provider's API endpoint. | +| `COPILOT_PROVIDER_TYPE` | No | The provider type: `openai` (default), `azure`, or `anthropic`. | +| `COPILOT_PROVIDER_API_KEY` | No | Your API key for the provider. Not required for providers that do not use authentication, such as a local Ollama instance. | +| `COPILOT_PROVIDER_BEARER_TOKEN` | No | Bearer token used for provider authentication when API-key authentication is not used. | +| `COPILOT_PROVIDER_WIRE_API` | No | Specifies the API protocol used when communicating with the provider. | | `COPILOT_PROVIDER_AZURE_API_VERSION` | Azure only | The Azure OpenAI API version used for requests. | - | `COPILOT_PROVIDER_MODEL_ID` | Azure only | The Azure OpenAI deployment name used to route requests. | - | `COPILOT_PROVIDER_WIRE_MODEL` | Azure only | The underlying model name associated with the deployment. | - -| `COPILOT_PROVIDER_MAX_PROMPT_TOKENS` | No |Maximum number of prompt tokens allowed in a request. | generated in a response. | - -| `COPILOT_PROVIDER_MAX_OUTPUT_TOKENS`| No | Maximum number of tokens identifier to use. You can also set this with the `--model command-line flag. | - -| `COPILOT_MODEL` | Yes | The model identifier to use. You can also sent this with the `--model` command-line flag.| - - +| `COPILOT_PROVIDER_MAX_PROMPT_TOKENS` | No | Maximum number of prompt tokens allowed in a request. | +| `COPILOT_PROVIDER_MAX_OUTPUT_TOKENS` | No | Maximum number of tokens generated in a response. | +| `COPILOT_MODEL` | Yes | The model identifier to use. You can also set this with the `--model` command-line flag. | ## Connecting to an OpenAI-compatible endpoint @@ -101,17 +88,28 @@ Use the following steps if you are connecting to OpenAI, Ollama, vLLM, Foundry L 1. Set the environment variables for Azure OpenAI. ```shell - export COPILOT_PROVIDER_BASE_URL=https://YOUR-RESOURCE-NAME.openai.azure.com/openai/deployments/YOUR-DEPLOYMENT-NAME + export COPILOT_PROVIDER_BASE_URL=https://YOUR-RESOURCE-NAME.openai.azure.com export COPILOT_PROVIDER_TYPE=azure export COPILOT_PROVIDER_API_KEY=YOUR-AZURE-API-KEY + export COPILOT_PROVIDER_AZURE_API_VERSION=YOUR-AZURE-API-VERSION + export COPILOT_PROVIDER_MODEL_ID=YOUR-DEPLOYMENT-NAME + export COPILOT_PROVIDER_WIRE_MODEL=YOUR-MODEL-NAME export COPILOT_MODEL=YOUR-DEPLOYMENT-NAME ``` Replace the following placeholders: - * `YOUR-RESOURCE-NAME`: your Azure OpenAI resource name - * `YOUR-DEPLOYMENT-NAME`: the name of your model deployment - * `YOUR-AZURE-API-KEY`: your Azure OpenAI API key + * `YOUR-RESOURCE-NAME`: your Azure OpenAI resource name + * `YOUR-DEPLOYMENT-NAME`: the deployment name that receives requests + * `YOUR-MODEL-NAME`: the underlying model associated with the deployment (for example, `gpt-4o`) + * `YOUR-AZURE-API-VERSION`: the Azure OpenAI API version + * `YOUR-AZURE-API-KEY`: your Azure OpenAI API key +### Azure-specific environment variables + +| Variable | Description | +|---|---| +| `COPILOT_PROVIDER_MODEL_ID` | The Azure OpenAI deployment name. Azure OpenAI routes requests through deployments rather than directly through model names. | +| `COPILOT_PROVIDER_WIRE_MODEL` | The underlying model name associated with the deployment. This allows {% data variables.copilot.copilot_cli_short %} to identify model capabilities while Azure routes requests through the deployment specified by `COPILOT_PROVIDER_MODEL_ID`. | {% data reusables.copilot.copilot-cli.start-cli %} @@ -146,3 +144,8 @@ You can run {% data variables.copilot.copilot_cli_short %} in offline mode to pr ``` 1. {% data reusables.copilot.copilot-cli.start-cli %} + + + +The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. The firm is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. + From 1d16e05cdf2b305232bf43889227697689344f11 Mon Sep 17 00:00:00 2001 From: Aditi Babar <117682480+Aditi16-ctrl@users.noreply.github.com> Date: Tue, 25 Aug 2026 12:34:29 +0530 Subject: [PATCH 3/4] Update title and intro for BYOK models documentation --- .../how-tos/copilot-cli/customize-copilot/use-byok-models.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md b/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md index b50cee8d1264..f533f47fac19 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md @@ -1,4 +1,3 @@ - --- title: Using your own LLM models in GitHub Copilot CLI shortTitle: Use your own model provider From 2875e0ac62e62e64d33b66b9afb9b5e0680d0213 Mon Sep 17 00:00:00 2001 From: Aditi Babar <117682480+Aditi16-ctrl@users.noreply.github.com> Date: Tue, 25 Aug 2026 13:15:13 +0530 Subject: [PATCH 4/4] Unnecessary note Unnecessary note --- .../how-tos/copilot-cli/customize-copilot/use-byok-models.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md b/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md index f533f47fac19..d9bfbee70505 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/use-byok-models.md @@ -144,7 +144,3 @@ You can run {% data variables.copilot.copilot_cli_short %} in offline mode to pr 1. {% data reusables.copilot.copilot-cli.start-cli %} - - -The information contained in this communication is intended solely for the use of the individual or entity to whom it is addressed and others authorized to receive it. It may contain confidential or legally privileged information. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. The firm is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. -