OpenAI到语言模型API桥 是 AI Skill Hub 本期精选Agent工作流之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
OpenAI兼容API在Copilot中使用
OpenAI到语言模型API桥 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
OpenAI兼容API在Copilot中使用
OpenAI到语言模型API桥 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:npm 全局安装 npm install -g oai2lmapi # 方式二:npx 直接运行(无需安装) npx oai2lmapi --help # 方式三:项目依赖安装 npm install oai2lmapi # 方式四:从源码运行 git clone https://github.com/hugefiver/OAI2LMApi cd OAI2LMApi npm install npm start
# 命令行使用
oai2lmapi --help
# 基本用法
oai2lmapi [options] <input>
# Node.js 代码中使用
const oai2lmapi = require('oai2lmapi');
const result = await oai2lmapi.run(options);
console.log(result);
# oai2lmapi 配置说明 # 查看配置选项 oai2lmapi --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export OAI2LMAPI_CONFIG="/path/to/config.yml"
Ctrl+Shift+P / Cmd+Shift+P){
"oai2lmapi.apiEndpoint": "https://api.openai.com/v1",
"oai2lmapi.autoLoadModels": true,
"oai2lmapi.showModelsWithoutToolCalling": false,
"oai2lmapi.enableGeminiChannel": true,
"oai2lmapi.geminiApiEndpoint": "https://generativelanguage.googleapis.com",
"oai2lmapi.enableClaudeChannel": true,
"oai2lmapi.claudeApiEndpoint": "https://api.anthropic.com/v1",
"oai2lmapi.modelOverrides": {
"gemini-2.0-flash-thinking-exp": {
"thinkingLevel": "auto",
"usePromptBasedToolCalling": true
},
"claude-*": {
"maxOutputTokens": 8192
}
},
"oai2lmapi.channelModelOverrides": {
"openai": {
"gpt-4o": {
"temperature": 0.7
}
},
"claude": {
"claude-3.7*": {
"thinkingLevel": "high"
}
}
}
}
Configure the extension through VSCode settings (Ctrl+, or Cmd+,):
| Setting | Default | Description |
|---|---|---|
oai2lmapi.apiEndpoint | https://api.openai.com/v1 | OpenAI-compatible API endpoint URL |
oai2lmapi.autoLoadModels | true | Automatically load models from API on startup |
oai2lmapi.showModelsWithoutToolCalling | false | Show models that do not support tool/function calling |
oai2lmapi.openaiResponsesApiMode | off | When to use the OpenAI Responses API: off, gpt-only (GPT models only), or all |
oai2lmapi.suppressChainOfThought | false | Strip <think>...</think> blocks and suppress reasoning_content/thinking fields from responses |
oai2lmapi.trimXmlToolParameterWhitespace | false | Trim leading/trailing whitespace from XML-based tool call parameter values |
| Setting | Default | Description |
|---|---|---|
oai2lmapi.enableGeminiChannel | false | Enable the Gemini channel provider |
oai2lmapi.geminiApiEndpoint | https://generativelanguage.googleapis.com | Google Gemini API endpoint URL |
| Setting | Default | Description |
|---|---|---|
oai2lmapi.enableClaudeChannel | false | Enable the Claude channel provider |
oai2lmapi.claudeApiEndpoint | "" (empty) | Anthropic Claude API endpoint URL. If empty and the OpenAI endpoint is set to a custom OpenAI-compatible API, that endpoint is used for Claude requests. Defaults to https://api.anthropic.com/v1 at runtime when left empty. |
A VSCode extension that connects OpenAI-compatible APIs to VSCode's Language Model API, enabling integration with GitHub Copilot Chat and other AI-powered features in VSCode.
The API key is stored securely using VSCode's built-in SecretStorage. Use the OAI2LMApi: Set API Key command to set your key.
Note: If you previously stored an API key in settings (the deprecated oai2lmapi.apiKey setting), it will be automatically migrated to secure storage.
This extension works with any API that implements the OpenAI chat completions format:
/v1/models and /v1/chat/completionsCtrl+Shift+X / Cmd+Shift+X)Or install directly via VS Code Marketplace.
本项目提供了以下功能: - 支持任何兼容 OpenAI API 的 API 端点 - 原生支持 Google Gemini API - 与 VSCode 内置语言模型功能无缝集成 - 实时流式响应以改善用户体验 - 支持思考和推理
环境依赖与系统要求: - VSCode 版本 1.107.0 或更高 - 兼容 OpenAI 的 API 端点 - API 密钥用于身份验证
安装步骤: 1. 安装扩展 2. 打开命令面板(Ctrl+Shift+P / Cmd+Shift+P) 3. 运行 OAI2LMApi: Set API Key 并输入 API 密钥 4. (可选) 如果不使用 OpenAI,配置 API 端点 5. 模型将自动加载并在 GitHub Copilot Chat 中可用
使用教程: 1. 安装扩展 2. 打开命令面板(Ctrl+Shift+P / Cmd+Shift+P) 3. 运行 OAI2LMApi: Set API Key 并输入 API 密钥 4. (可选) 如果不使用 OpenAI,配置 API 端点 5. 模型将自动加载并在 GitHub Copilot Chat 中可用
配置说明: 基本设置 | 设置 | 默认值 | 描述 | | --- | --- | --- | | oai2lmapi.apiEndpoint | https://api.openai.com/v1 | OpenAI 兼容 API 端点 URL | | oai2lmapi.autoLoadModels | true | 自动加载模型 | Gemini 设置 | 设置 | 默认值 | 描述 | | --- | --- | --- | | oai2lmapi.enableGeminiChannel | false | 启用 Gemini 通道提供者 | | oai2lmapi.geminiApiEndpoint | https://generativelanguage.googleapis.com | Google Gemini API 端点 URL |
OAI2LMApi - OpenAI 到语言模型 API 桥接 API 密钥存储: API 密钥使用 VSCode 内置的 SecretStorage 进行安全存储。使用 OAI2LMApi: Set API Key 命令设置您的密钥。 > 注意:如果您以前在设置中存储了 API 密钥(已弃用的 oai2lmapi.apiKey 设置),它将自动迁移到安全存储。
工作流 / 模块说明: 扩展未激活 - 确保您正在使用 VSCode 1.107.0 或更高版本 - 验证扩展是否在扩展视图中启用
常见问题解答: 扩展未激活 - 确保您正在使用 VSCode 1.107.0 或更高版本 - 验证扩展是否在扩展视图中启用
OpenAI2LMApi是一个开源的AI工作流,提供了OpenAI兼容API在Copilot中的使用,具有较高的使用价值,但需要进一步的优化和完善
该工具使用 NOASSERTION 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
📄 NOASSERTION — 请查阅原始协议条款了解具体使用限制。
经综合评估,OpenAI到语言模型API桥 在Agent工作流赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | OAI2LMApi |
| 原始描述 | 开源AI工作流:OpenAI to Language Model API Bridge - Use OpenAI-Compatible API in Copilot - VSc。⭐10 · TypeScript |
| Topics | workflowai-agentscopilottypescript |
| GitHub | https://github.com/hugefiver/OAI2LMApi |
| License | NOASSERTION |
| 语言 | TypeScript |
收录时间:2026-06-08 · 更新时间:2026-06-08 · License:NOASSERTION · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端