Configuration
Edit layered TOML configuration, resolve overrides, and look up every setting and custom-model field.
Use this page to look up saved settings. For onboarding, use Quickstart. In Orek, locate files and inspect a specific value:
In Orek · command
/config pathIn Orek · command
/config get ui.theme/config and /config show list the keys you can set. In a shell,
orek config show prints the combined configuration from Orek’s defaults and
your files, with secrets hidden.
File locations
| Scope | macOS | Linux | Windows |
|---|---|---|---|
| User | ~/Library/Application Support/orek-ai/config.toml |
$XDG_CONFIG_HOME/orek-ai/config.toml, usually ~/.config/orek-ai/config.toml |
%APPDATA%\orek-ai\config\config.toml |
| Project | <project>/.orek/config.toml |
<project>/.orek/config.toml |
<project>\.orek\config.toml |
Use your user configuration for personal defaults and your project configuration for settings that belong with a repository. You only need to write values you want to change.
OREK_HOME relocates user-scoped configuration, cache, roaming data, and local
data under config/, cache/, data/, and data-local/ beneath that root.
Without it, macOS uses Apple’s Application Support/Caches paths rather than XDG.
Person-owned state is not configuration and never lives in the checkout:
per-project workspace-root defaults saved with /add-dir <PATH> persist live at
<user config>/workspace-roots/<project-hash>.toml. A repository cannot grant
itself extra workspace roots by carrying a file; see
TUI commands.
Before you begin
Open a terminal in your project directory and find the files Orek uses there:
In your shell
orek config pathThe output identifies your user file and the project’s .orek/config.toml,
including whether each file exists. Orek searches upward for the nearest
.orek directory; to give a nested project its own scope, create a .orek
directory in that project’s root and check orek config path again.
Resolved view
1. Read the current value
In your shell
orek config get ui.themeThis reads the combined value, including project overrides. To inspect all loaded settings with credentials redacted:
In your shell
orek config showRedaction covers provider credentials, gateway/cloud tokens, MCP environment
and header values, and inline user:password@ URL credentials. Inside Orek,
use /config get <key>; for example:
In Orek · command
/config get index.retrieval.enabledget reads any setting. set and unset accept the keys that the tables
below mark User or Project; edit TOML settings in the file.
2. Save a personal default
This example saves a light terminal theme in your user configuration:
In your shell
orek config set ui.theme light --scope userThe confirmation names the file that changed. Include --scope when the
destination matters; without it, Orek chooses a default scope for that key.
3. Override it for this project
In your shell
orek config set ui.theme dark --scope projectCheck the value again from the same project:
In your shell
orek config get ui.themeThe result is dark. The user file still says light; the project value
takes precedence here. Restart any running Orek session to load external
changes.
4. Remove an override
To use your personal default in this project again:
In your shell
orek config unset ui.theme --scope projectUnsetting a value removes it from the selected file; it does not remove the
default or a value in another file. orek config get ui.theme now reports
light.
Editing config
For the normal write scope of a supported key, use Orek’s composer:
In Orek · command
/config set ui.theme dark/config set saves the setting and reports whether it applies immediately
(such as ui.*, routing.pinned_model, and routing.pinned_provider) or on
the next session (such as skills.*, tools.*, and
compaction.auto_compact_threshold). Do not append CLI flags to a TUI
/config set value; explicit scope overrides use the shell commands above.
Without --scope, each writable key has a default write scope. The reference
tables use:
- User:
set/unsetwrites user configuration by default. - Project:
set/unsetwrites project configuration by default. - TOML: edit the configuration file;
config setcannot change it.
Write scope is separate from precedence. A project value still overrides a
user value, including after unset exposes the lower layer again, except for
the user-only settings, which a project
file cannot set at all. orek config set --scope project refuses them.
Edit structured settings in TOML
Table settings such as [[models]] or [mcp.servers.<name>] are edited
directly in config.toml:
- Run
orek config pathand open the complete path for the scope you want, preserving spaces, or runorek config initto create a starter.orek/config.toml. - Add or update the relevant TOML section.
- Save the file, run
orek config showto verify it parses cleanly, and restart Orek. A documented live reload or slash command may apply specific changes sooner.
For example, this has the same project effect as the theme command above:
Configuration
[ui]
theme = "dark"Configuration resolution
Saved settings
Orek reads saved configuration in this order, from lowest to highest priority:
| Order | Settings | Where they apply |
|---|---|---|
| 1 | Defaults included with Orek | Starting values when no override exists |
| 2 | User configuration | Your projects on this machine |
| 3 | Project configuration | The current project |
For a single value, the later setting wins, except for the security and approval settings that only your user file can set. Tables combine their entries across scopes, so a project can change one setting while keeping the others from your user file. Removing a project value exposes the user value, or the built-in default if no user value exists.
How lists combine
Most lists replace the entire earlier list. A few lists add their entries:
| Setting | What a later file does |
|---|---|
prompt_guidance.per_model |
Replaces the earlier list of model instructions |
skills.search_paths, index.include_globs, index.exclude_globs |
Replaces the earlier list |
tool_exposure.tier.<tier>.allowed |
Replaces that tier’s earlier list |
tool_exposure.per_model |
Adds rules; matching hidden names accumulate |
permissions.sensitive_patterns |
Adds protected path patterns |
models |
Adds model entries; the model catalog combines entries with the same model ID |
An empty replacement list clears the earlier list; an empty additive list does not remove earlier entries.
Settings a project cannot change
A project’s .orek/config.toml can tighten approval but never loosen it. The
file comes with the checkout, and in auto_review the model can write it
without asking, so Orek ignores these keys in it and uses your user value or
the built-in default:
exec.default_approval_mode,exec.require_approval_for, everyexec.auto_reviewkey,exec.redact_exec_outputandexec.sandbox_runtime_enabled;permissions.tool_rules,permissions.mcp_server_rules,permissions.path_scopes,permissions.url_allowlist,permissions.env_allowlist,permissions.sandbox_read_pathsandpermissions.sandbox_write_paths;tools.shell.default_shellandindex.llama_server_path, which name programs Orek runs;index.models_dir,index.llama_server_device,index.llama_server_gpu_layersandindex.llama_server_idle_timeout_secs, which choose the local model files, the hardware they run on, and how long they stay loaded;- every
ui.keymapkey, because remapped approval keys could turn a checkout’s file into a way to approve for you.
Each ignored key is logged, and orek doctor lists it under Ignored project
keys, for example: “.orek/config.toml sets exec.default_approval_mode, a
user-only setting; project config cannot change it, so it was ignored. Set it
in your user config.” Set these in your user configuration instead. A project may
still add permissions.sensitive_patterns. Project policy files follow the
same rule; see
Project files.
Command and session settings
After loading saved settings, supported command-line options such as
--model and --approval-mode select values for that invocation.
--reasoning-replay preserve|drop overrides agent.reasoning_replay until
that command exits: an orek chat session and every session it switches to or
resumes, an orek run, or every session an orek acp server starts. Without
the flag, /config set agent.reasoning_replay in chat also changes the open
session from its next model switch; with it, the saved value applies the next
time you start Orek.
During chat, commands such as /model, /retrieval off, and /sandbox can
change the corresponding active setting. These choices are temporary unless the
command explicitly saves them. /retrieval clear, for example, removes the
temporary choice and restores the configured value; choosing the configured
value with /sandbox on|off does the same.
orek config show shows saved settings only, not these session choices.
Model catalog
The model catalog is separate from general settings. Orek starts with its
built-in model list, then applies user [[models]] entries, followed by
project [[models]] entries. Entries can add models or update matching model
IDs. Choosing a model with --model or /model selects from that catalog;
it does not change the saved model definitions.
Provider credentials
Orek reads providers.<name>.api_key, with a project value taking priority
over a user value. That value names exactly one place to get the key from:
| Configured value | Where Orek gets the credential |
|---|---|
An exact "${NAME}" reference |
The named environment variable, read when Orek connects to the provider. |
| A credential-store reference created by setup | The matching entry in your OS credential store. |
| A literal string | The value written in the configuration file. |
| No value | No credential; providers that require one are unavailable. |
Orek uses only that source. It reads an environment variable only when
api_key names it, and a missing variable or credential-store entry does not fall back
to another source or another configuration file. Use
Credential storage to change the source.
Provider setup can detect a known environment variable and save its reference.
Provider addresses and environment references
For ordinary provider connections, Orek uses the merged
providers.<name>.base_url value first, expanding any ${NAME} references.
If base_url is absent, it uses that provider’s built-in address. Custom
OpenAI-compatible connections without an address use http://localhost:8000/v1.
Cloudflare AI Gateway instead constructs its address from the configured
account, gateway, and route when no usable base_url is supplied.
For example, providers.ollama.base_url = "${OLLAMA_HOST}" selects the
address stored in that environment variable. A literal HTTP address can be
used instead.
Environment expansion is supported only in specific fields, such as provider
addresses and the documented MCP connection fields. MCP also accepts
${NAME:-default}; provider api_key references require the exact ${NAME}
form. Environment variables do not override settings in general; only
specific ones, such as OREK_HOME and OREK_SANDBOX, have documented effects.
If the change does not take effect
| Problem | What to check |
|---|---|
| The value differs from the file you edited | Run orek config path from your project and check the other scope. |
config set rejects a key |
Check that this reference marks it User or Project. Edit TOML settings directly in config.toml. |
| The file fails to load | Fix the reported TOML error; check quoting, value types, and duplicate tables. |
| Orek warns about an unknown key | Check its exact spelling in this reference. |
| A running session still uses an old value | Restart Orek after external edits. |
| A hidden tool stays hidden | Remove the matching rule from the file that introduced it; an added revealed entry cannot cancel hidden. |
The shape, at a glance
This is a customization example, not the complete default configuration. Put credentials and approval settings in user configuration:
Configuration
[providers.openai]
api_key = "${OPENAI_API_KEY}"
[ui]
theme = "dark"
[exec]
default_approval_mode = "auto_review"Project configuration can select a model and other project behavior:
Configuration
[routing]
pinned_model = "openai/gpt-6-luna"
[index.retrieval]
enabled = falseOnly select a model available through your configured provider. Disabling automatic retrieval does not disable explicit references or graph queries.
Setting reference
Tool discovery
| Key | Type/default | Write | Purpose |
|---|---|---|---|
tools.tool_search.enabled |
Boolean; true |
User | Outside Plan mode, give the model its core tools up front and let it find the rest with tool_search. When off or unavailable, the model sees every permitted tool from the start. |
tools.tool_search.default_limit |
Integer; 8 |
User | Number of search results when the model gives no limit; at least 1. |
Subagents use the same settings, limited by their profile’s tool list. Tool access and approval rules still apply to tools found by search. See tool discovery.
Provider request limits
The limit applies to one provider instance. A streamed response keeps its slot
until it completes or is dropped. Unset local kinds (ollama, llama_cpp,
lm_studio, vllm) use one slot; cloud providers have no default cap. Custom
profile names follow their explicit provider kind. Set a positive integer and
restart the session to override the default; unset the key to restore it.
| Key | Type/default | Write | Purpose |
|---|---|---|---|
providers.anthropic.max_concurrent_requests |
Optional positive integer; unset | User | In-flight requests for this provider instance. |
providers.openai.max_concurrent_requests |
Optional positive integer; unset | User | In-flight requests for this provider instance. |
providers.google.max_concurrent_requests |
Optional positive integer; unset | User | In-flight requests for this provider instance. |
providers.mistral.max_concurrent_requests |
Optional positive integer; unset | User | In-flight requests for this provider instance. |
providers.kimi_code.max_concurrent_requests |
Optional positive integer; unset | User | In-flight requests for this provider instance. |
providers.cloudflare_ai_gateway.max_concurrent_requests |
Optional positive integer; unset | User | In-flight requests for this provider instance. |
providers.ollama.max_concurrent_requests |
Optional positive integer; unset | User | In-flight requests for this provider instance. |
providers.llama_cpp.max_concurrent_requests |
Optional positive integer; unset | User | In-flight requests for this provider instance. |
providers.lm_studio.max_concurrent_requests |
Optional positive integer; unset | User | In-flight requests for this provider instance. |
providers.vllm.max_concurrent_requests |
Optional positive integer; unset | User | In-flight requests for this provider instance. |
Provider web tools
Provider web tools are web search and page fetching that run on the provider’s
servers. They are on by default for every
built-in OpenAI, Anthropic and Google model, including one you redefine in
[[models]]. Other models, such as a new model ID you add, run without them,
and Orek says so once. Change or turn them off for a whole provider
(providers.<id>.provider_tools.enabled) or for one model
(providers.<id>.provider_tools.models, where [] turns them off for that
model and a tool list is accepted only for a built-in model). Restart Orek or
start a new session after changing these settings.
| Key | Type/default | Write | Purpose |
|---|---|---|---|
providers.openai.provider_tools.enabled |
Tool-name list; ["web_search"] |
User | Provider web tools for built-in OpenAI models not named in provider_tools.models; [] turns them off. |
providers.anthropic.provider_tools.enabled |
Tool-name list; ["web_search", "web_fetch"] |
User | Provider web tools for built-in Anthropic models not named in provider_tools.models; [] turns them off. |
providers.google.provider_tools.enabled |
Tool-name list; ["google_search", "url_context"] |
User | Provider web tools for built-in Google models not named in provider_tools.models; [] turns them off. |
providers.openai.provider_tools.models |
TOML map; {} |
User | Tool lists for exact openai/<model> IDs, replacing the provider list; [] turns tools off for that model. |
providers.anthropic.provider_tools.models |
TOML map; {} |
User | Tool lists for exact anthropic/<model> IDs, replacing the provider list; [] turns tools off for that model. |
providers.google.provider_tools.models |
TOML map; {} |
User | Tool lists for exact google/<model> IDs, replacing the provider list; [] turns tools off for that model. |
providers.openai.provider_tools.max_uses |
Optional positive integer; unset | User | Most provider web tool calls in one request; unset leaves the limit to OpenAI. |
providers.anthropic.provider_tools.max_uses |
Optional positive integer; unset | User | Most uses of each enabled search or fetch tool in one request; unset leaves the limit to Anthropic. |
providers.anthropic.provider_tools.max_content_tokens |
Optional positive integer; unset | User | Most tokens of page content one web_fetch returns; unset leaves the limit to Anthropic. |
In your shell
orek config set providers.openai.provider_tools.enabled ""
orek config set providers.anthropic.provider_tools.models '"anthropic/claude-haiku-5-5" = ["web_search"]'
orek config set providers.google.provider_tools.models '"google/gemini-3.8-flash" = []'Setting provider_tools.models changes only the models it names in that
scope; unsetting provider_tools.enabled restores the provider’s built-in
list. See
provider examples.
Anthropic conversations
| Key | Type/default | Write | Purpose |
|---|---|---|---|
providers.anthropic.prefix_mismatch_behavior |
drop_block or error; drop_block |
User | Experimental. What Anthropic does when earlier thinking that Orek sends back no longer matches the conversation before it: drop_block leaves out that thinking and all later thinking for that request, and orek session export lists each block left out; error rejects the request. Applies to every request with thinking on, including Claude models you declared without reasoning controls. At effort none, Anthropic ignores it and your account’s default applies; see Anthropic Claude. |
providers.anthropic.inline_system_messages |
Boolean; true |
User | Experimental. Whether a Claude conversation sends changed session instructions, such as a new approval mode, as a system message after your next message. Set false for an Anthropic-compatible endpoint that rejects system messages mid-conversation: Orek then resends the history with the new instructions in place and without Claude’s earlier thinking, and notes each time it does. |
In your shell
orek config set providers.anthropic.prefix_mismatch_behavior error
orek config set providers.anthropic.inline_system_messages falseOrek extends a Claude conversation without changing what it sent before. For
an endpoint that rejects system messages mid-conversation, a Claude model entry
can instead set append_only = false under [models.reasoning.replay]; see
Reasoning replay fields and
Anthropic Claude.
[providers.<name>]
Connection and authentication settings. The built-in provider names are
openai, anthropic, google, mistral, kimi_code, ollama, and
cloudflare_ai_gateway. Any other name, such as llamacpp or xai, needs
provider_type = "openai_compatible" and its own [[models]] entries; see
Providers.
| Key | Type/default | Write | Purpose |
|---|---|---|---|
api_key |
Credential source; unset | User | A credential-store reference created by setup, an exact environment reference, or a literal key. |
api_key_ref |
Read and unset only; unset | Unset: User | Shows or removes an api_key kept in the OS credential store. config set refuses it, and it never appears in config.toml. |
base_url |
String; the provider’s default | TOML/setup | Override the provider endpoint. |
provider_type |
openai_compatible, cloudflare_ai_gateway, ollama, llama_cpp, lm_studio, or vllm; inferred for built-in names |
TOML/setup | Selects the connection profile under any provider name. Unknown values are rejected. Local profiles use local timeouts even on a LAN and report zero inference cost. |
max_concurrent_requests |
Positive integer; local kinds default to 1, cloud connections unlimited | TOML/config | Queues network requests per provider instance. Canceling a queued request releases its place; a stream keeps its slot until it ends. |
prompt_caching |
Optional boolean; on where the provider supports it | TOML | false stops Orek asking the provider to cache prompts; see Provider cache limits. |
timeout_secs |
Optional integer; the provider’s default | TOML | Request timeout in seconds. Orek’s own limits on stalled streams still apply. |
max_retries |
Optional integer; effective 4 retries (5 total attempts) |
TOML | Retries after the first attempt (0 sends one request without retrying). By default, a local endpoint such as localhost that refuses the connection fails at once; setting max_retries makes Orek retry it too. |
base_delay_ms, max_delay_ms |
Optional integers; effective 500, 2500 ms |
TOML | First and longest wait between retries. |
cloudflare_account_id |
Optional string; unset | TOML | Account used to build the AI Gateway address when base_url is absent. |
cloudflare_gateway_name |
Optional string; effective "default" |
TOML | Gateway name used in that address. |
cloudflare_upstream_path |
Optional string; effective "workers-ai/v1" |
TOML | A single upstream path for the gateway; when set, it overrides cloudflare_enabled_routes. |
routes |
String map; {} |
TOML | Named gateway routes mapped to upstream paths; a non-empty map overrides cloudflare_upstream_path and cloudflare_enabled_routes. |
cloudflare_enabled_routes |
String array; [] (effective ["workers-ai/v1"]) |
TOML | Gateway routes to enable when neither routes nor cloudflare_upstream_path is set. |
cloudflare_aig_token |
Optional secret string; unset | TOML | Gateway authentication token, separate from the provider’s api_key. |
orek config accepts providers.<name>.api_key and
providers.<name>.api_key_ref for built-in and custom declared providers.
orek providers setup changes connections and model entries without changing
your pinned model or provider.
Credential storage
This terminal command writes an environment reference without touching the OS credential store:
In your shell
orek config set providers.openai.api_key '${OPENAI_API_KEY}'A literal key given to config set is stored in the OS credential store, and the
configuration saves a reference to it, but the key may end up in shell history
or process listings. Prefer orek providers setup openai --api-key-stdin or an
interactive hidden prompt.
A credential-store reference looks like
{ managed = "orek-credential:v1:keyring:<opaque-id>" }. Let setup create it.
providers.<name>.api_key_ref reads or removes that same entry; it cannot set
a new one. A plain unset removes the reference from the configuration; adding
--delete-secret also deletes the stored key and confirms it is gone.
Intentional plaintext storage is available through provider setup’s config
storage choice or direct TOML editing. If the OS credential store fails, Orek
reports an error instead of falling back to plaintext.
Provider cache limits
prompt_caching = false stops Orek sending cache markers, keys, headers and
retention settings. It does not turn off caching the provider does on its own,
and Orek cannot guarantee a cache hit either way. Generic OpenAI-compatible
Chat Completions endpoints get a cache key only when the model’s entry
declares one in [models.prompt_cache].
Custom model definitions
A [[models]] entry adds a model to Orek’s catalog. Use one for a model the
catalog does not include: a newer model from a built-in provider, a local
model, or a model from a service you declare yourself. See
Providers for a minimal connection
example and Local models for local-server walkthroughs.
Only id, provider, and context_window are required:
- New model ID: capabilities and reasoning default to off, and pricing defaults to unknown.
- Built-in model ID override: inherits display name, aliases,
api_model_id, capabilities,[models.reasoning], and[models.prompt_cache]unless you replace them, but you must restatecontext_window,[models.pricing], and any provider API fields. Onlysupports_parallel_toolscan be set tofalseon a built-in ID; to turn off other capabilities, use a newid. A[models.reasoning]block replaces the built-in one, except that a block setting only[models.reasoning.replay]keys keeps the built-in control and efforts. Each replay key you leave out keeps its built-in value, whatever else the block sets.
Copy this template and replace each value:
Configuration
[[models]]
id = "example/coder-large"
provider = "example"
display_name = "Coder Large"
api_model_id = "coder-large"
context_window = 262144
max_output_tokens = 32768
supports_tools = true
supports_parallel_tools = true
supports_streaming = true
supports_vision = false
capability_source = "user_override"
capability_confidence = "high"
billing = "openai"
[models.pricing]
input_per_million_usd = 1.00
cached_read_per_million_usd = 0.10
output_per_million_usd = 4.00
[models.reasoning]
control = "controllable"
allowed_efforts = ["low", "medium", "high"]
default_effort = "medium"
supports_tools_with_reasoning = trueModel fields
| Field | Type/default | Purpose |
|---|---|---|
id |
String; required | Provider-prefixed selector used in Orek. |
provider |
String; required | Name of the matching [providers.<name>] table. |
display_name |
Optional string; id |
Name shown in the model picker. |
aliases |
String array; [] |
Other names that select the same model. |
quality_tier |
Unknown, Low, Medium, High, Frontier; Unknown |
Quality rating used by routing. |
latency_class |
Fast, Medium, Slow; Medium |
Speed rating used by routing. |
context_window |
Positive integer; required | Total token window declared for the model. |
max_output_tokens |
Optional positive integer; unset | Output cap; when smaller than the context window, Orek subtracts it to determine the input window. |
api_model_id |
Optional string; id without its provider prefix |
Model name the provider’s API expects. |
provider_route |
Optional string; unset | Route within the provider, such as Cloudflare workers-ai/v1 or compat. |
supports_tools |
Boolean; false |
Whether the model can call tools. Automatic routing and provider fallback skip models set to false on turns that offer tools, which is almost every agent turn. A model set to false that you pick yourself runs without tools: Orek sends it no tools and says so once per session. |
supports_parallel_tools |
Optional boolean; unset | false runs calls from one response sequentially. Unset or true permits parallel calls; see Tool calls in one response. |
accepts_assistant_tail |
Optional boolean; endpoint default | Whether the endpoint accepts a request whose last message is the model’s own reply. Responses endpoints accept it by default; for others, the last message must be yours or a tool result. |
supports_streaming |
Boolean; false |
Whether the model supports streaming. Provider fallback does not switch to a non-streaming model after a streaming model fails. |
supports_vision |
Boolean; false |
Whether the model accepts image input. |
purpose |
agent_chat, plain_text, embedding, image, audio, disabled; agent_chat |
What the model is for; routing and the model picker use it. |
visibility |
default, extended, hidden; default |
Whether the model picker shows it; a hidden model can still be selected by exact ID. |
capability_source |
String; builtin |
Where the capability values came from. Your own entries normally use user_override. |
capability_confidence |
high, medium, low; low |
How sure you are of the declared capabilities. Automatic routing ranks low-confidence models below checked ones; set high only after you have tested the model. |
billing |
generic, openai, or another supported provider billing mode; generic |
How Orek prices cached input. generic prices it as ordinary input; openai treats the provider’s input-token count as already including cached reads. |
wire_protocol |
API format; open_ai_chat |
Which API format Orek uses for requests; see API fields. |
endpoint_family |
Endpoint type; chat_completions |
Which endpoint requests go to; see API fields. |
cost_per_1k_input, cost_per_1k_output |
Numbers; 0.0 |
Older per-1,000-token rates, used only when [models.pricing] is absent; costs from them are marked incomplete. |
[models.pricing] |
Optional table; unset | Per-million-token prices. Without it or the per-1,000-token rates, new requests have no saved cost; /usage shows -- unless earlier costs were saved. |
[models.reasoning] |
Optional table; unsupported | Reasoning capabilities. Without it, Orek sends no reasoning effort and the server default applies. |
[models.prompt_cache] |
Optional table; unset | Prompt-cache key and retention. Without it, Responses API models key the cache by conversation, Workers AI models ask to reuse the same server, and other models send no key; a built-in ID override keeps the built-in table. Set key = "none" to send no key. Common fields include key, retention, topology, and min_cacheable_tokens; use only those your provider accepts. |
Setting a capability to true describes the model; it does not add the
capability. A model that cannot call tools still fails a tool call when
supports_tools = true.
Tool calls in one response
Orek runs tool calls from a single model response in parallel up to
agent.max_parallel_tool_calls (calls targeting the same file still
run in order; see
Several tool calls at once).
Set supports_parallel_tools = false to run a model’s tool calls one at a
time.
Malformed tool calls
If a model returns a tool call with a missing name or ID or invalid JSON arguments, Orek returns an error directly to the model instead of prompting or running a tool, allowing the model to correct the call and continue. Saved sessions also repair malformed historical tool calls automatically when resumed.
Pricing fields
[models.pricing] accepts per-million-token USD rates:
| Field | Type/default | Purpose |
|---|---|---|
input_per_million_usd |
Number; required within the table | Uncached input rate. |
cached_read_per_million_usd |
Optional number; unset | Cached-input read rate. An unset rate makes cache-bearing estimates incomplete. |
cache_creation_per_million_usd |
Optional number; unset | Cache-write rate. An unset rate makes cache-writing estimates incomplete. |
output_per_million_usd |
Number; required within the table | Output rate. |
pricing_as_of |
Optional ISO 8601 date; unset | Date the rates were last verified. |
[[models.pricing.prompt_tiers]] |
Array of tables; [] |
Full replacement rate bundles for prompts above declared input thresholds. |
Prompt-length pricing
Use [[models.pricing.prompt_tiers]] when a provider charges higher rates for
the entire request once total input tokens (including cached input) exceed
above_input_tokens.
The bundled catalog includes these tiers for the three GPT-6 models and Claude Haiku 5.5. Haiku uses its higher rates above 100,000 input tokens, counting uncached input, cache reads, and cache writes together. Other models keep their declared flat rates unless their entry includes tiers.
For your own model, replace the example [models.pricing] table above with
the provider’s base rates and any tiers. These sample values illustrate a
model whose rates change above 100,000 input tokens:
Configuration
[models.pricing]
input_per_million_usd = 1.00
cached_read_per_million_usd = 0.10
cache_creation_per_million_usd = 1.25
output_per_million_usd = 4.00
[[models.pricing.prompt_tiers]]
above_input_tokens = 100000
input_per_million_usd = 2.00
cached_read_per_million_usd = 0.20
cache_creation_per_million_usd = 2.50
output_per_million_usd = 6.00Each tier accepts above_input_tokens, input_per_million_usd, optional
cached_read_per_million_usd and cache_creation_per_million_usd, and
output_per_million_usd. Orek selects the highest threshold exceeded by the
request’s input (so 100000 applies at 100,001 tokens) and uses that tier’s
rates for all input, cache, and output tokens. Tiers do not inherit cache
rates from [models.pricing]; if a request uses cached tokens on a tier
without cache rates (including free 0.0 models), its cost is marked
incomplete (*).
Routing estimates cost from prompt length, while /usage sums the actual
cost saved after each completed request without repricing older turns (*
indicates incomplete pricing or token data; -- indicates no saved cost).
API fields for built-in providers
The default suits Kimi Code, Ollama, and any OpenAI-compatible service using Chat Completions, including a custom Mistral model on Chat Completions. A model using Responses (such as OpenAI’s or Mistral’s built-in models), Anthropic, or Google needs the fields that select that API:
| Provider | Fields |
|---|---|
| OpenAI and Mistral (Responses) | wire_protocol = "open_ai_responses" and endpoint_family = "responses", as the built-in GPT-6 and Mistral models use. Without them, requests go to Chat Completions (which custom Mistral [[models]] entries can still use) and send no prompt-cache key unless [models.prompt_cache] declares one. |
| Anthropic | wire_protocol = "anthropic_messages" and endpoint_family = "anthropic_messages". Orek supports Claude 5 and later models. With control = "controllable" under [models.reasoning], Orek sends adaptive thinking with an effort level, as the built-in Claude models do; without it, the model still thinks at its own default effort. Effort none turns thinking off in the way anthropic_thinking_off names: "disabled" (the default, for Haiku 5.5, Opus 5 and Sonnet 5), "between_tools" (Sonnet 5.5), or "unavailable" (Opus 5.5, Fable 5 and 5.1, which always think, so none is never offered). An entry without max_output_tokens gets 128,000, the output limit of every Claude 5 model. Set default_thinking_display = "summarized" to see thinking text. |
wire_protocol = "google_generate_content" and endpoint_family = "google_generate_content". |
Other wire_protocol values are open_ai_chat, open_ai_completions, and the
provider formats above. Other endpoint_family values are completions,
workers_ai_v1, embeddings, image_generation, and unsupported; use only
a combination that your provider’s API supports.
Reasoning efforts
control = "controllable" lets you choose a reasoning effort per session.
allowed_efforts lists the efforts Orek may send; an effort outside a
non-empty list is left off the request, so the server’s default applies. An
empty list allows every effort Orek supports for the model’s API, including
none, unless an Anthropic entry sets anthropic_thinking_off = "unavailable".
List only effort values documented by your provider. Use
control = "intrinsic" for models that always reason without an effort
parameter, and omit [models.reasoning] for models that do not reason.
[models.reasoning] field |
Type/default | Purpose |
|---|---|---|
control |
unsupported, controllable, intrinsic; unsupported |
Whether and how reasoning can be controlled. |
allowed_efforts |
Effort array; [] |
Efforts Orek may send; empty allows every effort Orek supports for the model’s API. |
default_effort |
Optional effort; unset | Effort used when the session requests auto. |
supports_tools_with_reasoning |
Boolean; false |
Whether tools and reasoning may be used together. When false, Orek leaves effort off requests that offer tools. |
anthropic_thinking_off |
disabled, between_tools, unavailable; disabled |
How an Anthropic model handles effort none. unavailable removes that choice from the model picker. |
rejects_temperature_override |
Boolean; false |
true stops Orek sending a temperature to Google and OpenAI-style models. Anthropic requests never send one. |
default_thinking_display |
Optional string; unset | Anthropic thinking display mode, such as summarized. |
[models.reasoning.replay] |
Optional table | How a model takes back earlier reasoning; see Reasoning replay fields. |
Reasoning replay fields
A [models.reasoning.replay] table declares how a model takes back earlier
reasoning. Every key is optional; a key you leave out takes the default for the
model’s provider and API.
| Key | Values | Meaning |
|---|---|---|
scope |
provider or model |
Which models can be sent the model’s own reasoning: any model on the same provider, or only this one. |
hosted_scope |
provider or model |
The same, for provider web tool results. |
input |
none, reasoning_content, reasoning, thought_part (Gemini) or think_chunk (custom Mistral Chat Completions models) |
The field in which the model accepts readable reasoning on its earlier replies. |
foreign |
drop or translate |
Whether, under preserve, another model’s readable reasoning goes into input. |
required_on_tool_calls |
true or false |
true when the model, while thinking, rejects an earlier tool call of its own that carries no reasoning. |
tool_call_filler |
String | What Orek sends in input on a tool call that has no reasoning, when required_on_tool_calls is set and the request does not turn thinking off (effort none). |
summary |
auto, concise or detailed |
OpenAI Responses models: the reasoning summary to request. |
append_only |
true or false |
Claude models: whether each request keeps the one before it unchanged and only adds to it (default true). Set false only for an endpoint that rejects system messages mid-conversation; see Anthropic conversations. Other models ignore it. |
A key you declare replaces the default, and /context no longer reports
reasoning it leaves out as not verified yet. This example, for a vLLM provider declared as in
Local models, lets the model read its own earlier reasoning
from reasoning_content, and other models’ reasoning under preserve:
Configuration
[[models]]
id = "vllm/qwen3-coder"
provider = "vllm"
api_model_id = "qwen3-coder"
context_window = 262144
supports_tools = true
supports_streaming = true
capability_source = "user_override"
capability_confidence = "high"
[models.reasoning]
control = "intrinsic"
supports_tools_with_reasoning = true
[models.reasoning.replay]
input = "reasoning_content"
foreign = "translate"The removed replays_reasoning_content key has no effect and receives an
unknown-key diagnostic. Set input under [models.reasoning.replay] as above.
[ui]
| Key | Type/default | Write | Purpose |
|---|---|---|---|
theme |
A theme name such as auto, dark, light, or forge; auto. The TUI reference lists every name. |
User | Terminal appearance. |
tui_tick_interval_ms |
Integer; 8 ms |
User | Shortest time between screen redraws. Values are kept between 4 and 500 ms, and Orek never redraws more than 120 times a second. |
show_thinking |
Boolean; true |
User | Experimental. Show reasoning blocks. Reasoning is still saved when hidden. |
thinking_expanded |
Boolean; true |
User | Experimental. Expand reasoning blocks by default. Changing it inside Orek also updates blocks already shown; Ctrl+O toggles them for the session. |
clickable_links |
Boolean; true |
User | Experimental. Detect links, preview them on hover, and open them. |
max_link_display_width |
Integer; 60 |
User | Experimental. Characters of a URL shown before its middle is shortened. |
session_picker_view |
comfortable, dense; comfortable |
User | Experimental. Row spacing in the session picker for the current project. Ctrl+O in /sessions saves it; o changes it for the current session only. |
motion |
auto, full, reduced, off; auto |
User | TUI animation level. auto picks reduced over SSH, on TERM=linux, or in a Windows console without WT_SESSION, off for TERM=dumb, and full otherwise. /motion overrides it for the session. |
keymap.leader |
String; "ctrl+x" |
User | Prefix key stroke used by <leader> chord bindings across TUI keymap contexts. |
keymap.chord_timeout_ms |
Integer; 1000 ms (100–5000) |
User | Timeout in milliseconds before a pending multi-key chord expires. |
keymap.global |
Table of action bindings; {} |
TOML (user) | Keybinding overrides for global TUI actions ([ui.keymap.global]). |
keymap.composer |
Table of action bindings; {} |
TOML (user) | Keybinding overrides for composer and input actions ([ui.keymap.composer]). |
keymap.transcript |
Table of action bindings; {} |
TOML (user) | Keybinding overrides for transcript scrolling actions ([ui.keymap.transcript]). |
keymap.transcript_focus |
Table of action bindings; {} |
TOML (user) | Keybinding overrides for focused transcript cell navigation ([ui.keymap.transcript_focus]). |
keymap.approval |
Table of action bindings; {} |
TOML (user) | Keybinding overrides for tool approval modal prompts ([ui.keymap.approval]). |
keymap.question |
Table of action bindings; {} |
TOML (user) | Keybinding overrides for ask_user_question prompts ([ui.keymap.question]). |
keymap.search |
Table of action bindings; {} |
TOML (user) | Keybinding overrides for in-transcript search mode ([ui.keymap.search]). |
keymap.history_search |
Table of action bindings; {} |
TOML (user) | Keybinding overrides for reverse prompt history search ([ui.keymap.history_search]). |
keymap.session_picker |
Table of action bindings; {} |
TOML (user) | Keybinding overrides for /sessions picker navigation ([ui.keymap.session_picker]). |
keymap.mcp_picker |
Table of action bindings; {} |
TOML (user) | Keybinding overrides for /mcp picker navigation ([ui.keymap.mcp_picker]). |
keymap.workflow_detail |
Table of action bindings; {} |
TOML (user) | Keybinding overrides for /workflows detail view navigation ([ui.keymap.workflow_detail]). |
Keymap rules:
- User-only.
ui.keymapbelongs in your user config. A[ui.keymap]table in a project.orek/config.tomlis ignored and reported (see settings a project cannot change), because a repository must not be able to remap your approval keys. - One name per action. Each action has a single canonical id and belongs to
exactly one context, as
ui.keymap.<context>.<action>; there are no aliases. For example,search_transcriptandclear_viewportlive in[ui.keymap.composer]. Use/keys listto see every action under its context. - Unknown names are errors. A misspelled context or a misspelled key under
[ui.keymap]fails the load and lists the valid names. A misspelled action also names the closest valid action (did you mean `toggle_detail_pane`?) and lists the valid ones for that context. - Bindings must be reachable. Orek rejects a binding that could never fire
because another binding owns the same key where both can be active, for
example
transcript.scroll_up = "ctrl+t"behind the built-in globalctrl+t. Rebind or unbind the other action first. - Approval keys are rebindable.
approve,deny,confirm, andalways_allowin[ui.keymap.approval]can be rebound like any other action. Esc stays reserved for cancelling the prompt, and Ctrl+C stays reserved. A bare printable approve key, such asy, can approve while you are typing ahead during an approval, so prefer a modified key unless you want that. - Set values with
orek config set ui.keymap.<context>.<action> <binding>or with the/keyseditor; both validate the whole keymap before saving.none,unbind,unbound, or[]leaves an action unbound. - Reset with
orek config unset ui.keymap, or in the TUI with/keys reset(or R in the editor). Either removes the whole table, leader and chord timeout included, even when the saved keymap no longer loads. If it does not load, Orek refuses to start and the error ends with this command.
[routing]
| Key | Type/default | Write | Purpose |
|---|---|---|---|
pinned_model |
Optional string; unset | Project | Model to use instead of automatic routing, given as a provider-prefixed ID. |
pinned_provider |
Optional string; unset | Project | Choose models only from this configured provider. |
default_preferred_models |
String array; empty when unset | TOML | Models the default route prefers. |
thinking_effort |
String; effective auto |
TOML | Reasoning effort to request; the model must support it. |
temperature |
Optional number; unset | Project | Sampling temperature; omitted from requests when unset. Anthropic requests never send it, because Claude 5 models reject any non-default value. |
cascade_enabled |
Boolean; false |
TOML | Let the main conversation switch to another provider or model after retries fail. |
Reasoning values are auto, none, minimal, low, medium, high,
xhigh, and max. The selected model must support the requested value.
Subagents handle fallback on their own, regardless of cascade_enabled. Orek
has no per-request cost cap. See Routing for pins, routes, and
failure handling.
[compaction]
Manage long conversations. Its write scope is Project.
| Key | Type/default | Purpose |
|---|---|---|
auto_compact_threshold |
Optional integer; derived | Context size, in tokens, at which Orek compacts the conversation before sending a request; 0 turns automatic compaction off, including after a provider rejects a request as too long. |
The limit is the smaller of auto_compact_threshold and 90% of the active
model’s input window, its context window less its output limit; when unset it
is that 90%. For a model with a 1,000,000-token window and a 128,000-token
output limit, that is 784,800 tokens. A higher value is capped at 90%, and the
limit follows the model after a switch. See
automatic compaction for how
the context is measured.
Oversized tool results are cut when they are recorded, with no setting; see
oversized tool output.
Summaries
Automatic compaction and /compact use the active model, unless the model
that answered last has a larger window, as after a switch to a smaller model;
then that model writes the summary. See
switching to a smaller model.
On Claude, when the same model wrote the conversation and its summary, the
summary request reuses the prompt cache. When the history is too long for the
summary request, its oldest messages are left out until it fits.
See session history for cancellation and resume
behavior.
[response_compression]
Ask the model for shorter replies. Compression is off until a
[response_compression] section exists in your configuration; adding one turns
it on with the ultra profile unless you choose another. The defaults below
apply only inside that section. These keys default to Project write scope.
| Key | Type/default within a configured section | Purpose |
|---|---|---|
enabled |
Boolean; true |
Master switch. |
default_profile |
off, lite, full, ultra; ultra |
Output style. |
guards.never_with_tools |
Boolean; false |
true turns compression off for requests that offer tools, including those that offer tools but ask the model not to call any, such as an --output-schema correction. |
guards.disabled_for_tasks |
String array; [] |
Reserved for tasks that are never compressed; this list currently has no effect. |
[exec]
Choose approvals, the OS sandbox, and limits on command output. See
Permissions and security.
default_approval_mode, require_approval_for, redact_exec_output,
sandbox_runtime_enabled and every auto_review key are
user-only: a project file cannot set them.
| Key | Type/default | Write | Purpose |
|---|---|---|---|
default_sandbox |
simulation, dry_run, approved; approved |
Project | Experimental. Whether edits and commands actually run; see below. |
default_approval_mode |
plan, default, auto_review, yolo; auto_review |
TOML (user) | Approval mode a session starts in. |
require_approval_for |
String array of file_write, file_delete, shell, network; [] |
User | Tool groups that ask for approval in every approval mode; see Always-ask tool groups. config set accepts a comma-separated list, and an empty value clears it. |
truncation_policy |
"bytes" |
Project | How the output limit is measured; only bytes is supported. |
truncation_limit |
Integer; 65536 bytes |
Project | Command output the model sees by default. |
max_allowed_limit |
Integer; 262144 bytes |
TOML | Highest max_output_bytes the model can ask for on one command. |
retain_truncated_output |
Boolean; true |
Project | Keep a copy of the original when a foreground command’s output is cut or shortened, so the model can read more with read_exec_output; within the limits below. |
retained_output_max_bytes |
Integer; 1048576 |
Project | Bytes kept per command. |
retained_output_session_max_bytes |
Integer; 16777216 |
Project | Bytes kept per session. |
redact_exec_output |
Boolean; true |
User | Redact recognized secrets before output reaches the model. |
sandbox_runtime_enabled |
Boolean; false |
User | Run commands in the OS sandbox: a filtered environment everywhere, plus Seatbelt on macOS. |
max_background_jobs |
Integer; 64 (1–256) |
Project | Most background jobs at once. A job counts until it and every process it started have exited and its output has been saved. |
auto_review.model |
String; "Shieldstral-1.0-3B-Q4_K_M.gguf" |
User | Local GGUF model filename for shell command safety review in auto_review mode. |
auto_review.timeout_ms |
Integer; 5000 (positive) |
User | Per-command timeout in milliseconds for local shell safety review. |
auto_review.risk_threshold |
Number; 0.50 (0.0–1.0) |
User | Risk score at which auto_review stops approving a shell command itself; commands scoring lower run, others ask you. |
orek run follows default_sandbox like an interactive session, so it
applies edits unless that setting says otherwise; its approval mode decides
what needs approval. Kept output has its own limits, so it may not hold the
complete original.
The OS sandbox is off by default. While it is off, shell and background commands run with the full inherited environment (including provider API keys) and without Seatbelt; approvals are the only protection. Language servers keep their own environment filter either way.
In the TUI, /sandbox on|off changes sandbox_runtime_enabled for the running
session only, and /sandbox persist on|off saves it to user configuration.
OREK_SANDBOX=off forces the sandbox off even when the setting is on, and the
TUI warns while it does. On Windows, stopping a command still stops every
process it started, with or without the sandbox.
default_sandbox is experimental and has no command, setup, or ACP control;
only configuration sets it. Under dry_run and simulation, file edits
and commands are previewed or described instead of applied. Models are not
told the session runs in such a mode and tend to retry those edits in a loop,
so keep approved unless you are experimenting. Setting another value with /config set prints a warning, and
the status bar shows [DRY-RUN] or [SIMULATION] while one is active.
[agent]
Subagent and continuation limits, and how a model switch treats earlier reasoning. Project is the default write scope unless stated otherwise.
| Key | Type/default | Purpose |
|---|---|---|
subagent_profiles |
Named tables; {}; User |
Named profiles: a prompt with an optional model, effort, tool list and limits (fields below). set writes the given [<name>] tables into the chosen scope and keeps that file’s other profiles; unset agent.subagent_profiles.<name> removes one profile, and unsetting the whole key removes every profile in that scope. Explicit Project scope is supported; same-name project tables replace whole user definitions. |
max_subagent_depth |
Integer; 2 |
How deep subagents can start their own subagents. |
max_live_subagents |
Integer; 256 (1–1024) |
Subagents running at once, whatever their tools. Further agents queue for a slot in request order and start as running ones finish; spawning is never refused for capacity. Finished agents hold no slot, and an agent waiting on other agents lends its slot while it waits; see Subagents. |
max_parallel_tool_calls |
Integer; 8 (1–64) |
Tool calls from one model response that run at once; the rest start as running ones finish. Calls that name the same file run in the order the model wrote them, approval prompts appear one at a time, and results return in that order. 1 runs a response’s calls one at a time, as does any model that sets supports_parallel_tools = false. |
subagent_idle_timeout_secs |
Integer; 3600 |
Seconds a subagent can stay inactive before Orek stops it. |
subagent_default_wait_secs |
Integer; 900 |
Default wait, in seconds, for wait_agent and adversarial_verify. |
auto_continue |
Boolean; false; User |
Keep working without a new message while tasks the agent listed for your current request are unfinished. |
reasoning_replay |
preserve or drop; drop; User |
Experimental. How a model switch treats earlier reasoning: preserve resends each provider its own reasoning; drop sends none from before the switch, except to Kimi Code, which requires its own. Applies at the next model switch. --reasoning-replay overrides it until Orek exits. |
max_auto_continuation_attempts |
Integer; 8 (1–255) |
Automatic continuations per request you send, when auto_continue is on. |
max_iterations |
Integer; 10000 |
Experimental. Most tool-call rounds in one agent turn. |
tool_loop_breaker.enabled |
Boolean; true |
Experimental. Catch a model repeating the same tool call with the same result. |
tool_loop_breaker.warn_after |
Integer; 3 |
Experimental. Identical calls in a row before Orek stops running them and tells the model to change course; at least 1. |
tool_loop_breaker.stop_after |
Integer; 10 |
Experimental. Identical calls in a row before Orek ends the turn; always more than warn_after. |
tool_loop_breaker.cumulative_warn_after |
Integer; 6 |
Experimental. Identical calls anywhere in a turn before Orek stops running them and tells the model to change course; at least 1. |
tool_loop_breaker.cumulative_stop_after |
Integer; 20 |
Experimental. Identical calls anywhere in a turn before Orek ends it; always more than cumulative_warn_after. |
tool_loop_breaker.exempt_tools |
String array; []; TOML |
Tools the loop breaker ignores. |
max_result_schema_retries |
Integer; 2; TOML |
Times a subagent is asked again when its answer does not match its result schema. |
adversarial_verify_min_tier |
Tier string; "Unknown"; User |
Lowest quality tier adversarial_verify accepts for its skeptic models. |
adversarial_verify_models |
String array; []; User |
Skeptic models for adversarial_verify, used in order; no others are used. |
With an empty list, every skeptic uses the active model, and the result says so. See Subagents.
Each [agent.subagent_profiles.<name>] table accepts only these fields:
| Field | Type/default | Purpose |
|---|---|---|
persona |
String; none | The profile’s prompt, added to the agent’s system prompt. |
model |
String; parent’s model | Model selector for agents started with this profile. |
reasoning_effort |
Effort string such as low or high; parent’s effort |
Reasoning effort for those agents. |
allowed_tools |
String array; every session tool, MCP tools included | Narrows the agent’s tools to keep it focused. It is not a security boundary. An MCP tool stays only when the list names it (mcp__{server}__{tool}). Names that match no tool are ignored, and the agent-management tools stay available below max_subagent_depth whatever the list says. An empty list leaves only those tools. It does not remove provider web tools enabled for the agent’s model; only an agent left with no tools at all runs without them. |
max_iterations |
Integer; 10000 |
Tool-call iterations per turn, capped by agent.max_iterations. |
max_budget_usd |
Number; unlimited | Cost limit per turn. |
max_tokens |
Integer; unlimited | Token limit, checked when a turn completes. |
An unknown field, such as a misspelling, stops the configuration from loading.
[index]
The code index, and the context Orek finds in it automatically.
| Key | Type/default | Write | Purpose |
|---|---|---|---|
enabled |
Boolean; true |
User | Experimental. Use the code index for automatic context and the code search tools. |
chunk_size |
Integer; 512 tokens |
Project | Target size of each indexed piece of code. |
chunk_overlap |
Integer; 64 tokens |
Project | Overlap between neighboring pieces. |
max_file_bytes |
Integer; 1048576 |
TOML | Largest file indexed, in bytes. |
index_unknown_text |
Boolean; true |
TOML | Index text files with unrecognized extensions. |
models_dir |
Optional path; unset | User | Directory containing local GGUF models; falls back to user cache and bundled models. User-only. |
llama_server_path |
Optional path; unset | User | Experimental. Path to the llama-server program Orek should use; leave unset to use the one installed with Orek. User-only. |
llama_server_device |
String; "auto" |
User | Experimental. Where local models run: "auto" uses a compatible GPU and falls back to the CPU, "cpu" uses the CPU only, or name one or more devices that orek doctor lists, separated by commas (such as "Vulkan0" or "MTL0"). Applies to embeddings, reranking, and auto-review. See GPU acceleration. User-only. |
llama_server_gpu_layers |
String or integer; "auto" |
User | Experimental. How much of each local model is placed on the GPU: "auto" fits as much as GPU memory allows, "all" places every layer, or give a number of layers (0 uses the CPU only). Applies to embeddings, reranking, and auto-review. User-only. |
embedding_batch_tokens |
Integer; 8192 |
Project | Experimental. Most estimated tokens per batch sent to the local embedding model. |
llama_server_idle_timeout_secs |
Integer; 300 |
User | Experimental. Idle seconds before Orek stops the llama-server it started (0 keeps it running). Applies to embeddings, reranking, and auto-review. User-only. |
retrieval.enabled |
Boolean; true |
User | Experimental. Add relevant code to each request automatically. |
retrieval.context_fraction |
Number; 0.05 |
User | Experimental. Share of the model’s context window for that code; 0–1. |
retrieval.rrf_k |
Integer; 20 |
TOML | Constant used to merge keyword and semantic search rankings; higher values narrow the gap between top and lower results. |
retrieval.rerank_enabled |
Boolean; false |
TOML | Re-rank results with a local model run by llama-server. |
retrieval.reranker_model |
Optional string; none | TOML | Reranker model, one of ("Qwen/Qwen3-Reranker-0.6B", "rozgo/bge-reranker-v2-m3", "BAAI/bge-reranker-base", or "jinaai/jina-reranker-v1-turbo-en"), required when rerank_enabled = true. Models whose license forbids commercial use are refused. |
retrieval.rerank_top_n |
Integer; 30 |
TOML | Results passed to the reranker. |
retrieval.max_selected_chunks |
Integer; 8 |
User | Pieces of code selected before related code is added. |
retrieval.graph_hops |
Integer; 1 |
User | Experimental. How many links to follow from selected code to related code in the code graph; 0 adds none. |
retrieval.max_graph_neighbors |
Integer; 3 |
User | Experimental. Most pieces of related code added per turn. |
retrieval.min_rerank_score |
Number; 0.0 |
User | Experimental. Lowest reranker score a result needs when reranking is on; 0–1. |
code_graph.default_include_source |
Boolean; true |
User | Experimental. Whether code_graph_query returns source code when the model does not say. |
code_graph.source_cap |
Integer; 5 |
User | Experimental. Most matches returned with source code when it is included. |
chunk_size must be positive and chunk_overlap must be smaller than it.
/retrieval off changes the current TUI session; /retrieval clear restores
the configured value. /retrieval persist off writes the user default.
For a project override:
In your shell
orek config set --scope project index.retrieval.enabled falseThis does not stop indexing, explicit references, graph queries, search_project, or
orek index query diagnostics. See retrieval controls.
[index.embedding]
By default, Orek creates embeddings locally with embeddinggemma-2 (768
dimensions). Set these fields in TOML.
Configuration
[index.embedding]
kind = "local-fastembed"
model = "embeddinggemma-2"For kind = "openai-compatible":
| Key | Type/default | Purpose |
|---|---|---|
provider |
String; required | Name of the [providers.<name>] connection to use. |
model |
String; required | Model name the embeddings API expects, without an Orek provider prefix. |
dimension |
Integer; required | Embedding size to store. |
egress_opt_in |
Boolean; false |
Allow requests to a remote host. |
batch_size |
Integer; 32 |
Maximum inputs per request. |
max_request_tokens |
Integer; 8192 |
Most estimated tokens per request. |
query_prefix |
Optional string; none | Instruction added to search queries only, not to indexed code. |
If the service returns longer embeddings, Orek shortens them to dimension.
Changing the model or dimension requires a full orek index build. Keep credentials
in the OS credential store or user-scope environment references.
Cloud embedding examples
cover Mistral, OpenAI, rebuilds, and the data sent to providers.
[permissions]
These are TOML settings; see permission examples.
Every key except sensitive_patterns is
user-only. A project file may add
sensitive_patterns, which only adds protected paths.
| Key | Type | Purpose |
|---|---|---|
tool_rules |
Array of rule tables | Allow, ask, or deny named tools. |
path_scopes |
Array of scope tables | Keep selected file tools inside a directory. |
mcp_server_rules |
Array of server rule tables | Allow, ask, or deny all tools from named MCP servers. The first matching rule wins; a server denied in every execution mode never starts. |
sensitive_patterns |
Regex string array | Case-insensitive patterns on every platform. Tools ask for approval on matching paths, and matching files are left out of the index, language-server diagnostics and @file references. An invalid pattern stops the configuration from loading. |
url_allowlist |
Optional string array | Allowed network destinations; explicit [] blocks them. |
env_allowlist |
String array | Extra environment variables passed to commands. |
sandbox_read_paths |
Path array | Extra paths commands may read in the sandbox. |
sandbox_write_paths |
Path array | Extra paths commands may write in the sandbox. |
A rule in tool_rules, mcp_server_rules, or path_scopes that Orek cannot apply,
such as an unknown decision or mode, stops your configuration from loading. The
error names the rule, so you can correct it in your user config file. Orek still
opens and shows the error, and other commands stop with it. Ignoring the rule would
silently remove the restriction you wrote.
env_allowlist, sandbox_read_paths, and sandbox_write_paths shape the OS
sandbox, so they apply only while exec.sandbox_runtime_enabled is on.
With the sandbox on, commands receive a basic set of variables, including
common toolchain variables and, on Windows, system paths such as SystemRoot,
ComSpec, TEMP, USERPROFILE, APPDATA, and LOCALAPPDATA so programs can
start. Windows names match regardless of case. Add any other variable, such as
a secret a command needs, to env_allowlist.
[tools.read_file]
These settings default to User write scope. Restart Orek after changing them.
| Key | Type/default | Purpose |
|---|---|---|
warn_unbounded_lines |
Integer; 300 |
Experimental. Show a notice when a read without a line range returns more lines than this; 0 turns the notice off. |
max_lines |
Integer; 2000 |
Most lines read_file returns without a line range. |
max_bytes |
Integer; 45056 |
Most bytes read_file returns without a line range. The default fits under the 12,000-token limit on a saved tool result. |
explicit_max_bytes |
Integer; 45056 |
Most bytes read_file returns for a given line range. |
read_many_max_bytes |
Integer; 32768 |
Most bytes read_many_files returns in total. |
read_many_per_file_max_lines |
Integer; 300 |
Most lines read_many_files returns per file. |
[tools.search_project]
These experimental settings control search_project, the tool the model uses
to search your project’s content. Restart Orek or start a new session after
changing them.
| Key | Type/default | Write | Purpose |
|---|---|---|---|
enabled |
Boolean; true |
User | Offer search_project to the model when indexing is on. Separate from automatic retrieval. |
max_tokens |
Integer; 4096 (256–8192) |
User | Most estimated tokens in one result; the search itself retrieves no more than fits. |
max_bytes |
Integer; 32768 (1024–32768) |
User | Most bytes in one result, including its details and any error. |
Zero or a value outside these ranges stops the configuration from loading,
and config set refuses it. Omitted fields keep their defaults; unsetting a
project override restores the user value or built-in default. The tool
searches the main project index with your embedding and retrieval settings,
and reports a missing or out-of-date index instead of building one.
Configuration
[tools.search_project]
enabled = true
max_tokens = 4096
max_bytes = 32768To keep automatic context but take search_project away from the model:
In your shell
orek config set tools.search_project.enabled falseindex.retrieval.enabled, /retrieval off, and @!retrieve affect only
automatic retrieval. index.enabled = false removes both search_project
and code_graph_query; --no-tools disables all callable tools. See
search arguments and result states.
[tools.memory]
| Key | Type/default | Write | Purpose |
|---|---|---|---|
enabled |
Boolean; true |
User | Turn on the memory tool and the saved memory index it adds to the model’s context. false turns off both after restart. |
See memory for storage and permission rules.
[tools.apply_patch]
| Key | Type/default | Write | Purpose |
|---|---|---|---|
exposed |
Boolean; false |
User | Offer apply_patch, which edits several files in one patch, to every model after restart. A per-model hidden rule still wins. |
To offer it to some models only, prefer a per-model revealed rule; see
model tool access.
[tools.run_python]
| Key | Type/default | Write | Purpose |
|---|---|---|---|
enabled |
Boolean; true |
User | Experimental. Offer the run_python tool, which runs a Python script, optionally with an input_command whose output becomes the script’s stdin. While it is on, Orek no longer suggests piping a script into Python through the shell; false brings that back after restart. |
With or without it, a shell command that pipes data into a Python script that
also reads stdin from a heredoc (cmd | python3 - <<'EOF') is refused before
approval with Not run:, because stdin cannot carry both.
[tools.web]
| Key | Type/default | Write | Purpose |
|---|---|---|---|
fetch_output_max_chars |
Integer; 250000 |
TOML | Most characters of page text one webfetch returns. |
[tools.shell]
These TOML settings choose the program behind the shell tool. The tool
keeps the name shell whether it runs PowerShell or a POSIX shell, and Orek
tells the model which shell it is using. When Orek recognizes a shell error, it
tells the model how to recover; it never rewrites or retries a command itself.
bash and powershell are aliases for shell. Permission rules, path
scopes, loop-breaker exemptions, [tool_exposure] hidden and revealed lists,
tier allowlists, and subagent profiles that use either name still match.
Always allow saves toolName = "shell".
| Key | Type/default | Purpose |
|---|---|---|
default_shell |
String; "auto" |
Shell program to run. User-only. |
interactive |
Boolean; false |
Start POSIX shells with -i, and PowerShell without -NonInteractive. |
login |
Boolean; true |
Start POSIX shells with -l, and let PowerShell load profiles. |
On Windows, automatic selection uses PowerShell 7 (pwsh.exe), then Windows
PowerShell 5.1 (powershell.exe). Elsewhere it uses $SHELL, then bash.
Windows shell compatibility
When only Windows PowerShell 5.1 is available, Orek supports top-level
&&/|| command chains and refuses malformed or nested chains without running
them. If you choose cmd.exe, Orek cannot check its commands, so every
command asks for approval outside yolo.
fish and other non-POSIX shells
Orek understands command syntax only for PowerShell (pwsh, powershell) and
recognized POSIX shells (sh, bash, rbash, dash, zsh, ksh, ksh93,
mksh, lksh, pdksh, oksh, loksh, ash, hush, busybox, yash,
posh). Under any other shell—such as fish, csh, tcsh, nu, elvish,
xonsh, or a renamed binary like pwsh-preview—or when a command names one of
those shells (fish -c ..., ... | fish, echo fish), Orek runs the shell
with -c and always prompts for approval outside yolo (commandPrefix
rules, Always allow, and auto_review do not apply, and non-interactive
runs fail at the first such command). Orek cannot detect such a shell when a
command reaches it indirectly, for example through a variable, a renamed
program, or a script, without naming it.
[observe]
| Key | Type/default | Write | Purpose |
|---|---|---|---|
otlp_endpoint |
Optional URL; unset | User | Where to send OpenTelemetry (OTLP) traces and metrics. |
Nothing is exported while no endpoint is set. To turn export off, remove the value from both scopes and restart:
In your shell
orek config unset observe.otlp_endpoint --scope project
orek config unset observe.otlp_endpoint --scope user
orek config get observe.otlp_endpointLocal logs, saved sessions, and model requests are not affected.
Authentication uses OTEL_EXPORTER_OTLP_HEADERS, not a project secret.
OTEL_SERVICE_NAME overrides the default orek-cli service name.
See Disable remote export.
[update]
| Key | Type/default | Write | Purpose |
|---|---|---|---|
check_on_startup |
Boolean; false |
User | When the TUI starts, check the public release catalog for a newer release in your current major (the rc channel when your version is a pre-release, otherwise stable), cached for 24 hours in the cache directory. A newer release shows one notice and an [update vX] status-bar chip suggesting orek upgrade; catalog failures stay silent. Only your current major is queried, so the notice never advertises a major you may not own. |
[skills]
| Key | Type/default | Write | Purpose |
|---|---|---|---|
enabled |
Boolean; true |
Project | Turn on skills, both built-in and from skill folders. |
search_paths |
Path array; [] |
User | Extra folders to load skills from; config set accepts comma-separated paths. |
catalog_budget_fraction |
Number; 0.01 |
User | Experimental. Share of the model’s context window for the list of available skills; 0.001–0.05. |
The built-in code-review and performance-investigation skills contain
instructions only, and a project or user skill with the same name replaces
them. orek skills discover lists skills from other tools without activating
them or changing search paths; orek skills import copies one you choose.
See skills and activation.
[lsp]
Language-server diagnostics need enabled = true, and you must trust each
server for each project with /lsp trust <server>. All three switches are off
by default.
| Key | Type/default | Write | Purpose |
|---|---|---|---|
enabled |
Boolean; false |
Project | Turn language-server diagnostics on. |
startup_timeout_ms |
Integer; 15000 |
Project | Time a server has to start. |
settle_timeout_ms |
Integer; 5000 |
Project | Time to wait for analysis to finish. |
post_edit_injection |
Boolean; false |
User | Show diagnostics above the diff of a successful edit. |
post_edit_timeout_ms |
Integer; 2000 |
Project | How long to wait for diagnostics after an edit. |
pre_turn_injection |
Boolean; false |
User | Add current diagnostics for @file references to the next request only; they are not saved in the session. |
max_diagnostics |
Integer; 20 |
Project | Most diagnostics per file. |
max_result_chars |
Integer; 2000 |
Project | Most characters of diagnostics shown. |
max_instances |
Integer; 4 |
Project | Most language servers running at once, counting one per server and project root. |
Trust grants are stored outside the repository, and editing a declaration never grants trust. See Language servers.
Server declaration and diagnostic details
Named server tables live under [lsp.servers.<name>] and are managed with
orek lsp add / orek lsp remove, not with orek config set. Adding a table
does not trust the server. The built-in catalog includes
16 language servers (rust-analyzer, gopls, pyright, typescript-language-server,
clangd, jdtls, OmniSharp, kotlin-language-server, sourcekit-lsp, Dart analysis
server, intelephense, ruby-lsp, Metals, elixir-ls, lua-language-server, R
languageserver). rust-analyzer is the default when no override is declared.
An unknown field in a [lsp.servers.<name>] table stops the configuration
from loading.
A declaration with a built-in server’s name keeps the built-in values only for
fields it leaves out; an explicit empty list or map (args = [],
language_id_map = {}, platforms = []) replaces them.
language_ids are Orek’s names for the languages a server handles;
protocol_language_ids are the IDs sent to the server. When set, extensions,
filenames, and shebangs are checked first.
root_markers matches any single marker, while each entry in
root_marker_groups requires every marker in that group. root_strategy is
"nearest" by default and may be "outermost". String values in commands,
arguments, explicit environment values, initialization options, and settings
may use {project_root}, {root}, and {cache_dir}, which are replaced as
plain text. {root} is not allowed in the server’s command, so the program you
trusted cannot change.
Language servers start with a basic environment (PATH, home, user, shell,
temp, terminal, locale, and common language-runtime variables) plus only the
variables you declare in the server’s env map, so provider API keys are never
passed on. A server that times out, fails to start, crashes, is not trusted,
or does not support the file never reports the file as clean.
[tool_exposure]
Use TOML to control which tools a model sees.
| Key | Type | Purpose |
|---|---|---|
tier.<tier>.allowed |
Tool-name array | The only ordinary tools that models in this quality tier may use. |
per_model[].hidden |
Tool-name array | Hide and refuse these tools for one model. |
per_model[].revealed |
Tool-name array | Show tools that are hidden by default. |
Tiers are frontier, high, medium, low, and unknown.
MCP tools, subagent and workflow tools (such as spawn_agent and
run_workflow), and the task tools write_tasks and update_plan ignore tier
allowlists. To hide them, use an exact per-model rule:
Configuration
[[tool_exposure.per_model]]
provider = "ollama"
model = "ollama/qwen2.5-coder:7b"
hidden = ["write_tasks", "fanout"]Per-model hidden always applies, even to those tools. write_tasks is
visible by default, so it needs no revealed entry. See
Plan and track work.
[mcp]
| Key | Type/default | Write | Purpose |
|---|---|---|---|
enabled |
Boolean; true |
Project | Experimental. Enable MCP connections. |
tool_output_max_chars |
Integer; 100000 |
User | Experimental. Most characters of output per tool call. |
servers |
Named tables | TOML/MCP CLI | Server declarations, sorted by name. |
Use orek mcp add or named [mcp.servers.<name>] tables. An unknown field in
a server table stops the configuration from loading. This HTTP example
declares a server; it does not complete OAuth or grant project consent:
Configuration
[mcp.servers.linear]
url = "https://mcp.linear.app/mcp"
auth = "oauth"
enabled = true
soft_fail = true
startup_timeout_secs = 30
tool_timeout_secs = 60
allowed_tools = []command selects stdio; url selects streamable HTTP. An empty
allowed_tools exposes every tool returned by that server.
startup_timeout_secs limits connecting and fetching the server’s tool list
(each page of the list has 15 seconds). tool_timeout_secs limits how long a
tool call waits for a result or a progress update; each update restarts the
wait, up to ten times tool_timeout_secs in total. Optional headers adds
HTTP headers, and bearer_token_env names an environment variable holding a
bearer token to use instead of OAuth.
See MCP setup.
Expansion, environment, and consent
- Environment references:
${VAR}and${VAR:-default}expand in commands, args,envvalues, URLs, andheaderswhen the configuration loads. - Server environment: Stdio MCP servers start with a basic environment (
PATH, home, user, shell, temp, terminal, locale, and standard Windows system paths), so provider API keys never reach a server unless you pass them. Declare any secrets a server needs (GITHUB_TOKEN, custom variables) in itsenvmap. - Server & tool naming: Server names use
[a-z0-9_-](up to 64 characters, no doubled or leading/trailing underscores), and tools are namedmcp__{server}__{tool}(shortened the same way every time when needed to fit 64 characters). An editor connected through ACP can pass a server with the same name; for that session Orek uses the editor’s connection but keeps yourenabled,allowed_tools, timeouts, and permission rules, and never uses your saved headers, environment, or OAuth credentials. See IDE integration. - Consent & permissions: Servers declared in a project’s
.orek/config.tomlask for your approval before they first connect, and again if the declaration changes; servers in your user configuration connect without asking. Per-server tool rules live in[permissions.mcp_server_rules](allow,ask_user, ordeny), and MCP tool calls default toask_user.