documents/dev/code-server.md
Table of Contents
code-server
Server config
~/.config/code-server/config.yaml — server host, port, and auth:
bind-addr: 0.0.0.0:8081
auth: password
password: PASSWORD
cert: false
User config
Directory: ~/.local/share/code-server/User/
settings.json
{
"workbench.colorTheme": "Experimental Dark",
"oaicopilot.baseUrl": "https://api.deepseek.com/v1",
"oaicopilot.models": [
{
"id": "deepseek-v4-flash",
"name": "DeepSeek V4 Flash",
"provider": "DeepSeek",
"owned_by": "deepseek",
"include_reasoning_in_request": true,
"thinking": { "type": "enabled" }
},
{
"id": "deepseek-v4-pro",
"name": "DeepSeek V4 Pro",
"provider": "DeepSeek",
"owned_by": "deepseek",
"include_reasoning_in_request": true,
"thinking": { "type": "enabled" }
}
],
"oaicopilot.retry": {
"enabled": true,
"max_attempts": 3,
"interval_ms": 1000,
"status_codes": []
},
"chat.viewSessions.orientation": "stacked",
"workbench.startupEditor": "none",
"chat.mcp.discovery.enabled": {
"cursor-global": true
},
"editor.fontFamily": " Menlo, Monaco, Courier New, monospace",
"vim.insertModeKeyBindings": [
{
"before": ["j", "j"],
"after": ["<Esc>"]
}
],
"git.openRepositoryInParentFolders": "never"
}
mcp.json
File: ~/.local/share/code-server/User/mcp.json
{
"servers": {
"qwestly": {
"type": "stdio",
"command": "node",
"args": [
"/Users/dominick/Work/llm/qwestly-mcp-dev/src/index.js"
]
}
},
"inputs": []
}
OAI Compatible Provider for Copilot
Extension marketplace ID: johnny-zhao.oaicopilot — OAI Compatible Provider for Copilot by johnny-zhao.
Allows using any OpenAI-compatible API as a Copilot chat model provider. The oaicopilot.* settings in settings.json configure it:
oaicopilot.baseUrl— the API endpoint (e.g.https://api.deepseek.com/v1)oaicopilot.models— list of model IDs to expose in the chat model picker
This is what enables deepseek-v4-flash and deepseek-v4-pro in the Copilot chat dropdown.
DeepSeek reasoning_content fix
Problem: In multi-turn conversations with DeepSeek models, the assistant's reasoning_content was dropped on subsequent requests because include_reasoning_in_request defaults to false. When thinking: { type: "enabled" } is set, DeepSeek's API requires that prior assistant reasoning_content be passed back in the conversation history. Without it, the API returns: "The reasoning_content in the thinking mode must be passed back to the API." (400 Bad Request)
Config fix (settings.json): Added "include_reasoning_in_request": true to both model entries.
Plugin patches (extension directory: ~/.local/share/code-server/extensions/johnny-zhao.oai-compatible-copilot-0.3.6/out/):
-
provider.js:138-140— Auto-detect when reasoning content must be preserved. Ifinclude_reasoning_in_requestis not explicitly set, it now defaults totruewhenthinking.type === "enabled"orenable_thinking === true:includeReasoningInRequest: um?.include_reasoning_in_request ?? (um?.thinking?.type === "enabled" || um?.enable_thinking === true), -
openai/openaiApi.js:98-100— Removed the"Next step."fallback placeholder. Reasoning content is now only set when actual thinking content exists in the message, avoiding fabricated placeholders:if (modelConfig.includeReasoningInRequest && joinedThinking) { assistantMessage.reasoning_content = joinedThinking; }
These patches make the explicit include_reasoning_in_request config setting technically optional — the plugin now infers it from the thinking configuration.
Important: After editing settings.json or plugin files, reload the code-server window (Command Palette → "Developer: Reload Window" or Cmd+R).
Other files in User/
caches/globalStorage/History/workspaceStorage/snippets/machineidcustomBuiltinExtensionsCache.jsonsystemExtensionsCache.json