Skip to content

Add support for custom model providers for Copilot#48

Open
kaespi wants to merge 2 commits into
little-fort:mainfrom
kaespi:support-custom-model-provider-in-copilot
Open

Add support for custom model providers for Copilot#48
kaespi wants to merge 2 commits into
little-fort:mainfrom
kaespi:support-custom-model-provider-in-copilot

Conversation

@kaespi
Copy link
Copy Markdown

@kaespi kaespi commented Apr 20, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new configuration path to run this Azure DevOps pipeline task with GitHub Copilot CLI backed by a custom model provider (instead of GitHub-hosted models), by introducing new task inputs, validation, and environment variables.

Changes:

  • Add useCustomModelProvider and provider configuration inputs (base URL, provider type, API key) to both prod/dev task definitions.
  • Add TypeScript input validation and export COPILOT_PROVIDER_* environment variables when custom provider mode is enabled.
  • Document the new inputs in the README.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
README.md Documents the new custom model provider inputs for the pipeline task.
CopilotCodeReviewV1/task.json Adds new task inputs and updates visibility rules to support custom model providers.
CopilotCodeReviewV1/index.ts Validates custom-provider inputs and sets env vars consumed by Copilot CLI execution.
CopilotCodeReviewDevV1/task.json Mirrors the new inputs and visibility rules for the dev task.

"name": "copilotProviderApiKey",
"type": "string",
"label": "API Key for the model provider",
"required": false,
Comment on lines +201 to +205
"required": false,
"defaultValue": "",
"helpMarkDown": "Required when using custom model provider in Copilot. Specifies the base URL of the custom model provider's API endpoint.",
"visibleRule": "useCustomModelProvider == true"
},
"name": "copilotProviderApiKey",
"type": "string",
"label": "API Key for the model provider",
"required": false,
Comment on lines +201 to +205
"required": false,
"defaultValue": "",
"helpMarkDown": "Required when using custom model provider in Copilot. Specifies the base URL of the custom model provider's API endpoint.",
"visibleRule": "useCustomModelProvider == true"
},
Comment on lines 90 to +98
@@ -90,7 +94,25 @@ async function run(): Promise<void> {
'Anthropic API Key is required when using Claude Code CLI. Please provide the anthropicApiKey input.');
return;
}
} else if (useCustomModelProvider) {
// copilot CLI with custom model provider
Comment thread README.md
Comment on lines +199 to +201
| `copilotProviderBaseUrl` | No | - | Base URL of custom model provider's API endpoint. Required when using custom model provider in Copilot (see [details](https://docs.github.com/en/copilot/concepts/agents/copilot-cli/about-copilot-cli#using-your-own-model-provider)) |
| `copilotProviderType` | No | - | Custom model provider type. Required when using custom model provider in Copilot (see [details](https://docs.github.com/en/copilot/concepts/agents/copilot-cli/about-copilot-cli#using-your-own-model-provider)) |
| `copilotProviderApiKey` | No | - | Custom model provider API key. Required when using custom model provider in Copilot (see [details](https://docs.github.com/en/copilot/concepts/agents/copilot-cli/about-copilot-cli#using-your-own-model-provider)) |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants