Commit 3e34d62
authored
Enable 1h prompt caching and tool search for Claude client (#208)
* Enable 1h prompt caching and tool search for Claude client
Set ENABLE_PROMPT_CACHING_1H=1 and ENABLE_TOOL_SEARCH=true in the Claude
settings env block, matching Isaac's config.
The 1h cache depends on the extended-cache-ttl-2025-04-11 beta header,
which Claude Code only attaches when experimental betas are enabled. ucode
previously set CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1, which suppressed
that header, so the flag is removed.
Because deep_merge_dict preserves keys already in ucode-settings.json,
removing the key from the written env is not enough for existing installs.
Add a CLAUDE_REMOVED_ENV_KEYS list, stripped from the managed settings file
on every launch, so the stale key never lingers. This only touches ucode's
own managed file, so a user who wants experimental betas disabled can still
set the flag in their own ~/.claude/settings.json.
Keep build_agent_state in sync with the same flag change.
Co-authored-by: Isaac
* Set ENABLE_TOOL_SEARCH=1 and enable CLAUDE_CODE_USE_GATEWAY
Co-authored-by: Isaac1 parent 09d33ee commit 3e34d62
4 files changed
Lines changed: 57 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
166 | 169 | | |
167 | 170 | | |
168 | 171 | | |
169 | | - | |
170 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
171 | 179 | | |
172 | 180 | | |
173 | 181 | | |
| |||
343 | 351 | | |
344 | 352 | | |
345 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
346 | 359 | | |
347 | 360 | | |
348 | 361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
84 | 85 | | |
85 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
86 | 99 | | |
87 | 100 | | |
88 | 101 | | |
| |||
366 | 379 | | |
367 | 380 | | |
368 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
369 | 406 | | |
370 | 407 | | |
371 | 408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
508 | 507 | | |
509 | 508 | | |
510 | 509 | | |
| |||
571 | 570 | | |
572 | 571 | | |
573 | 572 | | |
574 | | - | |
575 | 573 | | |
576 | 574 | | |
577 | 575 | | |
| |||
0 commit comments