opencode-acp 1.14.26-pr.353.87 → 1.14.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -344,6 +344,21 @@ Each level overrides the previous, so project settings take priority over global
344
344
  // "openai/gpt-5.3-codex": 50000,
345
345
  // "anthropic/claude-sonnet-4.6": "25%"
346
346
  // },
347
+ // Nested per-provider/per-model overrides for ANY compress field
348
+ // (23 fields: thresholds, nudge behavior, protection, ...).
349
+ // Resolution is per field: model > provider > global. Unknown
350
+ // provider/model IDs fall back to the global value.
351
+ // "providers": {
352
+ // "anthropic": {
353
+ // "nudgeGrowthTokens": 50000,
354
+ // "models": {
355
+ // "claude-sonnet-4.6": {
356
+ // "maxContextLimit": "70%",
357
+ // "minNudgeContextPercent": 10
358
+ // }
359
+ // }
360
+ // }
361
+ // },
347
362
  // How often the context-limit nudge fires (1 = every fetch, 5 = every 5th)
348
363
  "nudgeFrequency": 5,
349
364
  // Start adding compression reminders after this many
@@ -403,6 +418,33 @@ Each level overrides the previous, so project settings take priority over global
403
418
 
404
419
  </details>
405
420
 
421
+ ### Per-Provider / Per-Model Overrides
422
+
423
+ Any `compress` field can be overridden per provider and per model via the nested `compress.providers` map:
424
+
425
+ ```jsonc
426
+ {
427
+ "compress": {
428
+ "maxContextLimit": "80%",
429
+ "providers": {
430
+ "anthropic": {
431
+ "nudgeGrowthTokens": 20000,
432
+ "models": {
433
+ "claude-sonnet-4.6": { "maxContextLimit": "70%", "nudgeForce": "strong" }
434
+ }
435
+ },
436
+ "openai": { "nudgeGrowthTokens": 40000 }
437
+ }
438
+ }
439
+ }
440
+ ```
441
+
442
+ Resolution is **per field**: model > provider > global. Unknown provider/model IDs fall back to the global value. A nested `maxContextLimit` also wins over the legacy flat `modelMaxLimits` map. Overrides deep-merge across the three config layers (global → config dir → project) per provider/model key.
443
+
444
+ Not overridable here: `permission`, the deprecated `minContextLimit` family, and the flat `model*Limits` maps themselves.
445
+
446
+ See the [`compress.providers`](./CONFIGURATION.md#compressproviders) reference in CONFIGURATION.md for the full 23-field list and recipes.
447
+
406
448
  ### Prompt Overrides
407
449
 
408
450
  ACP exposes six editable prompts:
package/README.zh-CN.md CHANGED
@@ -297,6 +297,21 @@ ACP 使用自己的配置文件,按以下顺序搜索:
297
297
  // "openai/gpt-5.3-codex": 50000,
298
298
  // "anthropic/claude-sonnet-4.6": "25%"
299
299
  // },
300
+ // 嵌套的 provider/model 级覆盖:可覆盖任意 compress 字段
301
+ // (23 项:阈值、nudge 行为、保护策略等)。
302
+ // 逐字段解析优先级:model > provider > 全局。
303
+ // 未知的 provider/model ID 回退到全局值。
304
+ // "providers": {
305
+ // "anthropic": {
306
+ // "nudgeGrowthTokens": 50000,
307
+ // "models": {
308
+ // "claude-sonnet-4.6": {
309
+ // "maxContextLimit": "70%",
310
+ // "minNudgeContextPercent": 10
311
+ // }
312
+ // }
313
+ // }
314
+ // },
300
315
  // How often the context-limit nudge fires (1 = every fetch, 5 = every 5th)
301
316
  "nudgeFrequency": 5,
302
317
  // Start adding compression reminders after this many
@@ -355,6 +370,33 @@ ACP 使用自己的配置文件,按以下顺序搜索:
355
370
 
356
371
  </details>
357
372
 
373
+ ### 按 Provider / 按模型覆盖
374
+
375
+ 任意 `compress` 字段都可通过嵌套的 `compress.providers` 按 provider 和按模型覆盖:
376
+
377
+ ```jsonc
378
+ {
379
+ "compress": {
380
+ "maxContextLimit": "80%",
381
+ "providers": {
382
+ "anthropic": {
383
+ "nudgeGrowthTokens": 20000,
384
+ "models": {
385
+ "claude-sonnet-4.6": { "maxContextLimit": "70%", "nudgeForce": "strong" }
386
+ }
387
+ },
388
+ "openai": { "nudgeGrowthTokens": 40000 }
389
+ }
390
+ }
391
+ }
392
+ ```
393
+
394
+ 解析为**逐字段**优先级:model > provider > 全局。未知的 provider/model ID 回退到全局值。嵌套的 `maxContextLimit` 同时优先于旧版扁平 `modelMaxLimits` 映射。多层配置(全局 → 配置目录 → 项目)按 provider/model 键深合并。
395
+
396
+ 不可覆盖:`permission`、已废弃的 `minContextLimit` 系列,以及扁平 `model*Limits` 映射自身。
397
+
398
+ 完整 23 项字段清单与配方见 CONFIGURATION.zh-CN.md 的 [`compress.providers`](./CONFIGURATION.zh-CN.md#compressproviders) 参考节。
399
+
358
400
  ### Prompt 覆盖
359
401
 
360
402
  ACP 暴露六个可编辑的 prompt: