as-compatible-copilot
其他 活跃维护

as-compatible-copilot

Hoshino-Yumetsuki/as-compatible-copilot

本扩展为VS Code插件,可在GitHub Copilot Chat中直接接入OpenAI、Anthropic、Gemini等主流API服务商,无需修改系统默认配置,快速扩展可用大模型选项,调用过程稳定无兼容问题。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
396 KB
仓库大小
17 天前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:Hoshino-Yumetsuki/as-compatible-copilot
git clone https://github.com/Hoshino-Yumetsuki/as-compatible-copilot.git
git clone git@github.com:Hoshino-Yumetsuki/as-compatible-copilot.git
README.md main
AS Compatible Copilot Logo # AS Provider for Copilot **Use Anthropic, Google Gemini, OpenAI, and any compatible API in VS Code's GitHub Copilot Chat**

License

English | 简体中文

Features

  • Multi-Provider Support: Anthropic Messages, Google Gemini, OpenAI Responses, and OpenAI-compatible Chat Completions (compatible with DeepSeek, SiliconFlow, etc.)
  • Automatic Model Discovery: Automatically enumerates available models via the provider's model list API — no need to manually enter every model ID
  • Reasoning Effort Control: Supports five levels — low / medium / high / xhigh / max — for Anthropic and OpenAI reasoning models
  • Image Input: Enables image context for models with vision capabilities
  • Tool Calling: Enables agent tool-calling for models that support it
  • Visual Configuration UI: Manage Provider Profiles, models, and global settings through a built-in interface or commands — no manual file editing required

Requirements

  • VS Code >= 1.126.0
  • GitHub Copilot extension (with chatProvider and languageModelSystem proposed APIs enabled)

Quick Start

  1. Install AS Provider for Copilot from the VS Code Marketplace.
  2. Press Ctrl+Shift+P and run AS Provider for Copilot: Open Configuration.
  3. Add a Provider Profile, select the provider type, and enter the Base URL.
  4. Enter the API Key for that profile.
  5. Models will automatically appear in Copilot's model picker.

Visual Configuration UI

The extension provides a visual configuration interface to manage Provider Profiles, models, and global settings without editing any files manually.

Open the Configuration UI

Press Ctrl+Shift+P, search for and run AS Provider for Copilot: Open Configuration.

Click to expand: Workflow example 1. **Add a Provider Profile** - Click "Add Profile" on the configuration page - Select the provider type (e.g. `openai-compatible`) - Enter the Base URL (e.g. `https://api.deepseek.com/v1`) - Enter the API Key - After saving, the extension will automatically discover all models for that provider 2. **Add a Model Manually** - If the provider doesn't support a model list API, you can add model configurations manually - Enter the model ID, associate it with a profile, and configure context length, tool calling, image input, etc. as needed 3. **Use in Copilot** - Open GitHub Copilot Chat (`Ctrl+Shift+I`) - Click the model picker and select "Manage Models..." - Choose the **AS Provider for Copilot** vendor - Select a discovered or manually configured model and start chatting

Multi-Provider Management

Each Provider Profile corresponds to a separate upstream API service. You can configure multiple profiles simultaneously and manage API Keys independently for each.

Provider Type Default Base URL Description
anthropic https://api.anthropic.com Anthropic Claude series
google https://generativelanguage.googleapis.com Google Gemini series
openai-responses https://api.openai.com/v1 OpenAI Responses API
openai-compatible User-defined Any OpenAI-compatible endpoint

Reasoning Effort Control

For models that support reasoning (e.g. Claude, GPT), you can configure the reasoning effort level globally or override it per model using Model Overrides:

Level Description
low Minimum reasoning, fastest
medium Balanced (default)
high Higher reasoning depth
xhigh Deep reasoning
max Maximum reasoning effort

You can also use Model Overrides to set contextLength, toolCalling, and imageInput per model without affecting global settings.

Commands

Command Description
AS Provider for Copilot: Open Configuration Open the graphical configuration page
AS Provider for Copilot: Set API Key Set an API Key for a model or profile
AS Provider for Copilot: Delete Configured Entry Delete a configured model or profile
AS Provider for Copilot: Refresh Discovered Models Force-refresh the auto-discovered model list

Development

Click to expand ### Requirements - Node.js latest LTS - Yarn 4.x ### Common Scripts ```bash # Install dependencies yarn install # Full build (clean + WebView + extension) yarn build # Run tests yarn test # Lint yarn lint # Package .vsix yarn build:vsce ``` ### Project Structure ``` src/ core.ts # Type definitions, provider options, message conversion discovery.ts # Automatic model discovery extension.ts # VS Code extension entry point storage.ts # Configuration persistence views/ configView.ts # WebView controller webview/ # Configuration UI frontend (Vue 3) static/ # Built WebView static assets ```

Acknowledgements

Support & License