Copilot custom models
Route supported chat and agent work through an approved company model.
Use the client's BYOK/custom endpoint interface when available. This controls supported model calls, not every GitHub-hosted feature. A custom endpoint does not replace GitHub sign-in, organization policy or any plan still required for other services.
VS Code configuration
Open the language-model management command, add a Custom Endpoint and select the API family supported by your model. Prefer an explicit full URL. A Responses entry can have this shape:
[{"name":"Company models","vendor":"customendpoint","apiKey":"${input:b2bApiKey}","apiType":"responses","models":[{"id":"gpt-5.4","name":"Approved agent model","url":"https://api.b2b-llm.com/v1/responses","toolCalling":true}]}]
Use the client's credential prompt for the secret. For a Chat Completions workflow, select that API family and /v1/chat/completions instead. Do not advertise tool calling or vision for a model that has not passed the matching capability test.
Limits and utility work
Map context settings from context_window, max_input_tokens and max_output_tokens in the authenticated catalog. A value of zero means unknown, so leave an optional override unset. Titles, summaries and similar utility tasks can use separately selected models; verify the installed client's chat.utilityModel and chat.utilitySmallModel settings instead of assuming the main agent model handles everything.
Organization/enterprise BYOK availability is governed by GitHub's own policy and current client support. Roll out using a dedicated constrained key and test representative tool workflows before enabling the model for an entire team.
Diagnostic sequence
First test the endpoint/model in Playground. Then verify the editor sends the expected path, bearer and model. If basic inference works but agent mode fails, inspect tool capability and request fields. Inline completion or indexing traffic may still use the client's other services. For authorized fixed-endpoint extensions, the interception recipe is an optional compatibility measure, not an authentication bypass.