Copilot BYOK `customendpoint` rejects the model `deepseek-flash` with "502 Model not found", while `deepseek-v4-pro` works with the identical configuration. The request never reaches the DeepSeek API.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.8k
- PR merge metrics
- PR metrics pending
Description
- Copilot Chat Extension Version: 1.0.84-4
- Copilot CLI: 0.66
- VS Code Version: 1.138.0
- OS Version: Windows 10
- Feature (e.g. agent/edit/ask mode): ask
- Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): deepseek-flash
- Logs:
"Sorry, your request failed. Please try again.
Client Request Id:
Reason: Failed to get response from the AI model; retried 5 times (total retry wait time: 13.82 seconds) Last error: 502 Model not found"
AND
vscode output(ctrl+shift+u):
"
2026-09-20 16:11:23.133 [info] Logged in as CHICKis
2026-09-20 16:11:23.213 [info] BYOK: Copilot Chat known models list fetched successfully.
2026-09-20 16:11:23.826 [info] Got Copilot token for CHICKis
2026-09-20 16:11:23.826 [info] Copilot Chat: 0.66.0, VS Code: 1.138.0
2026-09-20 16:11:23.955 [info] copilot token sku: free_limited_copilot
2026-09-20 16:11:23.955 [info] ConversationFeature: Activating contributions
2026-09-20 16:11:23.955 [info] GitHub.vscode-pull-request-github extension is not yet activated.
2026-09-20 16:11:23.977 [info] Registering default platform agent...
2026-09-20 16:11:23.980 [info] copilot token sku: free_limited_copilot
2026-09-20 16:11:23.981 [info] [code-referencing] Public code references are enabled.
2026-09-20 16:11:23.981 [info] copilot token sku: free_limited_copilot
2026-09-20 16:11:23.981 [info] [code-referencing] Public code references are enabled.
2026-09-20 16:11:23.982 [info] copilot token sku: free_limited_copilot
2026-09-20 16:11:23.982 [info] [code-referencing] Public code references are enabled.
2026-09-20 16:11:23.982 [info] copilot token sku: free_limited_copilot
2026-09-20 16:11:23.982 [info] [code-referencing] Public code references are enabled.
2026-09-20 16:11:23.990 [info] activationBlocker from 'conversationFeature' took for 1791ms
2026-09-20 16:11:23.991 [info] [context keys] Setting context key: github.copilot-chat.activated
2026-09-20 16:11:23.996 [info] AuthenticationService: firing onDidAuthenticationChange from handleAuthChangeEvent identity change. Has token: true
2026-09-20 16:11:23.997 [info] copilot token sku: free_limited_copilot
2026-09-20 16:11:24.002 [info] GithubAvailableEmbeddingTypesManager: Got embeddings. Primary: metis-1024-I16-Binary. Deprecated:
2026-09-20 16:11:24.006 [info] WorkspaceChunkSearchService: using embedding type metis-1024-I16-Binary
2026-09-20 16:11:24.013 [error] Failed to create database. Falling back to in-memory db: Error: unable to open database file
2026-09-20 16:11:24.339 [info] Fetched model metadata in 2087ms 69894acc-df36-46e0-88c9-ec3dab172f4c
2026-09-20 16:11:24.406 [info] Latest entry: ccreq:latest.copilotmd
2026-09-20 16:11:24.408 [info] ccreq:4192350c.copilotmd | markdown
2026-09-20 16:11:24.457 [info] ConversationFeature: BYOK models available
2026-09-20 16:11:24.457 [info] copilot token sku: free_limited_copilot
"
But, direct API calls from the same machine succeed:
GET /modelsreturns bothdeepseek-flashanddeepseek-v4-pro.POST /chat/completionswith"model": "deepseek-flash"returns a
valid completion.
Steps to Reproduce:
1.Custom endpoint provider with apiType: chat-completions,
URL https://api.deepseek.com. Two entries with identical settings,
only the model id differs (deepseek-flash vs deepseek-v4-pro). such as:
{ "name": "DeepSeek", "vendor": "customendpoint", "apiKey": xxxx, "apiType": "chat-completions", "models": [ { "id": "deepseek-flash", # if use "deepseek-v4-pro" is available. "name": "DeepSeek Flash", "url": "https://api.deepseek.com", "toolCalling": true, "vision": true, "maxInputTokens": 1000000, "maxOutputTokens": 384000 } ] }
2.
- Selecting "DeepSeek Flash" in the model picker fails with:
"Sorry, your request failed... Reason: Failed to get response from the
AI model; retried 5 times (total retry wait time: 15.93 s).
Last error: 502 Model not found" - Nothing is logged when the request fails — the request is rejected
before being sent (consistent with a server-side model allowlist). deepseek-v4-flash(the legacy alias, still routed by DeepSeek to the
same V4.1 Flash model) is rejected too.deepseek-v4-proworks fine.
Suspected cause
Copilot's customendpoint model registry/allowlist has not been updated
with the new deepseek-flash id, and the retired deepseek-v4-flash
was removed.
issue reproduces in both Copilot Chat panel and the Agents window (Ctrl+Shift+A)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named in the issue. Start by locating the customendpoint model registry or allowlist and reproduce the configuration with deepseek-flash, deepseek-v4-flash, and deepseek-v4-pro; trace where the request is rejected before reaching DeepSeek. Done means the current deepseek-flash identifier is accepted and the legacy alias behavior is explicitly verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, api, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100