From 9a7a2751e4b6b5fe040cb055397fc478de9e9275 Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 27 Apr 2026 16:34:37 +0900 Subject: [PATCH] feat(providers): split microsoft api_key_env from github-copilot (#83) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both `microsoft` (GitHub Models / Azure AI Inference at models.inference.ai.azure.com) and `github-copilot` (the IDE subscription product) previously declared `api_key_env = "GITHUB_TOKEN"`, so a single PAT silently activated both providers — users with only the IDE subscription saw GitHub Models entries appear in their model picker without intent, and vice versa. Rename `microsoft` to `GITHUB_MODELS_TOKEN`. `github-copilot` keeps `GITHUB_TOKEN` as the established convention for the IDE side. Existing users who set `GITHUB_TOKEN` to use the GitHub Models endpoint will see the `microsoft` provider become unavailable until they set the new env var. The librefang daemon will be updated separately to recognize `GITHUB_TOKEN` as a deprecated fallback for `microsoft` during a migration window, mirroring the legacy-fallback infrastructure added in librefang/librefang#3279. Refs librefang/librefang#3278 --- providers/microsoft.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/providers/microsoft.toml b/providers/microsoft.toml index 117888a..79204c8 100644 --- a/providers/microsoft.toml +++ b/providers/microsoft.toml @@ -1,9 +1,15 @@ # microsoft — auto-generated from OpenRouter API +# +# This entry is GitHub Models / Azure AI Inference (https://models.inference.ai.azure.com), +# distinct from the `github-copilot` IDE-subscription product even though both +# physically accept a GitHub Personal Access Token. Each now has its own env so +# users with only one product configured don't see the other appear in the model +# picker. See librefang/librefang#3278. [provider] id = "microsoft" display_name = "Microsoft" -api_key_env = "GITHUB_TOKEN" +api_key_env = "GITHUB_MODELS_TOKEN" base_url = "https://models.inference.ai.azure.com" key_required = true