Skip to content

Configuration

All configuration is stored locally at %LOCALAPPDATA%\LeaseGateLite\leasegatelite.config.json. No cloud sync, no telemetry. Changes take effect immediately via POST /config with no daemon restart required.

These settings control how many AI calls run concurrently and how the daemon manages load:

SettingDefaultDescription
MaxConcurrency8Upper limit on simultaneous AI calls
InteractiveReserve2Slots reserved for user-initiated requests
BackgroundCap6Maximum background/batch calls allowed
CooldownBehaviorMildDelay between calls: Off, Mild, or Aggressive

The daemon automatically adjusts behavior based on system pressure:

SettingDefaultDescription
SoftThresholdPercent70CPU/RAM percentage where concurrency begins reducing gradually
HardThresholdPercent90CPU/RAM percentage where aggressive throttling kicks in
RecoveryRatePercent20How quickly concurrency ramps back up after pressure drops
SmoothingPercent40Dampening factor to prevent oscillation between states

When the smoothed pressure crosses the soft threshold, the daemon reduces effective concurrency proportionally. If pressure hits the hard threshold, the daemon clamps to minimum concurrency and enters Spicy heat state.

Control how individual requests are constrained:

SettingDefaultDescription
MaxOutputTokensClamp1024Maximum token output per request
MaxPromptTokensClamp4096Maximum prompt size allowed
OverflowBehaviorTrimOldestWhat happens when the queue is full: TrimOldest, Deny, or QueueOnly
MaxRetries2Automatic retries for transient failures
RetryBackoffMs500Milliseconds between retries

Global rate controls applied across all AI calls:

SettingDefaultDescription
RequestsPerMinute120Maximum number of requests per minute
TokensPerMinute120,000Maximum total tokens per minute
BurstAllowance12Short-term burst capacity above the rate limit

The daemon tracks connected clients via X-Client-AppId, X-Process-Name, and X-Client-Signature headers. You can set per-app overrides that take precedence over global settings:

  • MaxConcurrency, BackgroundCap, MaxOutputTokensClamp, MaxPromptTokensClamp, RequestsPerMinute, TokensPerMinute

Use GET /profiles to see recently connected apps, then POST /profiles/apply to set an override for a specific client.

Configuration changes take effect immediately via POST /config. No daemon restart required. Use POST /config/reset (with apply=true) to restore factory defaults at any time.

Use POST /preset/preview before applying a preset to see exactly what will change.