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

FileFunction
configs/glider.yamlThe default. A hybrid: local models and cloud, with transparent interception on.
configs/glider.local.yamlPure local. No cloud key. Refer to Pure local.
configs/glider.cloud.yamlCloud only.
configs/glider.transparent-test.yamlA 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 immediatelyNeeds 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

KeyTypeDefaultFunction
proxy_portint8080The gateway. It gives the /v1/* endpoints.
dashboard_portint8081The dashboard, the /api/* endpoints and this documentation.
log_levelstringinfodebug, info, warn or error.

thresholds

KeyTypeDefaultFunction
max_local_context_tokensint8000The ceiling on the context that Glider gives to a local model.
idle_unload_timeoutduration5mGlider removes a model from memory after this time with no use.
request_timeoutduration10mThe HTTP timeout for a local backend. Increase it for a large model with a long tool loop.
default_max_tokensint8192The 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

KeyTypeDefaultFunction
strategystringdynamicstatic, dynamic or hybrid. How Glider gives the GPU memory to the models. The supplied glider.yaml sets hybrid.
headroom_mbint512The memory that Glider keeps free, in MB.
max_loaded_modelsint3The count of models that stay in memory together.
gpu_assignmentsmapA model name to a GPU index. PUT /api/gpu-assignments writes this map.

models

A list. Each entry describes one model.

KeyTypeDefaultFunction
namestringThe name of the model, as its backend knows it.
backendstringollamaThe name of an entry in backends.
vram_estimate_mbint5000The memory that this model needs. The strategy for the VRAM uses this value.
max_contextint8192The context window of the model.
capabilitieslistLabels such as code. A rule can select a model by a label.
adapterstringThe name of a LoRA adapter to apply. vLLM only.
adapters[].namestringThe name of one LoRA adapter that Glider can load.
adapters[].pathstringThe path to that adapter.
keep_warmboolfalseKeeps 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.

KeyTypeDefaultFunction
ruleslistThe rules. Each field is here.
defaultstringlocal 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_modelstringThe model for that rule when default is local.
allow_cloud_fallbackbooltrueWith false, Glider never goes to the cloud after a local model fails. Pure local uses false.
complexity_fromstringheuristicheuristic, cursor or both. It selects the source of the complexity score.
turn_family_ttlduration90sHow 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.

KeyTypeDefaultFunction
enabledbooltrueTurns the classifier on.
tools_force_cloudbooltrueA request that has tools[] goes to the cloud. Set false to permit a local model with tools. That model must support tools.
must_cloud_patternslistbuilt-inRegular expressions that force the cloud. A value here replaces the built-in list.
small_local_patternslistbuilt-inRegular expressions that select the local model. A value here replaces the built-in list.
local_modelstringThe model for a match with a small task.
cloud_backendstringThe backend for a match that must use the cloud.
cloud_modelstringThe model for that match.
tools_priorityint85The priority of the rule for the tools.
must_cloud_priorityint80The priority of the rule that must use the cloud.
small_local_priorityint70The priority of the rule for a small task.

routing.complexity

KeyTypeDefaultFunction
enabledboolfalseAdds a rule that uses the complexity score.
cloud_aboveint70A score of this value or more goes to the cloud. The range is 0 to 100.
priorityint75The priority of that rule. It is below must-cloud (80) and above small-local (70).
cloud_backendstringThe backend for the rule.
cloud_modelstringThe model for the rule.

routing.tool_followup

It controls where the calls of a tool go, after a parent turn has a route.

KeyTypeDefaultFunction
enabledbooltrueTurns this control on.
inherit_parent_defaultbooltrueA call starts with the decision of its parent turn.
reevaluatebooltruePermits a safe tool to go to the local model, also when the parent went to the cloud.
local_tool_allowlistlistThe names of the tools that can go to the local model. An example is read_file or grep.
cloud_tool_denylistlistA match here forces the cloud. An example is Shell or Write.

orchestration

KeyTypeDefaultFunction
fan_out.enabledboolfalsePermits one message to go to more than one worker. The supplied glider.yaml keeps this section as a comment.
fan_out.max_workersint2The count of workers for one fan-out.
concurrency.worker_queue_sizeint16The size of the queue of the workers.
concurrency.result_chan_sizeint32The size of the channel for the results.
concurrency.max_inflightint4The count of requests that operate together.

orchestration.tools

Refer to Tools & MCP for each tool.

KeyTypeDefaultFunction
workspacestring~/.glider/workspaceThe 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_shellboolfalsePermits shell_exec. It is off, because the tool is dangerous.
shell_allowlistlistThe commands that shell_exec can run.
allow_hostslistanyLimits http_fetch and web_fetch to these hosts. An empty list permits each host.
web_search.providerstringautoauto, duckduckgo, brave, tavily, serpapi or searxng.
web_search.max_resultsint5The count of results. A value of more than 10 becomes 10.
web_search.brave_api_key_envstringBRAVE_SEARCH_API_KEYThe environment variable that holds the key for Brave. BRAVE_API_KEY also operates.
web_search.tavily_api_key_envstringTAVILY_API_KEYThe environment variable that holds the key for Tavily.
web_search.serpapi_key_envstringSERPAPI_KEYThe environment variable that holds the key for SerpAPI.
web_search.searxng_urlstringThe URL of your own SearXNG. The variable SEARXNG_URL also operates.
web_search.fetch_max_bytesint65536The ceiling on the body that web_fetch reads. A value of more than 262144 becomes 262144.

cloud

KeyTypeDefaultFunction
providers[].namestringThe name that a rule uses, such as openai or anthropic.
providers[].api_key_envstringThe environment variable that holds the key. Glider never writes the key in the config.
providers[].base_urlstringThe endpoint of the provider.
rate_limit.requests_per_minuteint30The ceiling on the requests to the cloud.
rate_limit.tokens_per_minuteint100000The ceiling on the tokens to the cloud.
budget_cap_usdfloat50The ceiling on the cost.

backends

KeyTypeDefaultFunction
namestringThe name that models[].backend uses.
typestringollama, vllm, openai or anthropic.
urlstringThe address of the backend. Ollama uses http://127.0.0.1:11434.
health_check_intervalduration30sHow often Glider tests that the backend operates.

dashboard

KeyTypeDefaultFunction
enabledbooltrueTurns the dashboard and the /api/* endpoints on.

transform

It controls the messages that Glider gives to a local model.

KeyTypeDefaultFunction
enabledboolfalseTurns the transformation on.
trim_contextboolfalseRemoves the older messages before Glider sends the request.
augment_prependstringText that goes before the prompt.
augment_appendstringText that goes after the prompt.
local_contextstringlatest_turnlatest_turn sends the most recent turn only. full sends the messages with no limit.
local_system_max_charsint4000The ceiling on the system content under latest_turn.
local_episode_countint3The count of earlier episodes that go in the pack. A value of 0 stops this.
local_episode_max_charsint1500The ceiling on the full block of the episodes.

mitm

Read MITM & interception before you change these settings.

KeyTypeDefaultFunction
enabledbooltrueTurns the proxy of the MITM on.
portint8082The listener for CONNECT.
ca_certstring~/.glider/mitm/ca.crtThe certificate of the CA of Glider.
ca_keystring~/.glider/mitm/ca.keyThe private key of that CA.
hostslistsee the fileThe hosts that Glider decrypts. Glider sends each other host with no decryption.
passthrough_defaultbooltrueA host that is not in the list goes to its origin with no change.
transparentbooltrueTurns interception at the level of the operating system on. It needs Administrator on Windows, or root on Linux.
transparent_portint8083The ingress for the redirected connections. It is not the same as port.
transparent_portslist[443]The destination ports that Glider intercepts.
windivert_dll_pathstring~/.glider/mitm/windivert/WinDivert.dllWindows only. WinDivertNN.sys must be in the same directory. With no value, transparent does nothing.
origin_on_local_errorbooltrueIf the local model fails, the request goes to its origin. Set false for pure local, so an error is visible.
require_local_healthyboolfalseGlider selects the local model only when a health check succeeds. This stops a silent change to the origin.
debug_agent_rpcboolfalseAdds logs, the dumps of the bodies, and GET /api/mitm/debug/recent. The variable GLIDER_MITM_DEBUG_RPC also turns it on.
debug_dump_dirstring~/.glider/mitm-debug/Where those dumps go.
agent_rpc_fulfillbooltruePermits a local reply on the Agent RPC plane of Cursor.
agent_rpc_canned_on_errorboolfalseWrites fixed text when the local model fails, in place of the origin.
agent_rpc_canned_textstringpong from glider (canned Path B)That text.
agent_rpc_tool_codecboolfalsePermits 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.

KeyTypeDefaultFunction
max_eventsint4096The size of the event ring in memory.
retain_daysint14How long the files events-*.jsonl stay on disk.
warm_load_daysint2How many days Glider reads again when it starts.
background.token_budgetint20000The ceiling on the block that goes with each delegate call.
background.max_entriesint20The count of entries in that block.
background.max_entry_charsint4000One entry, before Glider removes its middle.
summary.enabledbooltruePermits a model to write the summary. With false, Glider still compacts, with the deterministic digest.
summary.chainlist[origin, cloud, local]The order that Glider tries. The values are origin, cloud, local and none.
summary.origin_vendorstringWhich 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_backendstringThe backend for cloud.
summary.cloud_modelstringThe model for cloud.
summary.local_modelstringrouting.default_local_modelThe 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.

VariableThe setting that it turns on
GLIDER_MITM_DEBUG_RPCmitm.debug_agent_rpc
GLIDER_MITM_AGENT_RPC_FULFILLmitm.agent_rpc_fulfill
GLIDER_MITM_AGENT_RPC_CANNEDmitm.agent_rpc_canned_on_error
GLIDER_MITM_AGENT_RPC_TOOL_CODECmitm.agent_rpc_tool_codec

GitHub, for MCP

VariableFunction
GITHUB_PERSONAL_ACCESS_TOKENA personal access token. GITHUB_TOKEN and GH_TOKEN also operate.
GLIDER_GITHUB_OAUTH_CLIENT_IDThe id of your OAuth app. It turns the Sign in with GitHub button on.
GLIDER_GITHUB_OAUTH_CLIENT_SECRETThe secret of that app. With no secret, Glider uses the device procedure.
GLIDER_GITHUB_OAUTH_SCOPESThe scopes to ask for, such as repo read:org read:user.
GLIDER_GITHUB_OAUTH_REDIRECT_URIChanges the callback. The default is http://127.0.0.1:8081/oauth/callback, and the OAuth app must give exactly this value.

Web search

VariableFunction
BRAVE_SEARCH_API_KEYThe key for Brave. BRAVE_API_KEY also operates.
TAVILY_API_KEY · SERPAPI_KEYThe keys for those services.
SEARXNG_URLThe 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

VariableFunction
The variable in cloud.providers[].api_key_envThe key of that provider. An example is OPENAI_API_KEY or ANTHROPIC_API_KEY.
GLIDER_HOMEMoves 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

KeyThe values that it accepts
server.log_leveldebug · info · warn · error
vram.strategydynamic · hybrid · static
routing.defaultlocal · cloud
routing.complexity_fromheuristic · cursor · both
transform.local_contextlatest_turn · full
routing.rules[].trigger.typeexplicit · 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

KeyRange
server.proxy_port1 to 65535
server.dashboard_port · mitm.port0 to 65535
routing.complexity.cloud_above0 to 100
thresholds.max_local_context_tokens · vram.headroom_mb · vram.max_loaded_models · models[].vram_estimate_mb · models[].max_context0 or more
thresholds.idle_unload_timeout · thresholds.request_timeout · routing.turn_family_ttl · backends[].health_check_intervalA 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

TypeThe field that it must have
explicitcommands
regexpattern, and the expression must compile
scriptfile
context_sizeoperator

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.