Code Generation
AI coding agents and coding assistants such as Visual Studio Code Copilot Chat, OpenCode, Claude Code, Codex, and DeepSeek Harness normally send every request — including your source code — to the cloud service of their vendor. If your code must not leave your own infrastructure, you can point these tools at adito-code, a coding model served by the ADITO AI Runtime. All requests then stay on ADITO Cloud infrastructure in Germany, and no data is sent to external AI services.
This guide shows how to configure these tools so the self-hosted model is available on demand, without breaking your regular vendor-hosted setup.
Prerequisites
- An ADITO AI API key. Managed cloud systems receive a system API key at startup; if you need a personal key, contact the AI team.
- One of the supported clients installed: Visual Studio Code with Copilot Chat,
OpenCode, Claude Code (current version), Codex 0.143 or later, or DeepSeek
Harness (
dsh).
Keep your API key confidential. Do not commit it to repositories or expose it in client-side code.
Model
| Model ID | adito-code |
| Base model | Qwen3.6-35B-A3B-NVFP4-Fast |
| Hosting | ADITO Cloud infrastructure, Germany |
| Base URL | https://ai.adito.cloud |
| Interfaces | OpenAI-compatible Chat Completions API (used by Visual Studio Code Copilot Chat, OpenCode, and DeepSeek Harness), Anthropic Messages API (used by Claude Code), OpenAI Responses API (used by Codex) |
| Context window | 262,144 tokens (prompt and response combined) |
adito-code is served from the same model deployment as the adito-llm-brizo text-generation codename — same base model, same quantization. What differs are the default request parameters: most notably, adito-code is served with thinking enabled, where the text-generation codenames have it off. See Default request parameters below.
Code generation follows the same naming and deprecation scheme as the other model kinds, with one restriction: adito-code is served through its floating alias only, so there is no pinned codename to fix the version against yet. See Model naming and versioning.
Default request parameters
Coding agents set most generation parameters themselves, so these defaults mainly apply to direct API calls and to agents that leave a parameter unset. adito-code is not pinnable, so unlike the pinned text-generation codenames these defaults are not frozen and may change with a model update.
A value the agent or your request sends always wins over the default. Only the context window is a hard limit rather than something you can override.
Defaults for adito-code
| Parameter | Default | Description |
|---|---|---|
chat_template_kwargs.enable_thinking | true | Reasoning before the answer is on, because coding agents work through multi-step tasks. Send false to turn it off for a request. |
temperature | 0.6 | Sampling randomness. Lower values produce more deterministic output. |
top_p | 0.95 | Nucleus sampling cutoff. |
top_k | 20 | Number of candidate tokens considered per step. |
min_p | 0.0 | Minimum probability threshold, relative to the most likely token. |
presence_penalty | 1.5 | Discourages repetition of tokens that already appeared. |
repetition_penalty | 1.0 | Neutral value, so no additional penalty is applied on top of presence_penalty. |
max_tokens | 16384 | Upper bound for the generated response — the same value the Claude Code launcher below sets for its own output cap. |
| Context window | 262144 | Hard limit for prompt and response combined. Not a request parameter. |
Visual Studio Code Copilot Chat
Visual Studio Code supports Bring Your Own Key (BYOK) language models in Copilot Chat. BYOK models are configured through the Language Models editor and then appear in the Chat model picker.
For background on the VS Code BYOK feature, see Use your own language model key in VS Code.
Add the model
- Open the Copilot Chat view in Visual Studio Code.
- In the model picker at the bottom of the Chat view, select Manage Models. Depending on the current VS Code layout, this option can also appear behind a gear icon.
- Select Add Models.
- Enter a display name, for example
ADITO AI, and enter the ADITO AI API key. - Set Default request/response format to Chat completions.
- Save the model configuration. Visual Studio Code opens a JSON configuration file that you must complete manually.
Configure the endpoint
Use the following configuration for the ADITO coding model:
[
{
"name": "ADITO AI",
"vendor": "customendpoint",
"apiKey": "${input:chat.lm.secret.<generated-id>}",
"apiType": "chat-completions",
"models": [
{
"id": "adito-code",
"name": "adito-code",
"url": "https://ai.adito.cloud/chat/completions",
"toolCalling": true,
"vision": true,
"maxInputTokens": 128000,
"maxOutputTokens": 16000
}
]
}
]
The following values are required:
| Field | Value |
|---|---|
apiType | chat-completions |
id | adito-code |
name | adito-code |
url | https://ai.adito.cloud/chat/completions |
toolCalling | true |
vision | true |
Do not replace the apiKey value with the plain API key. Visual Studio Code
stores the secret separately and references it through a generated placeholder,
for example ${input:chat.lm.secret.24e928a8}. Keep the placeholder that
Visual Studio Code generated for your local configuration.
Update the API key
If the API key changes, update the stored secret instead of editing the JSON file directly:
- Open Manage Models in Visual Studio Code.
- Select the configured ADITO AI model.
- Open the context menu for the model.
- Select Update API Key.
- Enter the new API key.
Command-line tools
The OpenCode, Claude Code, Codex, and DeepSeek Harness examples below expect
your API key in the ADITO_AI_API_KEY environment variable:
export ADITO_AI_API_KEY="your-api-key"
OpenCode
OpenCode reads provider configuration from an opencode.json file — either project-level (repo root) or global (~/.config/opencode/opencode.json).
Add ADITO AI as a custom provider:
{
"$schema": "https://opencode.ai/config.json",
"model": "adito/adito-code",
"provider": {
"adito": {
"npm": "@ai-sdk/openai-compatible",
"name": "ADITO AI",
"options": {
"baseURL": "https://ai.adito.cloud/v1",
"apiKey": "{env:ADITO_AI_API_KEY}"
},
"models": {
"adito-code": {
"name": "adito-code"
}
}
}
}
}
adito is the provider key defined above, adito-code the model key nested under it. The top-level model key combines both into adito/adito-code and makes the self-hosted model the default, so a plain opencode in the scope of this configuration already starts on adito-code.
Which scope that is depends on where the file lives: a project-level opencode.json applies to that repository only, while the global ~/.config/opencode/opencode.json applies to every project. Keep the provider block but leave out the model key if your regular provider should stay the default, and select the ADITO model per invocation instead:
opencode -m adito/adito-code
-m also works the other way round: with model set globally, pass your regular provider's model to override the default for a single session.
Claude Code
Claude Code reads its API endpoint and credentials from environment variables at startup. Redirecting it to the ADITO AI Runtime therefore requires no changes to your Claude Code configuration files:
export ANTHROPIC_BASE_URL="https://ai.adito.cloud"
export ANTHROPIC_AUTH_TOKEN="$ADITO_AI_API_KEY"
claude --model adito-code
If you are also logged into Claude Code with your personal Anthropic account, Claude Code ignores ANTHROPIC_API_KEY and sends its own rotating login token to the endpoint instead, which the ADITO AI Runtime rejects with 401 Invalid proxy server token. ANTHROPIC_AUTH_TOKEN takes priority over the login and is sent as-is, so this conflict does not occur. It also skips the "Use it?" confirmation prompt that ANTHROPIC_API_KEY requires on first start.
Recommended: an opt-in launcher
Endpoint and authentication are fixed for the lifetime of a session. Exporting the variables globally would route all Claude Code sessions through the self-hosted model, including those you want to run against your regular Anthropic account. A small shell function keeps the setup opt-in:
# ~/.zshrc or ~/.bashrc
claude-adito-code() {
ANTHROPIC_BASE_URL="https://ai.adito.cloud" \
ANTHROPIC_AUTH_TOKEN="$ADITO_AI_API_KEY" \
ANTHROPIC_SMALL_FAST_MODEL="adito-code" \
ANTHROPIC_DEFAULT_HAIKU_MODEL="adito-code" \
ANTHROPIC_CUSTOM_MODEL_OPTION="adito-code" \
ANTHROPIC_CUSTOM_MODEL_OPTION_NAME="ADITO Code" \
ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION="Self-hosted coding model" \
CLAUDE_CODE_MAX_CONTEXT_TOKENS="220000" \
CLAUDE_CODE_AUTO_COMPACT_WINDOW="220000" \
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE="60" \
CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS="8000" \
CLAUDE_CODE_MAX_OUTPUT_TOKENS="16384" \
claude --model adito-code "$@"
}
The extra variables redirect Claude Code's background Haiku calls to adito-code (they would otherwise fail, since the ADITO AI Runtime doesn't serve Anthropic models) and register the model in the /model picker.
claude-adito-code starts a fully self-hosted session; plain claude keeps using your regular setup. Additional arguments are passed through, for example claude-adito-code -c to continue a previous conversation.
Claude Code has no per-model endpoint routing. Switching models inside a session only changes the model ID sent to the endpoint the session started with — you cannot use Anthropic models and adito-code in the same session.
Codex
Codex supports layered configuration profiles: codex --profile <name> loads ~/.codex/<name>.config.toml on top of your base configuration. Your existing ~/.codex/config.toml stays untouched.
Create ~/.codex/adito-code.config.toml:
# Top-level keys must come before the first table header.
model = "adito-code"
model_provider = "adito"
[model_providers.adito]
name = "ADITO AI Runtime"
base_url = "https://ai.adito.cloud"
wire_api = "responses"
env_key = "ADITO_AI_API_KEY"
Then start Codex with the profile:
codex --profile adito-code
Plain codex keeps using your regular provider and login.
At startup, Codex may log failed to refresh available models errors and a Model metadata for adito-code not found warning. Both are caused by Codex expecting vendor-specific metadata that third-party endpoints do not provide. Requests work regardless.
DeepSeek Harness
DeepSeek Harness (dsh) is an
open-source agent harness in which the model provider is a plugin rather than a
fixed vendor endpoint, so the ADITO AI Runtime is registered as a regular
OpenAI-compatible provider instead of overriding a built-in one.
Install it once and start the Web UI:
npm install -g @deepseek-ai/dsh
dsh web
The Web UI listens on http://127.0.0.1:3080; dsh web --port 8080 moves it to
another port. npx @deepseek-ai/dsh web runs it without a global install.
Configure the provider
dsh keeps its configuration in $DSH_HOME/settings.yaml, by default
~/.dsh/settings.yaml. Add the ADITO AI Runtime under the llm-pi-ai plugin:
llm-pi-ai:
providers:
adito-ai-runtime:
displayName: ADITO AI Runtime
apiKeyEnv: ADITO_AI_API_KEY
api: openai-completions
baseURL: https://ai.adito.cloud/
models:
- id: adito-code
- id: adito-llm
# Makes adito-code the default model for new sessions
agent-default-model:
provider: adito-ai-runtime
model: adito-code
| Field | Value |
|---|---|
api | openai-completions |
baseURL | https://ai.adito.cloud/ |
apiKeyEnv | Name of the environment variable that holds the key, for example ADITO_AI_API_KEY. The key itself stays out of the settings file. |
models | One entry per model ID you want in the picker. adito-code for coding, adito-llm for general text generation. |
The variable named in apiKeyEnv must be exported before dsh starts, because
the provider is resolved at startup. Alternatively, store the key in
$DSH_HOME/.credentials.yaml, which dsh reads for headless use.
agent-default-model sets the model each new session starts with. You do not
have to write it by hand: picking ADITO AI Runtime / adito-code in the model
picker of the Web UI makes it the default for new sessions and persists the same
entry. Configured providers appear in that picker as soon as they are in the
settings file — the server does not need a restart.
For the full set of provider options, including the compat block for
endpoint-specific quirks and per-model input: [text, image] declarations, see
the Configure models
guide.
DeepSeek Harness is published as a developer preview and iterates quickly, with compatibility-breaking changes between versions. Re-check the provider keys above after an update if models stop appearing in the picker.
dsh web starts a local server that holds your ADITO API key and reads and
writes files below its working directory. Start it in the directory it is meant
to work in, and leave it bound to the loopback address.
Verifying the command-line setup
Run a one-shot prompt through each command-line tool:
opencode run -m adito/adito-code "Reply with: OK"
claude-adito-code -p "Reply with: OK"
codex --profile adito-code exec "Reply with: OK"
Codex prints a session header that shows adito-code as the active model and adito as the provider.
DeepSeek Harness has no one-shot equivalent: start dsh web, confirm that
ADITO AI Runtime / adito-code is the selected model, and send Reply with: OK
in a new session.
See also: AI Models | Text Generation | AI Compliance