Provider Configuration
A provider setup registers an integration with Valdr. Give it a display name, choose its type, and enable it. Model lists and connection defaults are optional. Manage provider setups in Settings > Providers, or export/import them as JSON.
JSON schema
Each provider setup is a JSON object with this shape:
{
"providerId": "codex",
"providerType": "codex",
"displayName": "Codex",
"isEnabled": true,
"apiKeyEnvVar": "CODEX_API_KEY",
"baseUrl": null,
"defaultModel": "gpt-5.4",
"defaultTemperature": null,
"defaultMaxTokens": null,
"models": [
{ "id": "gpt-5.4", "label": "GPT-5.4" },
{ "id": "gpt-5.4-mini", "label": "GPT-5.4 Mini" }
]
}Field reference
| Field | Type | Required | Purpose |
|---|---|---|---|
providerId | string | Yes | Unique identifier for this setup record. Built-in providers use stable IDs; custom providers get a generated ULID. |
providerType | string | Yes | Integration type. Must be a registered provider type (see below). |
displayName | string | Yes | Human-readable name shown in UI dropdowns and tables. |
isEnabled | boolean | Yes | Whether this provider is available. Set false to disable without deleting. |
apiKeyEnvVar | string | null | No | Environment variable containing the API key (e.g., "CODEX_API_KEY"). OpenCode uses its own authentication or explicit credential references instead. Set null if no key is needed. |
baseUrl | string | null | No | Default/suggested endpoint URL. Required for Ollama ("http://localhost:11434"). null uses the provider’s default. |
defaultModel | string | null | No | Suggested default model. Informs UI model selection and export metadata. |
defaultTemperature | number | null | No | Suggested default temperature (0–2). Informs UI and exports. |
defaultMaxTokens | number | null | No | Suggested default max output tokens (positive integer). Informs UI and exports. |
models | array | No | Optional model choices for UI selection. Each entry: { "id": "model-id", "label": "Display Name" }. OpenCode can use []; choose its model in the preset config. |
Registered provider types
These are the valid providerType values:
| Type | Provider | Use it for |
|---|---|---|
claude | Claude | Claude sessions using your configured models and permissions |
codex | Codex | Codex sessions using your configured models and permissions |
opencode | OpenCode | Models available through OpenCode |
ollama | Ollama | Models served by your local Ollama installation |
Claude, Codex, and OpenCode support continuing an existing session.
gemini, openai, and anthropic providers have been removed. Create an OpenCode provider and replacement presets, then update affected agent and workflow selections. Existing presets are not automatically converted.Provider settings and session settings
Provider setups organize the names and model choices shown in Settings. To select the model, endpoint, temperature, or token limits for a session, set those values in the preset’s config; catalog defaults alone do not set them for every session.
If the provider needs an API key, apiKeyEnvVar identifies the environment variable to use unless the preset supplies its own credential reference. OpenCode uses its saved authentication or explicit credential references instead.
Per-provider config keys
Use shared Valdr keys for model selection, environment overrides, and supported MCP connections. Put additional provider-specific settings in a flat config.native object. Shared settings take precedence over corresponding native settings. See the preset reference for config.env and config.native, including version requirements.
Claude
| Key | Type | Notes |
|---|---|---|
model | string | Per-session model override |
permissionMode | default | acceptEdits | bypassPermissions | dontAsk | plan | Controls tool approvals; bypassPermissions allows unattended execution and requires trust in the agent |
allowedTools | string[] | Tools approved without prompting; omit to use configured defaults |
disallowedTools | string[] | Tools the session must not use |
maxTurns | number | Maximum agent turns per prompt |
env | object of strings | Per-session child environment overrides |
native | JSON object | Additional Claude Agent SDK options, such as settingSources, tools, and maxBudgetUsd |
model_preferences.reasoning_effort | string | Nested or dotted key: low, medium, high, xhigh, or max; omit to inherit the provider default |
mcpServers | object | Additional MCP servers to make available to the session |
Claude does not use keepAliveMs. Use maxTurns to bound the number of agent turns per prompt.
When neither the preset nor environment sets these options, permissionMode is default and allowedTools adds no approvals. Valdr access is configured automatically.
Environment variables: CLAUDE_MODEL, CLAUDE_PERMISSION_MODE, CLAUDE_MAX_TURNS, CLAUDE_ALLOWED_TOOLS, CLAUDE_DISALLOWED_TOOLS.
Codex
| Key | Type | Notes |
|---|---|---|
model | string | Model identifier |
temperature | number | Sampling temperature (0–2, default 0.2) |
maxOutputTokens | number | Output length cap (16–32768, default 8192) |
topP | number | Nucleus sampling |
stopSequences | string[] | Termination markers |
reasoning_effort / model_preferences.reasoning_effort | string | low, medium, high, xhigh, max, or ultra; legacy minimal is also accepted |
env | object of strings | Per-session child environment overrides |
native | JSON object | Additional Codex configuration; existing top-level passthrough also remains supported |
mcpServers | object | Additional MCP servers; Valdr access is enabled by default |
keepAliveMs | number | Session keep-alive timeout |
sessionIdleCloseMs | number | Explicit idle-close delay |
Authentication: Sign in with codex login, or set CODEX_API_KEY (OPENAI_API_KEY also works as a fallback).
Environment variables: CODEX_API_KEY, CODEX_BASE_URL, CODEX_MODEL, CODEX_TEMPERATURE, CODEX_MAX_OUTPUT_TOKENS.
OpenCode
- Add an enabled provider with type OpenCode in Settings > Providers.
- Leave API key env var, Base URL, Default model, and Default max tokens empty. Models can stay
[]; other defaults can stay as they are. - Create presets in Settings > Agent Presets and select the model in Config JSON, for example:
{
"model": "openai/gpt-6-sol",
"agent": "build"
}Use a model available to your OpenCode account. OpenCode handles its own sign-in and settings. A preset can also use config: {} to keep OpenCode’s defaults, with env: [] when no environment references are needed.
MCP servers are optional. Omit mcpServers unless you want to add or override an MCP connection for that preset. See the complete preset example.
OpenCode requires a stable 1.18.x executable on the machine running Valdr, on PATH or selected with the preset’s executable setting.
Optional preset settings
These settings can be omitted unless you need to change OpenCode’s defaults:
| Key | Type | Notes |
|---|---|---|
model | string | Model to use, in provider/model form |
agent | string | OpenCode agent to use, such as build |
variant | string | A variant supported by the selected model |
executable | string | Path to the OpenCode executable when it is not on PATH |
env | object of strings | Per-session environment overrides, including native inheritance flags and HOME/XDG paths |
native | JSON object | OpenCode configuration, including agent definitions, instructions, permissions, and providers |
permission | string or object | Native OpenCode permission rules; interactive ask requests fail in headless sessions |
mcpServers | object | Optional MCP connections; see MCP server attachment |
startupTimeoutMs / timeoutMs | number | Positive millisecond limits; defaults 30000 / 600000 |
agent selects an agent by name; native.agent defines the agent map. Native settings merge with OpenCode’s existing configuration. For a read-only code reviewer preset with explicit tool scope and inheritance controls, see read-only code review example.
If you need a credential override, use an environment reference such as {"envRef":"MY_MODEL_KEY"} or $env:MY_MODEL_KEY. A top-level apiKey override also requires an explicit model.
OpenCode supports executor, reviewer, and auditor sessions. Queued follow-ups continue the same conversation; active-turn steering is unavailable. Start a new session after changing a preset so it uses the new configuration.
Ollama
| Key | Type | Notes |
|---|---|---|
model | string | Required — model identifier |
temperature | number | Sampling temperature |
maxOutputTokens | number | Output length limit |
baseUrl | string | Base URL override for the Ollama API |
env | object of strings | OLLAMA_HOST endpoint fallback when baseUrl is absent; does not reconfigure the running server |
native | JSON object | Ollama model options, such as options.num_ctx, options.seed, and think |
keepAliveMs | number | How long to keep the model loaded while idle, in milliseconds |
Ollama does not support permissionMode, allowedTools, or additional mcpServers.
Examples
Claude Code
{
"providerId": "claude",
"providerType": "claude",
"displayName": "Claude Code",
"isEnabled": true,
"apiKeyEnvVar": null,
"baseUrl": null,
"defaultModel": "sonnet",
"defaultTemperature": null,
"defaultMaxTokens": null,
"models": [
{ "id": "default", "label": "Default" },
{ "id": "sonnet", "label": "Sonnet" },
{ "id": "sonnet[1m]", "label": "Sonnet 1M" },
{ "id": "opus", "label": "Opus" },
{ "id": "haiku", "label": "Haiku" },
{ "id": "opusplan", "label": "Opus Plan" }
]
}Codex
{
"providerId": "codex",
"providerType": "codex",
"displayName": "Codex",
"isEnabled": true,
"apiKeyEnvVar": "CODEX_API_KEY",
"baseUrl": null,
"defaultModel": "gpt-5.4",
"defaultTemperature": null,
"defaultMaxTokens": null,
"models": [
{ "id": "gpt-5.4", "label": "GPT-5.4" },
{ "id": "gpt-5.4-mini", "label": "GPT-5.4 Mini" },
{ "id": "gpt-5.3-codex", "label": "GPT-5.3 Codex" },
{ "id": "gpt-5.3-codex-spark", "label": "GPT-5.3 Codex Spark" }
]
}OpenCode — empty provider setup
{
"providerId": "opencode",
"providerType": "opencode",
"displayName": "OpenCode",
"isEnabled": true,
"apiKeyEnvVar": null,
"baseUrl": null,
"defaultModel": null,
"models": []
}Choose models in presets; no model list or connection defaults are needed here.
Ollama (local)
{
"providerId": "ollama",
"providerType": "ollama",
"displayName": "Ollama Local",
"isEnabled": true,
"apiKeyEnvVar": null,
"baseUrl": "http://localhost:11434",
"defaultModel": "qwen3-coder-next",
"defaultTemperature": null,
"defaultMaxTokens": null,
"models": [
{ "id": "qwen3-coder-next", "label": "Qwen3-Coder-Next" },
{ "id": "qwen3", "label": "Qwen3" },
{ "id": "deepseek-r1", "label": "DeepSeek R1" }
]
}Import and export
Use Export and Import in Settings > Providers. The export produces a JSON array of provider setup objects. Import on another machine to replicate the provider catalog instantly.
Next steps
Providers define what Valdr can talk to. Presets define how — the specific model, permissions, and runtime config for each agent launch.