Entropic 2.9.4
Local-first agentic inference engine
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
16#pragma once
17
19
20#include <cstdint>
21#include <string>
22#include <vector>
23#include <optional>
24#include <filesystem>
25#include <unordered_map>
26
27namespace entropic {
28
38enum class MCPAccessLevel : uint8_t {
39 NONE = 0,
40 READ = 1,
41 WRITE = 2,
42};
43
48struct MCPKey {
49 std::string tool_pattern;
51};
52
60const char* mcp_access_level_name(MCPAccessLevel level);
61
70bool parse_mcp_access_level(const std::string& name, MCPAccessLevel& out);
71
81 std::string key;
82 std::string gbnf_content;
83 std::string source;
84 bool validated = false;
85 std::string error;
86};
87
101
112enum class AdapterState : int {
113 COLD = 0,
114 WARM = 1,
115 HOT = 2
116};
117
127 std::string name;
128 std::filesystem::path path;
130 float scale = 1.0f;
131 std::string tier_name;
132 std::string base_model_path;
133 size_t ram_bytes = 0;
134
136 std::unordered_map<std::string, std::string> metadata;
137};
138
149 std::filesystem::path path;
150 std::string adapter = "qwen35";
151 int context_length = 16384;
152 int gpu_layers = -1;
153 bool keep_warm = false;
154 bool use_mlock = true;
155
156 /* ── llama.cpp pass-through ────────────────────────── */
158 std::string cache_type_k = "f16";
159 std::string cache_type_v = "f16";
160 int n_batch = 512;
161
172 int n_ubatch = 0;
173
174 int n_threads = 0;
175 std::string tensor_split;
176
186 std::string split_mode;
187
194 int main_gpu = 0;
195
202 bool offload_kqv = true;
203
212 float rope_freq_base = 0.0f;
213
222 float rope_freq_scale = 0.0f;
223
232 int n_parallel = 1;
233 bool flash_attn = true;
234
235 /* ── Tool filtering ────────────────────────────────── */
236 std::optional<std::vector<std::string>> allowed_tools;
237
238 /* ── Vision / multimodal (v1.9.11) ────────────────── */
239
244 std::filesystem::path mmproj_path;
245
246 /* ── Model format (v1.9.13) ───────────────────────── */
247
254 std::string model_format = "gguf";
255};
256
267 size_t max_bytes = 536870912;
268 bool enabled = true;
269 bool log_hits = true;
274 bool warm_keep = true;
275};
276
291 std::string name;
292 int n_batch = 512;
293 int n_threads = 0;
295 std::string description;
296};
297
303 float temperature = 0.7f;
304 float top_p = 0.9f;
305 int top_k = 40;
306 float repeat_penalty = 1.1f;
307
315 float min_p = 0.0f;
316
322 float presence_penalty = 0.0f;
323
336 std::unordered_map<int32_t, float> logit_bias;
337
349 float frequency_penalty = 0.0f;
350
351 int max_tokens = 4096;
352
356 int seed = -1;
358 bool enable_thinking = true;
359 std::string grammar;
364 std::string grammar_key;
365 std::vector<std::string> stop;
372 std::string tool_call_mode;
373 int logprobs = 0;
374
375 /* ── v1.9.7: Time cap + profile fields ────────────── */
376
381
386 std::string profile;
387
393 bool auto_adapt = true;
394
398 float adapt_headroom = 0.9f;
399
411 std::string tools;
412};
413
426 std::optional<std::filesystem::path> identity;
427 bool identity_disabled = false;
428 std::optional<std::filesystem::path> grammar;
429 std::optional<std::string> auto_chain;
430 std::optional<bool> routable;
431
435 std::optional<std::filesystem::path> adapter_path;
436
439 float adapter_scale = 1.0f;
440
455 std::vector<std::string> capabilities;
456
462 std::optional<float> temperature;
463
467 std::optional<int> max_output_tokens;
468
474 std::optional<float> top_p;
475 std::optional<int> top_k;
476 std::optional<float> min_p;
477 std::optional<float> presence_penalty;
478 std::optional<float> frequency_penalty;
479
485 std::optional<float> repeat_penalty;
486 std::optional<bool> enable_thinking;
493 std::optional<std::string> tool_call_mode;
494
502 std::optional<bool> speculative_mtp;
503
511 bool has_capability(const std::string& name) const {
512 for (const auto& c : capabilities) {
513 if (c == name) { return true; }
514 }
515 return false;
516 }
517
530 std::string get_param(const std::string& param_name) const {
531 if (param_name == "explicit_completion") {
532 return auto_chain.has_value() ? "false" : "true";
533 }
534 return "";
535 }
536};
537
543 std::unordered_map<std::string, TierConfig> tiers;
544 std::optional<ModelConfig> router;
545 std::string default_tier = "lead";
546
558 std::string find_tier_by_path(
559 const std::filesystem::path& model_path) const {
560 for (const auto& [name, tier] : tiers) {
561 if (tier.path == model_path) { return name; }
562 }
563 return "";
564 }
565};
566
578 bool enabled = false;
579 std::string fallback_tier = "lead";
580 std::optional<std::string> classification_prompt;
581 std::unordered_map<std::string, std::string> tier_map;
582 std::unordered_map<std::string, std::vector<std::string>> handoff_rules;
583};
584
590 std::vector<std::string> allow;
591 std::vector<std::string> deny;
592 bool auto_approve = false;
593};
594
601 bool fail_on_errors = true;
602 float diagnostics_timeout = 1.0f;
603 bool allow_outside_root = false;
604 std::optional<int> max_read_bytes;
605 float max_read_context_pct = 0.25f;
606};
607
613 bool enabled = false;
614 std::optional<std::filesystem::path> socket_path;
615 int rate_limit = 10;
616};
617
623 uint32_t base_delay_ms = 1000;
624 uint32_t max_delay_ms = 60000;
625 uint32_t max_retries = 5;
626 double backoff_factor = 2.0;
627};
628
634 std::string command;
635 std::vector<std::string> args;
636 std::unordered_map<std::string, std::string> env;
637 std::string url;
638};
639
644struct MCPConfig {
645 bool enable_entropic = true;
646 bool enable_filesystem = true;
647 bool enable_bash = true;
648 bool enable_git = true;
649 bool enable_diagnostics = true;
650 bool enable_web = true;
654 std::string working_dir;
655
656 /* ── v1.8.7: External MCP client settings ──────────── */
657 std::unordered_map<std::string, ExternalServerEntry> external_servers;
660 uint32_t tool_call_timeout_ms = 30000;
661};
662
673 std::filesystem::path log_dir;
674 std::string session_id;
675 bool enabled = true;
677 size_t max_file_size = 0;
678 size_t max_files = 5;
679};
680
686 bool enabled = true;
687 std::filesystem::path db_path;
688 size_t log_max_file_size = 10 * 1024 * 1024;
689 size_t log_max_files = 3;
691};
692
698 bool enabled = true;
699 float threshold_percent = 0.75f;
702 bool notify_user = true;
703 bool save_full_history = true;
706};
707
713 int max_tokens = 4096;
714 float default_temperature = 0.7f;
715 float default_top_p = 0.9f;
716
723 std::string budget_mode = "off";
724
731};
732
738 std::string command;
739 std::vector<std::string> args;
740 std::vector<std::string> extensions;
741};
742
747struct LSPConfig {
748 bool enabled = true;
749 bool python_enabled = true;
750 bool c_enabled = true;
751 std::unordered_map<std::string, LSPServerConfig> servers;
752};
753
770 bool enabled = false;
773 float temperature = 0.0f;
774 bool enable_thinking = false;
775 int priority = 100;
776 std::string grammar_key = "constitutional_critique";
778 std::vector<std::string> skip_tiers = {"lead"};
783 std::string critique_tier;
784};
785
824 ModelConfig cfg;
825 cfg.gpu_layers = 0;
826 cfg.flash_attn = false;
827 cfg.context_length = 8192;
828 cfg.n_threads = 4;
829 return cfg;
830}
831
877 bool enabled = false;
878 int n_draft = 4;
884 bool mtp = false;
890
906};
907
920
987
998 float temperature = 0.7f;
999 int max_output_tokens = 4096;
1000 bool enable_thinking = false;
1001 float repeat_penalty = 1.1f;
1002 std::optional<std::vector<std::string>> bash_commands;
1003};
1004
1005} // namespace entropic
Shared enumerations used across .so boundaries.
@ ENTROPIC_MODEL_STATE_WARM
mmap'd + mlock'd in RAM, slow inference
Definition enums.h:29
@ ENTROPIC_MODEL_STATE_COLD
On disk only, no RAM consumed.
Definition enums.h:28
@ ENTROPIC_MODEL_STATE_ACTIVE
GPU layers loaded, full inference speed.
Definition enums.h:30
Activate model on GPU (WARM → ACTIVE).
ModelState
C++ enum class for model VRAM lifecycle states.
Definition config.h:96
@ WARM
mmap'd + mlock'd in RAM
@ ACTIVE
GPU layers loaded, full speed.
@ COLD
On disk only, no RAM consumed.
const char * mcp_access_level_name(MCPAccessLevel level)
Convert MCPAccessLevel to string representation.
Definition config.cpp:21
ModelConfig make_default_draft_model_config()
Speculative decoding configuration (v2.1.11, gh#36).
Definition config.h:823
MCPAccessLevel
MCP tool access level for per-identity authorization.
Definition config.h:38
@ READ
Read-only operations (e.g., read_file, list_directory)
@ NONE
No access (default for ungranted keys)
@ WRITE
Read + write operations (e.g., write_file, execute)
AdapterState
LoRA adapter lifecycle state.
Definition config.h:112
@ COLD
Not loaded. No resources consumed.
@ HOT
Active on context via llama_set_adapter_lora(). Influencing generation.
bool parse_mcp_access_level(const std::string &name, MCPAccessLevel &out)
Parse MCPAccessLevel from string.
Definition config.cpp:35
Metadata for a loaded LoRA adapter.
Definition config.h:126
std::string tier_name
Tier this adapter is assigned to (empty = unassigned)
Definition config.h:131
size_t ram_bytes
RAM consumption when WARM/HOT (0 if COLD)
Definition config.h:133
std::string base_model_path
Path of the base model this adapter targets.
Definition config.h:132
std::filesystem::path path
Resolved path to .gguf adapter file.
Definition config.h:128
AdapterState state
Current lifecycle state.
Definition config.h:129
std::string name
Unique adapter identifier.
Definition config.h:127
std::unordered_map< std::string, std::string > metadata
Adapter-specific metadata for routing decisions.
Definition config.h:136
float scale
LoRA scaling factor (alpha/rank)
Definition config.h:130
Audit log configuration within StorageConfig.
Definition config.h:672
size_t max_file_size
Rotation size in bytes (0 = unlimited)
Definition config.h:677
size_t flush_interval_entries
Flush every N entries (0 = every entry)
Definition config.h:676
std::string session_id
UUID for this session.
Definition config.h:674
std::filesystem::path log_dir
Directory for audit log files.
Definition config.h:673
bool enabled
Master toggle for audit logging.
Definition config.h:675
size_t max_files
Max rotated files to keep.
Definition config.h:678
Auto-compaction configuration.
Definition config.h:697
bool save_full_history
Save full history before compaction.
Definition config.h:703
bool notify_user
Notify user on compaction.
Definition config.h:702
float warning_threshold_percent
Warning trigger (0.3–0.9)
Definition config.h:705
int preserve_recent_turns
Turns to preserve (1–10)
Definition config.h:700
int summary_max_tokens
Summary max tokens (500–4000)
Definition config.h:701
int tool_result_ttl
Tool result TTL in turns (>= 1; v2.1.3 #6: gated on fill, no upper bound)
Definition config.h:704
float threshold_percent
Compaction trigger (0.5–0.99)
Definition config.h:699
bool enabled
Enable auto-compaction.
Definition config.h:698
Constitutional validation pipeline configuration.
Definition config.h:769
int max_revisions
Max re-generation attempts (0 = critique only)
Definition config.h:771
int priority
Hook priority (higher = later)
Definition config.h:775
bool enable_thinking
Enable think-blocks for critique (default OFF)
Definition config.h:774
float temperature
Critique generation temperature.
Definition config.h:773
bool enabled
Global enable/disable (default OFF)
Definition config.h:770
std::string critique_tier
Tier to route critique generation on.
Definition config.h:783
int max_critique_tokens
Token budget for critique generation.
Definition config.h:772
std::string grammar_key
Grammar registry key.
Definition config.h:776
std::vector< std::string > skip_tiers
Tiers exempt from validation (default: lead — streams before hook fires)
Definition config.h:778
External MCP server configuration (Entropic-as-server).
Definition config.h:612
std::optional< std::filesystem::path > socket_path
Socket path (nullopt = derived)
Definition config.h:614
int rate_limit
Requests per minute (1–100)
Definition config.h:615
bool enabled
Enable external MCP.
Definition config.h:613
Configuration for a single external MCP server entry.
Definition config.h:633
std::string command
Stdio command (empty for SSE)
Definition config.h:634
std::vector< std::string > args
Stdio command arguments.
Definition config.h:635
std::string url
SSE endpoint URL (empty for stdio)
Definition config.h:637
std::unordered_map< std::string, std::string > env
Stdio environment variables.
Definition config.h:636
Filesystem MCP server configuration.
Definition config.h:599
bool diagnostics_on_edit
Proactive diagnostics on edit/write.
Definition config.h:600
bool allow_outside_root
Allow file ops outside workspace root.
Definition config.h:603
float diagnostics_timeout
Diagnostics timeout (0.1–5.0)
Definition config.h:602
std::optional< int > max_read_bytes
Max file read size (nullopt = derive from context)
Definition config.h:604
float max_read_context_pct
Max context % for single file read.
Definition config.h:605
bool fail_on_errors
Rollback edit if it introduces errors.
Definition config.h:601
Named GPU resource profile for controlling inference hardware knobs.
Definition config.h:290
int n_threads_batch
CPU threads for batch processing (0 = use n_threads)
Definition config.h:294
int n_batch
Batch size for prompt processing (1-2048)
Definition config.h:292
std::string name
Profile name ("maximum", "balanced", "background", "minimal")
Definition config.h:291
int n_threads
CPU threads for generation (0 = auto-detect)
Definition config.h:293
std::string description
Human-readable description.
Definition config.h:295
Generation parameters configuration (top-level defaults).
Definition config.h:712
int max_tokens
Default max tokens (64–32768)
Definition config.h:713
float default_top_p
Default top_p (0.0–1.0)
Definition config.h:715
int budget_limit
gh#80 (v2.5.0) budget ceiling: generated tokens (budget_mode "tokens") or wall-clock seconds (budget_...
Definition config.h:730
std::string budget_mode
gh#80 (v2.5.0) thinking-budget mode: "off" (default), "tokens", or "wall_clock".
Definition config.h:723
float default_temperature
Default temperature (0.0–2.0)
Definition config.h:714
Generation parameters for a single inference call.
Definition config.h:302
int time_limit_ms
Wall-clock time cap in milliseconds.
Definition config.h:380
int reasoning_budget
Per-call think budget override (-1 = unlimited)
Definition config.h:357
std::string grammar
GBNF grammar string (empty = unconstrained)
Definition config.h:359
std::string profile
GPU resource profile name.
Definition config.h:386
std::string tool_call_mode
Per-call tool-call generation mode (gh#103).
Definition config.h:372
int top_k
Top-K sampling.
Definition config.h:305
bool auto_adapt
Enable throughput-based max_tokens auto-adaptation.
Definition config.h:393
std::unordered_map< int32_t, float > logit_bias
Per-token logit bias map (gh#23 MVP item 4).
Definition config.h:336
float repeat_penalty
Repetition penalty.
Definition config.h:306
std::string tools
Active tool definitions for this turn, as an MCP tool-list JSON array ([{name, description,...
Definition config.h:411
float temperature
Sampling temperature.
Definition config.h:303
std::string grammar_key
Grammar registry key.
Definition config.h:364
float frequency_penalty
Frequency-penalty term in llama.cpp's penalties sampler (gh#23 MVP item 3).
Definition config.h:349
float presence_penalty
Presence-penalty term in llama.cpp's penalties sampler (gh#23 MVP item 2).
Definition config.h:322
bool enable_thinking
Enable <think> blocks (false if reasoning_budget == 0)
Definition config.h:358
int logprobs
Top log-probs per token (0 = disabled)
Definition config.h:373
float adapt_headroom
Target time usage fraction for auto-adaptation.
Definition config.h:398
float min_p
Min-p nucleus sampling threshold (gh#23 MVP item 1).
Definition config.h:315
int max_tokens
Maximum tokens to generate.
Definition config.h:351
float top_p
Nucleus sampling threshold.
Definition config.h:304
int seed
RNG seed for reproducible sampling.
Definition config.h:356
std::vector< std::string > stop
Stop sequences.
Definition config.h:365
Metadata for a registered grammar.
Definition config.h:80
std::string source
Origin: "bundled", "file", "runtime", "dynamic".
Definition config.h:83
std::string key
Unique registry key (e.g., "compactor", "chess_executor")
Definition config.h:81
bool validated
true if grammar has passed validation
Definition config.h:84
std::string error
Non-empty if validation failed.
Definition config.h:85
std::string gbnf_content
Raw GBNF grammar string.
Definition config.h:82
Inference-side configuration knobs (v2.1.11).
Definition config.h:917
SpeculativeConfig speculative
Speculative decoding (gh#36)
Definition config.h:918
LSP integration configuration.
Definition config.h:747
bool python_enabled
Enable Python LSP.
Definition config.h:749
bool enabled
Enable LSP integration.
Definition config.h:748
bool c_enabled
Enable C/C++ LSP.
Definition config.h:750
std::unordered_map< std::string, LSPServerConfig > servers
Custom server overrides.
Definition config.h:751
Configuration for a single LSP server.
Definition config.h:737
std::string command
Server command.
Definition config.h:738
std::vector< std::string > args
Command arguments.
Definition config.h:739
std::vector< std::string > extensions
File extensions.
Definition config.h:740
MCP server configuration.
Definition config.h:644
ReconnectConfig reconnect
Reconnection backoff policy.
Definition config.h:658
bool enable_entropic
Enable entropic internal server (handoff, delegate, pipeline)
Definition config.h:645
FilesystemConfig filesystem
Filesystem server config.
Definition config.h:651
bool enable_filesystem
Enable filesystem server.
Definition config.h:646
std::unordered_map< std::string, ExternalServerEntry > external_servers
Named external servers.
Definition config.h:657
bool enable_git
Enable git server.
Definition config.h:648
bool enable_diagnostics
Enable diagnostics server.
Definition config.h:649
int server_timeout_seconds
Server timeout (5–300)
Definition config.h:653
uint32_t health_check_interval_ms
Ping interval (0 = disabled)
Definition config.h:659
uint32_t tool_call_timeout_ms
Per-call timeout for external tools.
Definition config.h:660
bool enable_bash
Enable bash server.
Definition config.h:647
ExternalMCPConfig external
External MCP server config (Entropic-as-server)
Definition config.h:652
std::string working_dir
Server working directory (empty = CWD) (v2.0.4)
Definition config.h:654
bool enable_web
Enable web server.
Definition config.h:650
A single authorized MCP key with access level.
Definition config.h:48
MCPAccessLevel level
Granted access level (READ or WRITE)
Definition config.h:50
std::string tool_pattern
Tool pattern (e.g., "filesystem.*", "git.status")
Definition config.h:49
Model configuration for a single tier.
Definition config.h:148
std::filesystem::path mmproj_path
Vision projector GGUF path.
Definition config.h:244
int gpu_layers
GPU offload layers (-1 = all)
Definition config.h:152
int reasoning_budget
Think token budget (-1 = unlimited)
Definition config.h:157
int n_ubatch
Physical micro-batch size for prompt processing (gh#23 MVP item 5).
Definition config.h:172
int context_length
Context window size (512–131072)
Definition config.h:151
std::filesystem::path path
Resolved model file path.
Definition config.h:149
std::string model_format
Expected model format.
Definition config.h:254
float rope_freq_scale
RoPE frequency scaling factor (gh#23 MVP item 10).
Definition config.h:222
int main_gpu
Primary GPU index for model load (gh#23 MVP item 7).
Definition config.h:194
int n_threads
CPU threads (0 = auto-detect)
Definition config.h:174
bool offload_kqv
Offload KQV ops (incl.
Definition config.h:202
int n_parallel
Max parallel sequences per context (gh#23 MVP item 11).
Definition config.h:232
std::string tensor_split
Multi-GPU tensor split ratios (empty = single GPU)
Definition config.h:175
std::string cache_type_k
KV cache key quantization type.
Definition config.h:158
bool keep_warm
Pre-warm model at startup.
Definition config.h:153
std::string cache_type_v
KV cache value quantization type.
Definition config.h:159
std::string split_mode
Multi-GPU split mode for model load (gh#23 MVP item 6).
Definition config.h:186
int n_batch
Batch size for prompt processing.
Definition config.h:160
bool flash_attn
Enable flash attention.
Definition config.h:233
bool use_mlock
Lock model in system RAM.
Definition config.h:154
std::optional< std::vector< std::string > > allowed_tools
Tool whitelist (nullopt = all)
Definition config.h:236
std::string adapter
Chat adapter name.
Definition config.h:150
float rope_freq_base
RoPE base frequency override (gh#23 MVP item 9).
Definition config.h:212
Configuration for all models (tiers + router).
Definition config.h:542
std::optional< ModelConfig > router
Router model (separate from tiers)
Definition config.h:544
std::unordered_map< std::string, TierConfig > tiers
Tier name → config.
Definition config.h:543
std::string find_tier_by_path(const std::filesystem::path &model_path) const
Find tier name by model path.
Definition config.h:558
std::string default_tier
Default tier name.
Definition config.h:545
Full parsed configuration.
Definition config.h:929
int vram_reserve_mb
Reserved VRAM headroom (MB, 0–65536)
Definition config.h:950
StorageConfig storage
Storage backend settings (v1.8.8)
Definition config.h:938
PermissionsConfig permissions
Tool permissions.
Definition config.h:933
PromptCacheConfig prompt_cache
Prompt KV cache settings.
Definition config.h:937
std::optional< std::filesystem::path > app_context
App context: nullopt = disabled by default.
Definition config.h:946
CompactionConfig compaction
Auto-compaction settings.
Definition config.h:935
RoutingConfig routing
Routing rules.
Definition config.h:931
InferenceConfig inference
Inference-side knobs (currently speculative decoding only).
Definition config.h:985
ModelsConfig models
Tiers + router.
Definition config.h:930
LSPConfig lsp
LSP integration.
Definition config.h:936
ConstitutionalValidationConfig constitutional_validation
Constitutional validation pipeline settings.
Definition config.h:981
std::filesystem::path log_dir
Session log directory (session.log + session_model.log).
Definition config.h:957
bool ggml_logging
Enable ggml/llama.cpp logging to llama_ggml.log in log_dir.
Definition config.h:961
GenerationConfig generation
Default generation params.
Definition config.h:932
std::string log_level
Log level string.
Definition config.h:939
MCPConfig mcp
MCP server settings.
Definition config.h:934
bool console_logging
Emit engine spdlog output to the stderr console sink.
Definition config.h:978
bool inject_model_context
Auto-inject model context into system prompt.
Definition config.h:949
std::filesystem::path llama_log_path
Override path for ggml/llama log when ggml_logging == true (gh#23 MVP item 12, v2....
Definition config.h:971
bool app_context_disabled
true if app_context explicitly disabled
Definition config.h:947
std::optional< std::filesystem::path > constitution
Constitution: nullopt = bundled default, disabled = explicit false.
Definition config.h:942
bool constitution_disabled
true if constitution explicitly disabled
Definition config.h:943
std::filesystem::path config_dir
Config dir — base for bundled data discovery.
Definition config.h:953
Tool permission configuration.
Definition config.h:589
std::vector< std::string > deny
Denied tool patterns (glob)
Definition config.h:591
std::vector< std::string > allow
Allowed tool patterns (glob)
Definition config.h:590
bool auto_approve
Skip confirmation prompts.
Definition config.h:592
Inference parameters for a single identity phase.
Definition config.h:997
int max_output_tokens
Max tokens per generation.
Definition config.h:999
float repeat_penalty
Repetition penalty.
Definition config.h:1001
bool enable_thinking
Enable think-block output.
Definition config.h:1000
std::optional< std::vector< std::string > > bash_commands
Phase-specific bash commands.
Definition config.h:1002
float temperature
Sampling temperature.
Definition config.h:998
Prompt caching configuration.
Definition config.h:266
size_t max_bytes
Maximum cache RAM (512 MB default)
Definition config.h:267
bool log_hits
Log cache hit/miss at INFO level.
Definition config.h:269
bool enabled
Master switch (false = no caching)
Definition config.h:268
bool warm_keep
gh#96 (v2.7.5): keep the prior turn's KV resident and re-decode only the appended delta (warm-keep / ...
Definition config.h:274
Reconnection policy configuration for external MCP servers.
Definition config.h:622
uint32_t max_retries
Max attempts (0 = infinite)
Definition config.h:625
uint32_t base_delay_ms
Initial retry delay.
Definition config.h:623
uint32_t max_delay_ms
Maximum retry delay cap.
Definition config.h:624
double backoff_factor
Exponential backoff multiplier.
Definition config.h:626
Configuration for model routing.
Definition config.h:577
std::string fallback_tier
Fallback when routing fails.
Definition config.h:579
std::unordered_map< std::string, std::vector< std::string > > handoff_rules
Tier handoff rules.
Definition config.h:582
bool enabled
Enable routing.
Definition config.h:578
std::optional< std::string > classification_prompt
Custom prompt (nullopt = auto)
Definition config.h:580
std::unordered_map< std::string, std::string > tier_map
Classification → tier mapping.
Definition config.h:581
Speculative-decoding configuration (inference.speculative.
Definition config.h:876
bool enabled
Master switch (off by default)
Definition config.h:877
bool mtp
gh#106 (v2.9.0): drive MTP (the draft is a trunk-sharing head via ctx_other) instead of the gh#36 sep...
Definition config.h:884
int n_draft
Window size (proposed tokens).
Definition config.h:878
ModelConfig draft
Full ModelConfig for the draft model.
Definition config.h:905
Storage backend configuration.
Definition config.h:685
AuditLogConfig audit_log
Audit log settings (v1.9.5)
Definition config.h:690
std::filesystem::path db_path
SQLite database path (derived from config_dir)
Definition config.h:687
size_t log_max_files
Max rotated log files to keep.
Definition config.h:689
size_t log_max_file_size
Max log file size before rotation (10MB)
Definition config.h:688
bool enabled
Enable storage backend.
Definition config.h:686
Tier-specific model configuration.
Definition config.h:425
std::string get_param(const std::string &param_name) const
Get a named parameter derived from tier config fields.
Definition config.h:530
std::optional< float > frequency_penalty
gh#85
Definition config.h:478
std::optional< bool > routable
None = defer to identity frontmatter.
Definition config.h:430
std::optional< std::filesystem::path > identity
Identity prompt path (nullopt = bundled)
Definition config.h:426
std::optional< float > temperature
Per-tier sampler temperature from identity frontmatter (gh#82).
Definition config.h:462
std::optional< float > top_p
Per-tier sampler knobs from identity frontmatter (gh#85).
Definition config.h:474
bool has_capability(const std::string &name) const
Return true if this tier declares the named capability.
Definition config.h:511
std::optional< float > repeat_penalty
Per-tier repeat_penalty + enable_thinking from identity frontmatter (gh#86).
Definition config.h:485
std::optional< std::string > auto_chain
Target tier name (nullopt = defer to identity)
Definition config.h:429
bool identity_disabled
true if identity explicitly disabled
Definition config.h:427
std::optional< float > min_p
gh#85
Definition config.h:476
std::optional< std::string > tool_call_mode
Per-tier tool-call generation mode (gh#103).
Definition config.h:493
std::optional< float > presence_penalty
gh#85
Definition config.h:477
float adapter_scale
LoRA scaling factor (0.0–2.0, default 1.0).
Definition config.h:439
std::optional< int > max_output_tokens
Per-tier max output tokens from identity frontmatter (gh#82).
Definition config.h:467
std::optional< std::filesystem::path > adapter_path
Optional path to LoRA adapter .gguf file.
Definition config.h:435
std::optional< int > top_k
gh#85
Definition config.h:475
std::optional< bool > enable_thinking
gh#86
Definition config.h:486
std::vector< std::string > capabilities
Declared tier capabilities (gh#41).
Definition config.h:455
std::optional< std::filesystem::path > grammar
Grammar file path.
Definition config.h:428
std::optional< bool > speculative_mtp
Per-tier MTP speculative-decode override (gh#108).
Definition config.h:502