Reference
Configuration reference
Every setting that Glider reads, with its type, its default and its function. Each key here
is a field in internal/config/config.go. A key that this page does not list does
not exist.
Which file. Glider reads configs/glider.yaml from the current
directory. To use a different file, give --config:
.\glider.exe --config configs\glider.local.yaml. Refer to
the profiles below.
The profiles that Glider supplies
| File | Function |
configs/glider.yaml | The default. A hybrid: local models and cloud, with transparent interception on. |
configs/glider.local.yaml | Pure local. No cloud key. Refer to Pure local. |
configs/glider.cloud.yaml | Cloud only. |
configs/glider.transparent-test.yaml | A profile for a test of transparent interception. |
What applies immediately, and what needs a restart
Glider applies most changes while it operates. Edit the file, or save from the
Config page of the dashboard.
| Applies immediately | Needs a restart |
| The routing rules, the model aliases, the context thresholds, the log level, and the
clients for the backends and the models |
The listen ports, the CA of the MITM, the host list, and each setting for transparent
interception |
To see the condition: the Config page of the dashboard shows the list of
hot-swap modules. A response also carries the header
X-Glider-Backend-Reload after you save from that page.
server
| Key | Type | Default | Function |
proxy_port | int | 8080 | The gateway. It gives the /v1/* endpoints. |
dashboard_port | int | 8081 | The dashboard, the /api/* endpoints and this documentation. |
log_level | string | info | debug, info, warn or error. |
thresholds
| Key | Type | Default | Function |
max_local_context_tokens | int | 8000 | The ceiling on the context that Glider gives to a local model. |
idle_unload_timeout | duration | 5m | Glider removes a model from memory after this time with no use. |
request_timeout | duration | 10m | The HTTP timeout for a local backend. Increase it for a large model with a long tool loop. |
default_max_tokens | int | 8192 | The max_tokens of a completion. Ollama receives this value as num_predict. Increase it if a report stops in the middle of a sentence. |
vram
| Key | Type | Default | Function |
strategy | string | dynamic | static, dynamic or hybrid. How Glider gives the GPU memory to the models. The supplied glider.yaml sets hybrid. |
headroom_mb | int | 512 | The memory that Glider keeps free, in MB. |
max_loaded_models | int | 3 | The count of models that stay in memory together. |
gpu_assignments | map | — | A model name to a GPU index. PUT /api/gpu-assignments writes this map. |
models
A list. Each entry describes one model.
| Key | Type | Default | Function |
name | string | — | The name of the model, as its backend knows it. |
backend | string | ollama | The name of an entry in backends. |
vram_estimate_mb | int | 5000 | The memory that this model needs. The strategy for the VRAM uses this value. |
max_context | int | 8192 | The context window of the model. |
capabilities | list | — | Labels such as code. A rule can select a model by a label. |
adapter | string | — | The name of a LoRA adapter to apply. vLLM only. |
adapters[].name | string | — | The name of one LoRA adapter that Glider can load. |
adapters[].path | string | — | The path to that adapter. |
keep_warm | bool | false | Keeps the model in memory. The idle timeout does not apply to it. |
model_aliases
A map from a name that a CLI sends to a model that you have. This is how a request for
gpt-4o reaches a local model with no change in the CLI.
model_aliases:
claude-3.5-sonnet: qwen2.5-coder:14b
gpt-4o: qwen2.5-coder:14b
routing
Refer to Routing for the full priority sequence and each trigger type.
| Key | Type | Default | Function |
rules | list | — | The rules. Each field is here. |
default | string | — | local or cloud. It changes the target of the priority-0 rule. Therefore a profile becomes pure local with no edit to each rule. |
default_local_model | string | — | The model for that rule when default is local. |
allow_cloud_fallback | bool | true | With false, Glider never goes to the cloud after a local model fails. Pure local uses false. |
complexity_from | string | heuristic | heuristic, cursor or both. It selects the source of the complexity score. |
turn_family_ttl | duration | 90s | How long a turn family stays open for a summary or a title that comes after it. Refer to MITM. |
routing.task_classifier
It adds rules that use a heuristic. The rules go between the explicit commands and the context size.
| Key | Type | Default | Function |
enabled | bool | true | Turns the classifier on. |
tools_force_cloud | bool | true | A request that has tools[] goes to the cloud. Set false to permit a local model with tools. That model must support tools. |
must_cloud_patterns | list | built-in | Regular expressions that force the cloud. A value here replaces the built-in list. |
small_local_patterns | list | built-in | Regular expressions that select the local model. A value here replaces the built-in list. |
local_model | string | — | The model for a match with a small task. |
cloud_backend | string | — | The backend for a match that must use the cloud. |
cloud_model | string | — | The model for that match. |
tools_priority | int | 85 | The priority of the rule for the tools. |
must_cloud_priority | int | 80 | The priority of the rule that must use the cloud. |
small_local_priority | int | 70 | The priority of the rule for a small task. |
routing.complexity
| Key | Type | Default | Function |
enabled | bool | false | Adds a rule that uses the complexity score. |
cloud_above | int | 70 | A score of this value or more goes to the cloud. The range is 0 to 100. |
priority | int | 75 | The priority of that rule. It is below must-cloud (80) and above small-local (70). |
cloud_backend | string | — | The backend for the rule. |
cloud_model | string | — | The model for the rule. |
routing.tool_followup
It controls where the calls of a tool go, after a parent turn has a route.
| Key | Type | Default | Function |
enabled | bool | true | Turns this control on. |
inherit_parent_default | bool | true | A call starts with the decision of its parent turn. |
reevaluate | bool | true | Permits a safe tool to go to the local model, also when the parent went to the cloud. |
local_tool_allowlist | list | — | The names of the tools that can go to the local model. An example is read_file or grep. |
cloud_tool_denylist | list | — | A match here forces the cloud. An example is Shell or Write. |
orchestration
| Key | Type | Default | Function |
fan_out.enabled | bool | false | Permits one message to go to more than one worker. The supplied glider.yaml keeps this section as a comment. |
fan_out.max_workers | int | 2 | The count of workers for one fan-out. |
concurrency.worker_queue_size | int | 16 | The size of the queue of the workers. |
concurrency.result_chan_size | int | 32 | The size of the channel for the results. |
concurrency.max_inflight | int | 4 | The count of requests that operate together. |
orchestration.tools
Refer to Tools & MCP for each tool.
| Key | Type | Default | Function |
workspace | string | ~/.glider/workspace | The root of the sandbox for fs_*, git_* and shell_exec. Do not set it to ., or the tools operate in the repository of Glider. |
allow_shell | bool | false | Permits shell_exec. It is off, because the tool is dangerous. |
shell_allowlist | list | — | The commands that shell_exec can run. |
allow_hosts | list | any | Limits http_fetch and web_fetch to these hosts. An empty list permits each host. |
web_search.provider | string | auto | auto, duckduckgo, brave, tavily, serpapi or searxng. |
web_search.max_results | int | 5 | The count of results. A value of more than 10 becomes 10. |
web_search.brave_api_key_env | string | BRAVE_SEARCH_API_KEY | The environment variable that holds the key for Brave. BRAVE_API_KEY also operates. |
web_search.tavily_api_key_env | string | TAVILY_API_KEY | The environment variable that holds the key for Tavily. |
web_search.serpapi_key_env | string | SERPAPI_KEY | The environment variable that holds the key for SerpAPI. |
web_search.searxng_url | string | — | The URL of your own SearXNG. The variable SEARXNG_URL also operates. |
web_search.fetch_max_bytes | int | 65536 | The ceiling on the body that web_fetch reads. A value of more than 262144 becomes 262144. |
cloud
| Key | Type | Default | Function |
providers[].name | string | — | The name that a rule uses, such as openai or anthropic. |
providers[].api_key_env | string | — | The environment variable that holds the key. Glider never writes the key in the config. |
providers[].base_url | string | — | The endpoint of the provider. |
rate_limit.requests_per_minute | int | 30 | The ceiling on the requests to the cloud. |
rate_limit.tokens_per_minute | int | 100000 | The ceiling on the tokens to the cloud. |
budget_cap_usd | float | 50 | The ceiling on the cost. |
backends
| Key | Type | Default | Function |
name | string | — | The name that models[].backend uses. |
type | string | — | ollama, vllm, openai or anthropic. |
url | string | — | The address of the backend. Ollama uses http://127.0.0.1:11434. |
health_check_interval | duration | 30s | How often Glider tests that the backend operates. |
dashboard
| Key | Type | Default | Function |
enabled | bool | true | Turns the dashboard and the /api/* endpoints on. |
It controls the messages that Glider gives to a local model.
| Key | Type | Default | Function |
enabled | bool | false | Turns the transformation on. |
trim_context | bool | false | Removes the older messages before Glider sends the request. |
augment_prepend | string | — | Text that goes before the prompt. |
augment_append | string | — | Text that goes after the prompt. |
local_context | string | latest_turn | latest_turn sends the most recent turn only. full sends the messages with no limit. |
local_system_max_chars | int | 4000 | The ceiling on the system content under latest_turn. |
local_episode_count | int | 3 | The count of earlier episodes that go in the pack. A value of 0 stops this. |
local_episode_max_chars | int | 1500 | The ceiling on the full block of the episodes. |
mitm
Read MITM & interception before you change these settings.
| Key | Type | Default | Function |
enabled | bool | true | Turns the proxy of the MITM on. |
port | int | 8082 | The listener for CONNECT. |
ca_cert | string | ~/.glider/mitm/ca.crt | The certificate of the CA of Glider. |
ca_key | string | ~/.glider/mitm/ca.key | The private key of that CA. |
hosts | list | see the file | The hosts that Glider decrypts. Glider sends each other host with no decryption. |
passthrough_default | bool | true | A host that is not in the list goes to its origin with no change. |
transparent | bool | true | Turns interception at the level of the operating system on. It needs Administrator on Windows, or root on Linux. |
transparent_port | int | 8083 | The ingress for the redirected connections. It is not the same as port. |
transparent_ports | list | [443] | The destination ports that Glider intercepts. |
windivert_dll_path | string | ~/.glider/mitm/windivert/WinDivert.dll | Windows only. WinDivertNN.sys must be in the same directory. With no value, transparent does nothing. |
origin_on_local_error | bool | true | If the local model fails, the request goes to its origin. Set false for pure local, so an error is visible. |
require_local_healthy | bool | false | Glider selects the local model only when a health check succeeds. This stops a silent change to the origin. |
debug_agent_rpc | bool | false | Adds logs, the dumps of the bodies, and GET /api/mitm/debug/recent. The variable GLIDER_MITM_DEBUG_RPC also turns it on. |
debug_dump_dir | string | ~/.glider/mitm-debug/ | Where those dumps go. |
agent_rpc_fulfill | bool | true | Permits a local reply on the Agent RPC plane of Cursor. |
agent_rpc_canned_on_error | bool | false | Writes fixed text when the local model fails, in place of the origin. |
agent_rpc_canned_text | string | pong from glider (canned Path B) | That text. |
agent_rpc_tool_codec | bool | false | Permits a local reply for the loop of a tool. The variable GLIDER_MITM_AGENT_RPC_TOOL_CODEC also turns it on. |
context
Refer to Context for the two layers and the selection.
| Key | Type | Default | Function |
max_events | int | 4096 | The size of the event ring in memory. |
retain_days | int | 14 | How long the files events-*.jsonl stay on disk. |
warm_load_days | int | 2 | How many days Glider reads again when it starts. |
background.token_budget | int | 20000 | The ceiling on the block that goes with each delegate call. |
background.max_entries | int | 20 | The count of entries in that block. |
background.max_entry_chars | int | 4000 | One entry, before Glider removes its middle. |
summary.enabled | bool | true | Permits a model to write the summary. With false, Glider still compacts, with the deterministic digest. |
summary.chain | list | [origin, cloud, local] | The order that Glider tries. The values are origin, cloud, local and none. |
summary.origin_vendor | string | — | Which CLI answers for origin. With no value, Glider uses the front CLI of that workspace. Only a headless template can do this work. |
summary.cloud_backend | string | — | The backend for cloud. |
summary.cloud_model | string | — | The model for cloud. |
summary.local_model | string | routing.default_local_model | The model for local. |
The environment variables
Glider reads .env and .env.local from the repository root when it
starts. It does not change a variable that your shell already gives. Both files are in
.gitignore. Copy .env.example to begin.
The switches for MITM
Each one accepts 1, true, yes or on, and
the case does not matter. A switch only turns a setting ON. It never turns
one off, therefore you cannot use it to remove a value from the config file.
| Variable | The setting that it turns on |
GLIDER_MITM_DEBUG_RPC | mitm.debug_agent_rpc |
GLIDER_MITM_AGENT_RPC_FULFILL | mitm.agent_rpc_fulfill |
GLIDER_MITM_AGENT_RPC_CANNED | mitm.agent_rpc_canned_on_error |
GLIDER_MITM_AGENT_RPC_TOOL_CODEC | mitm.agent_rpc_tool_codec |
GitHub, for MCP
| Variable | Function |
GITHUB_PERSONAL_ACCESS_TOKEN | A personal access token. GITHUB_TOKEN and GH_TOKEN also operate. |
GLIDER_GITHUB_OAUTH_CLIENT_ID | The id of your OAuth app. It turns the Sign in with GitHub button on. |
GLIDER_GITHUB_OAUTH_CLIENT_SECRET | The secret of that app. With no secret, Glider uses the device procedure. |
GLIDER_GITHUB_OAUTH_SCOPES | The scopes to ask for, such as repo read:org read:user. |
GLIDER_GITHUB_OAUTH_REDIRECT_URI | Changes the callback. The default is http://127.0.0.1:8081/oauth/callback, and the OAuth app must give exactly this value. |
Web search
| Variable | Function |
BRAVE_SEARCH_API_KEY | The key for Brave. BRAVE_API_KEY also operates. |
TAVILY_API_KEY · SERPAPI_KEY | The keys for those services. |
SEARXNG_URL | The address of your own SearXNG. |
A key of orchestration.tools.web_search names the variable to read. Therefore
you can use a different name. Refer to
orchestration.tools.
Other
| Variable | Function |
The variable in cloud.providers[].api_key_env | The key of that provider. An example is OPENAI_API_KEY or ANTHROPIC_API_KEY. |
GLIDER_HOME | Moves the directory of the credentials from ~/.glider/credentials to <GLIDER_HOME>/credentials. It changes only the credentials. |
What Glider tests in a config
Glider tests the config when it reads it. POST /api/validate does the same
tests, and it applies nothing. A test gives an error or a
warning. An error stops the config. A warning does not, because the
condition can be correct: a model can exist in a backend that Glider did not scan.
A value must be in the set
| Key | The values that it accepts |
server.log_level | debug · info · warn · error |
vram.strategy | dynamic · hybrid · static |
routing.default | local · cloud |
routing.complexity_from | heuristic · cursor · both |
transform.local_context | latest_turn · full |
routing.rules[].trigger.type | explicit · regex · context_size · always · script · composer_wrapup |
routing.rules[].action.target is necessary. A value that is not
local or cloud gives a warning, and not an error.
A value must be in a range
| Key | Range |
server.proxy_port | 1 to 65535 |
server.dashboard_port · mitm.port | 0 to 65535 |
routing.complexity.cloud_above | 0 to 100 |
thresholds.max_local_context_tokens · vram.headroom_mb · vram.max_loaded_models · models[].vram_estimate_mb · models[].max_context | 0 or more |
thresholds.idle_unload_timeout · thresholds.request_timeout · routing.turn_family_ttl · backends[].health_check_interval | A duration that Go can read, such as 90s, 5m or 10m. |
A name must exist, and it must be one name
| Rule |
backends[].name and backends[].url are necessary. |
models[].name is necessary, and two models cannot share a name. |
An empty key of model_aliases, or an empty target, is an error. |
The GPU index in vram.gpu_assignments must be 0 or more, and it must be less than the count of the GPUs that Glider found. |
These give a warning only
| Condition |
models[].backend does not name an entry in backends. |
A target of model_aliases is not in models. |
A model in vram.gpu_assignments is not in models. |
A rule sends work to a local model that is not in models. |
| A model is not in the list that Glider found in the backend. This is an error when the test is not soft. |
A trigger must carry its own field
| Type | The field that it must have |
explicit | commands |
regex | pattern, and the expression must compile |
script | file |
context_size | operator |
routing.rules[].name is necessary for each rule, and
trigger.type is necessary. The patterns of
routing.task_classifier must compile as regular expressions.
How to test a config
GET /api/config # the config that operates now
GET /api/config?format=yaml # the same, as YAML
POST /api/validate # tests a config, and applies nothing
GET /api/router/lint # finds an error in the routing rules
The Playground page of the dashboard reads a message with the same parser
that Glider uses, and it changes nothing.
Next: Routing gives each trigger type,
Context gives the two memory layers, and
the API gives each endpoint.