···
3
+
type = lib.types.submodule {
5
+
providers = lib.mkOption {
6
+
type = lib.types.attrsOf (
7
+
lib.types.submodule {
9
+
name = lib.mkOption {
10
+
type = lib.types.str;
11
+
description = "Human-readable name for the provider";
13
+
base_url = lib.mkOption {
14
+
type = lib.types.str;
16
+
description = "Base URL for the provider's API";
18
+
type = lib.mkOption {
19
+
type = lib.types.enum [
27
+
description = "Provider type that determines the API format";
29
+
api_key = lib.mkOption {
30
+
type = lib.types.str;
32
+
description = "API key for authentication with the provider";
34
+
disable = lib.mkOption {
35
+
type = lib.types.bool;
37
+
description = "Whether this provider is disabled";
39
+
system_prompt_prefix = lib.mkOption {
40
+
type = lib.types.str;
42
+
description = "Custom prefix to add to system prompts for this provider";
44
+
extra_headers = lib.mkOption {
45
+
type = lib.types.attrsOf lib.types.str;
47
+
description = "Additional HTTP headers to send with requests";
49
+
extra_body = lib.mkOption {
50
+
type = lib.types.attrsOf lib.types.anything;
52
+
description = "Additional fields to include in request bodies";
54
+
models = lib.mkOption {
55
+
type = lib.types.listOf (
56
+
lib.types.submodule {
59
+
type = lib.types.str;
60
+
description = "Model ID";
62
+
name = lib.mkOption {
63
+
type = lib.types.str;
64
+
description = "Model display name";
66
+
cost_per_1m_in = lib.mkOption {
67
+
type = lib.types.number;
70
+
cost_per_1m_out = lib.mkOption {
71
+
type = lib.types.number;
74
+
cost_per_1m_in_cached = lib.mkOption {
75
+
type = lib.types.number;
78
+
cost_per_1m_out_cached = lib.mkOption {
79
+
type = lib.types.number;
82
+
context_window = lib.mkOption {
83
+
type = lib.types.int;
86
+
default_max_tokens = lib.mkOption {
87
+
type = lib.types.int;
90
+
can_reason = lib.mkOption {
91
+
type = lib.types.bool;
94
+
has_reasoning_efforts = lib.mkOption {
95
+
type = lib.types.bool;
98
+
default_reasoning_effort = lib.mkOption {
99
+
type = lib.types.str;
102
+
supports_attachments = lib.mkOption {
103
+
type = lib.types.bool;
110
+
description = "List of models available from this provider";
116
+
description = "AI provider configurations";
119
+
lsp = lib.mkOption {
120
+
type = lib.types.attrsOf (
121
+
lib.types.submodule {
123
+
command = lib.mkOption {
124
+
type = lib.types.str;
125
+
description = "Command to execute for the LSP server";
127
+
args = lib.mkOption {
128
+
type = lib.types.listOf lib.types.str;
130
+
description = "Arguments to pass to the LSP server command";
132
+
options = lib.mkOption {
133
+
type = lib.types.attrsOf lib.types.anything;
135
+
description = "LSP server-specific configuration options";
137
+
enabled = lib.mkOption {
138
+
type = lib.types.bool;
140
+
description = "Whether this LSP server is disabled";
146
+
description = "Language Server Protocol configurations";
149
+
mcp = lib.mkOption {
150
+
type = lib.types.attrsOf (
151
+
lib.types.submodule {
153
+
command = lib.mkOption {
154
+
type = lib.types.str;
156
+
description = "Command to execute for stdio MCP servers";
158
+
env = lib.mkOption {
159
+
type = lib.types.attrsOf lib.types.str;
161
+
description = "Environment variables to set for the MCP server";
163
+
args = lib.mkOption {
164
+
type = lib.types.listOf lib.types.str;
166
+
description = "Arguments to pass to the MCP server command";
168
+
type = lib.mkOption {
169
+
type = lib.types.enum [
175
+
description = "Type of MCP connection";
177
+
url = lib.mkOption {
178
+
type = lib.types.str;
180
+
description = "URL for HTTP or SSE MCP servers";
182
+
disabled = lib.mkOption {
183
+
type = lib.types.bool;
185
+
description = "Whether this MCP server is disabled";
187
+
headers = lib.mkOption {
188
+
type = lib.types.attrsOf lib.types.str;
190
+
description = "HTTP headers for HTTP/SSE MCP servers";
196
+
description = "Model Context Protocol server configurations";
199
+
options = lib.mkOption {
200
+
type = lib.types.submodule {
202
+
context_paths = lib.mkOption {
203
+
type = lib.types.listOf lib.types.str;
205
+
description = "Paths to files containing context information for the AI";
207
+
tui = lib.mkOption {
208
+
type = lib.types.submodule {
210
+
compact_mode = lib.mkOption {
211
+
type = lib.types.bool;
213
+
description = "Enable compact mode for the TUI interface";
218
+
description = "Terminal user interface options";
220
+
debug = lib.mkOption {
221
+
type = lib.types.bool;
223
+
description = "Enable debug logging";
225
+
debug_lsp = lib.mkOption {
226
+
type = lib.types.bool;
228
+
description = "Enable debug logging for LSP servers";
230
+
disable_auto_summarize = lib.mkOption {
231
+
type = lib.types.bool;
233
+
description = "Disable automatic conversation summarization";
235
+
data_directory = lib.mkOption {
236
+
type = lib.types.str;
237
+
default = ".crush";
238
+
description = "Directory for storing application data (relative to working directory)";
243
+
description = "General application options";
246
+
permissions = lib.mkOption {
247
+
type = lib.types.submodule {
249
+
allowed_tools = lib.mkOption {
250
+
type = lib.types.listOf lib.types.str;
252
+
description = "List of tools that don't require permission prompts";
257
+
description = "Permission settings for tool usage";
260
+
models = lib.mkOption {
261
+
type = lib.types.attrsOf (
262
+
lib.types.submodule {
264
+
model = lib.mkOption {
265
+
type = lib.types.str;
266
+
description = "The model ID as used by the provider API";
268
+
provider = lib.mkOption {
269
+
type = lib.types.str;
270
+
description = "The model provider ID that matches a key in the providers config";
272
+
reasoning_effort = lib.mkOption {
273
+
type = lib.types.enum [
279
+
description = "Reasoning effort level for OpenAI models that support it";
281
+
max_tokens = lib.mkOption {
282
+
type = lib.types.int;
284
+
description = "Maximum number of tokens for model responses";
286
+
think = lib.mkOption {
287
+
type = lib.types.bool;
289
+
description = "Enable thinking mode for Anthropic models that support reasoning";
295
+
description = "Model configurations";
300
+
description = "Crush configuration options";