8f1d71d913930ca322ba42eeb8667f2cb9b37989
Cancellation was only checked at POST time; once the SSE stream was open the reader loop never looked at the token again, so a stopped chat kept generating server-side (and billing) until the response ended. Wire an AbortController to token.onCancellationRequested, pass its signal to fetch, and check token.isCancellationRequested at the top of the reader loop so the connection closes as soon as the user stops the request. AbortError is swallowed (a stop is not a failure); real HTTP errors still surface, and the cancellation listener is disposed in a finally.
Inference Coop for Copilot Chat
Official model provider for inference.coop, usable in GitHub Copilot Chat. An official project of the Inference Cooperative, maintained in the co-op's Git at code/inference-coop-copilot.
Requirements
- VS Code 1.145 or newer
- GitHub Copilot Chat, installed and signed in
- A co-op membership and API key
Copilot Business/Enterprise: your administrator must leave "Bring Your Own Language Model Key" enabled, or these models will not appear.
Setup
- Run Inference Coop: Set API Key from the Command Palette and paste your co-op key. It is stored in VS Code's secret storage, not in settings.
- Open Copilot Chat, click the model name, and pick an
inference-coop/…model. Tool calling works, so agent mode is usable.
To use a different gateway, set inferenceCoop.baseUrl. To sign out, run
Inference Coop: Sign Out.
Limitations
- No image input; models are advertised as text-and-tools only.
- Token counts are estimated rather than computed with a real tokenizer, so context budgeting is approximate.
- No inline code completions. Copilot does not support third-party providers for completions; this extension only adds chat models.
License
Description
VSCode plugin to add inference.coop models to the CoPilot chat
348 KiB
0 Stars
1 Watchers
1 Forks
Languages
TypeScript
87%
JavaScript
13%