
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@vscode/copilot-api
Advanced tools
A module used for interacting with the GitHub Copilot API.
With npm:
npm install @vscode/copilot-api
With yarn:
yarn add @vscode/copilot-api
import { CAPIClient, RequestType } from '@vscode/copilot-api';
// Create a new client instance
const client = new CAPIClient(editorDetails, license, optionalFetcherService);
// Update domains (if needed)
const domainChanges = client.updateDomains(copilotToken, enterpriseUrlConfig);
// Make requests
const response = await client.makeRequest(fetchOptions, RequestType.ChatCompletions);
RequestType.CopilotToken - Get Copilot tokenRequestType.ChatCompletions - Chat completionsRequestType.RemoteAgent - Remote agent requestsRequestType.Embeddings - EmbeddingsRequestType.Models - Available modelsRequestType.Chunks - Code chunksRequestType.EmbeddingsCodeSearch - Embeddings code searchRequestType.ListSkills - List available skillsRequestType.SearchSkill - Search skillsRequestType.ContentExclusion - Content exclusionRequestType.Telemetry - TelemetryRequestType.CopilotUserInfo - User infoRequestType.OriginTracker - Origin trackingThe package is built using esbuild to create a single platform-neutral ESM module that works in both Node.js and web environments:
# Build for production (minified)
npm run build
# Build for development (unminified)
npm run build:dev
# Clean build artifacts
npm run clean
dist/index.js - Platform-neutral ESM builddist/index.d.ts - TypeScript declarationsThe package is configured with a simplified ESM export structure:
{
"exports": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
}
This project uses Vitest for testing. Run tests with:
# Run tests once
npm test
# Run tests in watch mode
npm run test:watch
FAQs
A module used for interacting with the GitHub Copilot API.
The npm package @vscode/copilot-api receives a total of 144,638 weekly downloads. As such, @vscode/copilot-api popularity was classified as popular.
We found that @vscode/copilot-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.