GitHub Copilot in VS Code can use Tresor through VS Code's Custom Endpoint provider. This setup follows the official VS Code language model flow: open Manage Language Models, add a Custom Endpoint, then save the generated chatLanguageModels.json config.
1.122 or newer for this flow. VS Code added the Custom Endpoint provider to Stable in version 1.122. If you do not see Custom Endpoint under Add Models, update VS Code first.Open Copilot Chat in VS Code, click the current model picker at the bottom of the chat view, and select Manage Models.
You can also open it from the Command Palette with Chat: Manage Language Models.
In the Language Models editor, click Add Models and select Custom Endpoint.

VS Code then prompts for the initial provider details:
TresorAIGLM-5.2Chat CompletionsAfter that, VS Code opens chatLanguageModels.json so you can finish the model definition.
Use this configuration as the working model definition:
[
{
"name": "TresorAI",
"vendor": "customendpoint",
"apiKey": "${input:chat.lm.secret.<generated-id>}",
"apiType": "chat-completions",
"models": [
{
"id": "global/redpill/glm-5.2",
"name": "GLM-5.2",
"url": "https://api.tresor.co/v1/chat/completions",
"toolCalling": true,
"vision": false,
"maxInputTokens": 128000,
"maxOutputTokens": 16000
}
]
}
]
Keep the apiKey reference that VS Code generates for you. The exact ${input:chat.lm.secret.<generated-id>} value is machine-specific, so your suffix will differ from other examples.
The important fields are:
vendor: "customendpoint" so VS Code treats it as a Custom Endpoint providerapiType: "chat-completions" because Tresor exposes an OpenAI-compatible chat completions endpoint hereid: "global/redpill/glm-5.2" because that is the public model identifier exposed by Tresor's /v1/models APItoolCalling: true so the model is available for agent and tool-enabled chat flowsvision: false because this model should not be advertised to VS Code as vision-capableurl: "https://api.tresor.co/v1/chat/completions" so requests go to TresorSave chatLanguageModels.json, return to Copilot Chat, and select GLM-5.2 from the model picker.
If the model does not appear immediately, restart VS Code. The official VS Code docs call this out as the fallback for newly added Custom Endpoint models.
Once selected, Copilot Chat sends that chat model's requests through Tresor.