Editor Extensions
GitHub Copilot · VS Code
Add a chat model with Custom Endpoint instead of deprecated settings.
Configuration is available with version, account, region or feature restrictions. Read the conditions below first.
On this page
Before you begin
Update VS Code and GitHub Copilot, and confirm your account or organization allows added language models. This guide requires Custom Endpoint support.
Have an A2Agent API key ready and copy an accessible model ID from the catalog. Replace every placeholder, back up existing settings and keep keys out of repositories.
Setup
File contents are usually shared; switching OS changes commands and paths. For WSL on Windows, select macOS / Linux.
01Open model management
Run Chat: Manage Language Models → Add Models → Custom Endpoint. Use A2Agent as the provider name and enter the key.
Open official documentation02Enter the model endpoint
Select Chat Completions. In the generated chatLanguageModels.json, preserve the credential reference and fill the model using these values. Set context and output budgets to match the model.
textAPI type: chat-completions Model URL: https://a2agent.me/v1/chat/completions Model ID: YOUR_MODEL_ID Display name: A2Agent03Select the custom model
Select A2Agent in the Chat model picker. Agent mode requires native tool calling and the corresponding capability declaration.
Capabilities and limits
- Chat models and inline completion are separate. This entry does not replace every Copilot feature.
- github.copilot.chat.customOAIModels is deprecated. Update if the new entry is missing instead of copying older settings.
Verify the connection
Replace every placeholder and run locally. Expect JSON containing OK. Then start a new client conversation, test one read-only tool call separately, and confirm the requests in A2Agent usage records. This test incurs a small amount of model usage.
curl --fail-with-body --silent --show-error --max-time 60 'https://a2agent.me/v1/chat/completions' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_A2AGENT_API_KEY' \
-d '{"model":"YOUR_MODEL_ID","max_tokens":128,"messages":[{"role":"user","content":"Reply with OK."}]}'Troubleshooting
If the model is missing, check its enabled state and JSON validation. An administrator must change policy if BYOK is disabled.
401 / 403: authentication or access denied
Use a key issued by A2Agent, without extra spaces, and check that it is active and unexpired. Confirm the group permits the model and protocol. A vendor subscription credential cannot replace an A2Agent key.
404 / model not found: endpoint or model mismatch
Check the root URL, /v1 prefix and full request path against this guide; avoid duplicated paths. Model IDs are case-sensitive and must be accessible to the current key.
429: quota or rate limit
Check your balance, key limits, concurrent usage and service status. Wait before retrying and reduce simultaneous agents; repeated retries do not remove a quota limit.
Chat works, but tools fail or streaming stops
Test a short text request, then a single read-file tool call. Check tool support, output budget, proxy timeouts and client version. Inspect the diff before resuming a long task to avoid repeating actions.
Restore previous settings
Remove A2Agent and its key from model management, then select the previous model. Remove only its entry from the generated file.
Sources and check date
Status is based on official configuration docs, not end-to-end client testing with A2Agent.
Docs checked 2026-09-18
