DeutschlandGPT in VS Code
Use DeutschlandGPT models in VS Code with Claude Code, Cline, Kilo Code or GitHub Copilot, through the Platform API
Coding agents in VS Code can run on DeutschlandGPT models. You point the agent at the Platform API and sign in with an API key. The agent reads and edits files in your project and runs commands on your machine; the model runs at DeutschlandGPT.
These tools use your Platform API credit, not your chat licence. Every request is charged to your workspace like any other API request and shows up in the Dashboard under the key you used. Your chat licence is not used.
Before you start
- An API key. Create one under API Keys as described in the Quickstart. Use a separate key for coding, for example
vscode, so its usage is easy to tell apart. A spending limit on that key caps what an agent can spend. - Credit. On a prepaid workspace, requests only run while there is credit. Without credit, every request, including the model list, is refused with
402. - The base URL. Coding tools use one of the two surfaces:
| Surface | Hosted | Self-hosted | Used by |
|---|---|---|---|
| Anthropic-compatible | https://api.deutschlandgpt.de/anthropic | https://<your-domain>/platform-api/api/anthropic | Claude Code |
| OpenAI-compatible | https://api.deutschlandgpt.de/v2 | https://<your-domain>/platform-api/api/v2 | Cline, Kilo Code, Copilot |
- A model with tool calling. Agents read files and run commands through tool calls, so the model must support them. Models lists the exact model IDs your key can use; enter them exactly as listed.
Claude Code
Claude Code works against our Anthropic-compatible endpoint with every model your key can use, not only Claude: we tested it with Claude, GPT, Gemini, Mistral, gpt-oss and Qwen models. Claude Code is Anthropic's tool; we support it against our endpoint. It comes as a command-line tool and as a VS Code extension, and both read the same settings.
Set these environment variables, for example in ~/.claude/settings.json under env:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.deutschlandgpt.de/anthropic",
"ANTHROPIC_API_KEY": "<your API key>",
"ANTHROPIC_MODEL": "<model-id>",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "<model-id>",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "<model-id>",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "<model-id for quick background tasks>",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
}
}
- The model picker shows aliases. Claude Code's
/modelmenu offersopus,sonnetandhaiku. The threeANTHROPIC_DEFAULT_…_MODELvariables decide which of our models each alias calls, so set all three. The menu keeps showing Anthropic's names for the aliases; the request goes to the model you mapped. - Notices you can ignore. For a model ID it doesn't know, Claude Code prints that it assumes a context window of 200,000 tokens. For some Claude IDs it may also show a notice that an older Claude model was retired. Neither affects the request: it goes to the model ID you set.
- Background tasks such as titles and summaries use the
haikualias. Map it to a fast, inexpensive model. - In the VS Code extension you can also set the variables under the extension setting
claudeCode.environmentVariablesinstead ofsettings.json. CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1switches off Claude Code's own telemetry, error reporting and update checks, so only the model requests leave your machine.
Cline
Cline is open source and the default choice if you want an open-source agent.
- Open Cline's settings and choose the API provider OpenAI Compatible.
- Base URL:
https://api.deutschlandgpt.de/v2. - API Key: your API key.
- Model ID: an exact model ID from Models. Cline also fetches the list itself once the base URL and key are filled in.
- Context window size: Cline does not read it from us and starts at 128,000 tokens. Keep that unless you know the model's window; a smaller value is safe, it only makes Cline condense the conversation earlier. A value above the model's real window makes long tasks fail.
Prices shown in Cline stay at zero, because Cline doesn't know our prices. What a task cost appears in the Dashboard.
Check the approvals. Cline approves many actions on its own by default, in recent versions including reading and editing files. Open the auto-approve menu above the chat input and switch off what you want to confirm yourself, at least editing files and running commands.
Kilo Code
Kilo Code is open source too.
- Open Settings, go to Providers and click Custom provider at the bottom.
- Provider API: OpenAI Compatible.
- Base URL:
https://api.deutschlandgpt.de/v2. - API key: your API key. Kilo Code then fetches the model list; select the models you want.
- Click Submit. The models appear in Kilo Code's model picker.
Kilo Code's own telemetry follows VS Code's telemetry setting (see below).
GitHub Copilot
GitHub Copilot in VS Code can use our models as a Custom Endpoint ("bring your own key"). It works without a Copilot plan and without signing in to GitHub. In a Copilot Business or Enterprise organisation, your GitHub administrator must allow bring-your-own-key models first.
- In the chat's model picker, open Manage Language Models (or run Chat: Manage Language Models from the Command Palette).
- Click Add Models and choose Custom Endpoint. Enter a name and your API key, and choose the API type Chat Completions.
- VS Code opens
chatLanguageModels.json. Add one entry per model:
{
"id": "<model-id>",
"name": "<model-id> (DeutschlandGPT)",
"url": "https://api.deutschlandgpt.de/v2/chat/completions",
"toolCalling": true,
"vision": false,
"maxInputTokens": 128000,
"maxOutputTokens": 16000
}
- Select the model in the chat's model picker. Agent mode only lists models with
"toolCalling": true. - Without a GitHub sign-in, VS Code asks you to Set BYOK utility models. Click Configure and choose one of your DeutschlandGPT models, ideally a fast one: VS Code uses it for small tasks such as chat titles and commit messages.
Using the Responses API instead. Set the API type to Responses, use https://api.deutschlandgpt.de/v2/responses as url and add "statefulResponses": false. Our API is stateless; without that line, Copilot first tries to continue the previous response, gets a 400, and then resends the whole conversation, which costs an extra round trip on every turn.
Code completions as you type, and Copilot features that rely on GitHub's own search, are not available through a custom endpoint. That is a limit of Copilot, not of the API.
Professional secrecy (§203) and telemetry
If your organisation is subject to professional secrecy, every API key is limited to GDPR-compliant models covered by your §203 addendum (see Permissions). That holds whichever tool sends the request.
The tools themselves can also send data to their makers. We can't switch that off from our side, so do it in each tool:
| Tool | What to switch off |
|---|---|
| VS Code | Setting Telemetry: Telemetry Level to off. Kilo Code and other extensions follow it. |
| Claude Code | CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 (see above) |
| Cline | In Cline's settings, Allow error and usage reporting |
| Copilot | VS Code's telemetry level (see the first row) |
Also review each tool's auto-approve settings, so nothing runs or changes files without your confirmation.
Troubleshooting
402: the workspace has no credit left, or a monthly or per-key limit is reached. See Billing.404on the Anthropic endpoint: the base URL must end in/anthropic, not/v2/anthropic. Claude Code appends/v1/messagesitself.- Model not found: use the model ID exactly as Models lists it. Display names don't work as IDs.
- The agent never calls a tool: pick a model that supports tool calling.