Compatibility: works with caveats. VS Code's chat has a built-in Custom Endpoint model provider, part of its "bring your own key" (BYOK) support. It can call any endpoint that speaks the Chat Completions API, which luv13 does. Set the API type to Chat Completions. The other two types, Responses and Messages, call endpoints luv13 doesn't serve. BYOK covers chat and utility tasks only. Inline suggestions, semantic search and embedding-based features still need GitHub Copilot.
Before you start
You need:
- VS Code. These steps follow the VS Code docs page "AI language models in VS Code", dated 9/30/2026. The latest stable VS Code release that day was 1.140.0.
- A luv13 API key. The Quickstart shows how to get one.
- The model id
luv13/glm-5.3-flash, from the live list athttps://api.luv13.ai/v1/models. See GLM-5.3 Flash for details on the model. - Optional: a GitHub account. VS Code's docs say BYOK models work without a GitHub account or Copilot plan, but some features then need extra setup (see "Utility tasks" below).
- On Copilot Business or Enterprise: your admin must enable the Bring Your Own Language Model Key in VS Code policy on GitHub.com.
Facts about luv13 that affect this setup:
- luv13 serves one generation endpoint,
POST /v1/chat/completions, plusGET /v1/models./v1/responses,/v1/messages,/v1/completionsand/v1/embeddingsreturn 404 (checked 2026-09-30). See Endpoints. - Every model costs a flat $0.33 per 1M tokens, input the same as output. See Pricing.
- The model list at
https://api.luv13.ai/v1/modelsdoesn't report context length, so luv13 publishes no per-model limits. See the model list.
Test your key and model first
Run these two checks in a terminal before you touch the tool. They take a few seconds and rule out key and model problems.
1. The model id exists. This call needs no key:
curl -s https://api.luv13.ai/v1/modelsThe list should include "id":"luv13/glm-5.3-flash".
2. Your key works for chat. Set the key in your shell first (export LUV13_API_KEY="your luv13 key"), then run:
curl -s https://api.luv13.ai/v1/chat/completions \
-H "Authorization: Bearer $LUV13_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "luv13/glm-5.3-flash",
"messages": [{"role": "user", "content": "Reply with the word ready."}],
"max_tokens": 20
}'With a valid key you should get back a JSON chat completion whose choices[0].message.content holds the reply, plus a usage block. If you see {"error":{"code":401,"message":"unauthorized","type":"invalid_auth"}} instead, the key is missing or wrong, and no tool setting will fix that.
Set up the Custom Endpoint provider
- Open the Chat view. In the model picker, select Manage Language Models (gear icon), or run Chat: Manage Language Models from the Command Palette.
- Select Add Models, then choose Custom Endpoint from the list.
- Enter a group name, such as
luv13. This label groups the models in the model picker. - Enter a display name and your luv13 API key.
- When asked for the API type, choose Chat Completions.
- VS Code opens
chatLanguageModels.json. Make the luv13 entry look like this, then save:
[
{
"name": "luv13",
"vendor": "customendpoint",
"apiKey": "${input:luv13ApiKey}",
"apiType": "chat-completions",
"models": [
{
"id": "luv13/glm-5.3-flash",
"name": "GLM 5.3 Flash (luv13)",
"url": "https://api.luv13.ai/v1/chat/completions",
"toolCalling": true,
"vision": false,
"streaming": true
}
]
}
]- Pick GLM 5.3 Flash (luv13) in the chat model picker. If it doesn't appear, restart VS Code, as the docs suggest.
What each field does
| Field | Value for luv13 | Why |
|---|---|---|
vendor | customendpoint | Selects the Custom Endpoint provider. |
apiKey | ${input:luv13ApiKey} | VS Code's docs recommend an input variable so the raw key never sits in the file. If VS Code already filled this in from step 4, keep what it wrote, as long as it isn't your raw key. |
apiType | chat-completions | The only API type luv13 serves. responses and messages would call /v1/responses or /v1/messages, which return 404. |
id | luv13/glm-5.3-flash | Sent to luv13 as the model field, so it must match the live list exactly. |
url | https://api.luv13.ai/v1/chat/completions | The full endpoint. VS Code uses a URL that already contains /chat/completions as-is. |
toolCalling | true | Needed for the model to show up for agents. Set it to false if tool calls fail and you only want plain chat. |
vision | false | luv13 hasn't confirmed image input. See Image Input. |
streaming | true | VS Code's default. See Streaming on luv13. |
About token limits
VS Code's reference lists maxInputTokens, maxOutputTokens and contextWindow to describe a model's context window. luv13 doesn't publish context lengths, so this page leaves them out rather than invent numbers. If your VS Code version refuses to save the model without them, enter conservative values you've tested, and treat them as your own estimate. See Context Window.
What works and what doesn't
| VS Code feature | Uses luv13? |
|---|---|
| Chat (ask and edit) | Yes |
| Agent mode | Only if toolCalling is true, and only as well as the model handles tool calls |
| Inline chat | Yes, if you choose the luv13 model, or set it with inlineChat.defaultModel |
| Utility tasks (titles, commit messages and so on) | Optional, through chat.utilityModel and chat.utilitySmallModel |
| Inline suggestions (code completions) | No. VS Code's docs say these can't use BYOK models. |
| Semantic search and embedding-based features | No. These need GitHub Copilot, and luv13 serves no embeddings. |
Utility tasks
VS Code also uses small background models for titles, commit messages and similar tasks. With a Copilot account these default to GitHub's models. If you use luv13 without signing in to GitHub, VS Code shows a notice asking you to configure utility models. You can set chat.utilityModel and chat.utilitySmallModel to the luv13 model, or set chat.byokUtilityModelDefault to Main Agent Model. Either way, those background requests are billed by luv13 like any other tokens.
Another option: an extension
If you'd rather not use VS Code's built-in chat, the Continue and Cline extensions both run in VS Code and support OpenAI-compatible endpoints. See Using Continue and Using Cline.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
401 with {"error":{"code":401,"message":"unauthorized","type":"invalid_auth"}} | The key is missing, has extra spaces, or isn't a luv13 key. | Paste your luv13 key again. Run test 2 above to confirm it. |
404 with an HTML page titled "404 Not Found" | The URL is wrong. Common versions: https://api.luv13.ai with no /v1, a doubled path such as https://api.luv13.ai/v1/v1/..., a pasted full endpoint like .../v1/chat/completions in the base URL field, or a trailing slash. | Set the base URL to exactly https://api.luv13.ai/v1. The tool adds /chat/completions itself. |
404 even though the base URL is right | The tool is calling an endpoint luv13 doesn't serve, such as /v1/responses, /v1/messages, /v1/completions or /v1/embeddings. | Use the tool's OpenAI chat-completions mode, and turn off features that need other endpoints. See Endpoints. |
| Model not found, or the model doesn't appear | The model id is misspelled or missing the luv13/ prefix. | Use the exact id luv13/glm-5.3-flash from https://api.luv13.ai/v1/models. |
404 right after adding the model | apiType is responses or messages, so VS Code called /v1/responses or /v1/messages. | Set "apiType": "chat-completions" at both the provider and model level, or remove the model-level value. |
404 with a doubled path | The url has an extra version segment, such as https://api.luv13.ai/v1/v1/chat/completions. VS Code only adds /v1 when the URL doesn't already end in a version segment. | Use exactly https://api.luv13.ai/v1/chat/completions. |
| The luv13 model is missing in agent mode | VS Code's docs say models without tool calling are hidden for agents. | Set "toolCalling": true, save and restart VS Code. |
| The model doesn't appear anywhere | VS Code hasn't reloaded the file, or the model is hidden. | Restart VS Code. In the Language Models editor, check the eye icon so it's visible. |
| Add Models or Custom Endpoint is missing | On Copilot Business or Enterprise, the BYOK policy is off. | Ask your GitHub admin to enable Bring Your Own Language Model Key in VS Code. |
| The picker only shows Auto | The workspace is untrusted (Restricted Mode). | Trust the workspace. |
| A notice about utility models | You're using BYOK without a GitHub sign-in. | Set chat.utilityModel and chat.utilitySmallModel, or chat.byokUtilityModelDefault, as described above. |
General tip: if agent requests fail but plain chat works, set "toolCalling": false to confirm that tool calls are the problem, then see Tool Calling on luv13.
Sources
- VS Code docs, "AI language models in VS Code" (page dated 9/30/2026, read 2026-09-30). Covers BYOK, the Custom Endpoint provider, its configuration reference, URL resolution and utility models.
- VS Code release list (latest stable 1.140.0 on 2026-09-30)
- luv13 endpoints and errors checked live with curl on 2026-09-30.
Related: Using Cursor, Base URL, OpenAI-Compatible APIs.
