@askalf/dario 4.8.111 → 4.8.112

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.
@@ -337,32 +337,27 @@ export declare function parseEffortSuffix(model: string): {
337
337
  * - May 17 2026, CC 2.1.143: effort = 'xhigh' (verified by capture-full-body.mjs)
338
338
  *
339
339
  * undefined → 'max' (highest *universally*-supported level. CC's own wire
340
- * default is 'xhigh', but that's Opus-only — Sonnet/Haiku-class
340
+ * default is 'xhigh', but that's Opus/Fable-only — Sonnet/Haiku-class
341
341
  * 400 on 'xhigh' ("supported: high|low|max|medium"). 'max' is
342
342
  * accepted by all and still routes to the subscription pool
343
343
  * (verified: representative-claim=five_hour on Opus + Sonnet).
344
- * Set --effort=xhigh / DARIO_EFFORT=xhigh for Opus's extra tier.)
345
- * EXCEPT fable: real CC's print-mode default for fable is
346
- * 'high' (live capture 2026-06-09, CC v2.1.170 — the same
347
- * capture got 'xhigh' on opus and 'high' on fable), so the
348
- * unset-flag default mirrors that per-family. An explicit
349
- * flag still pins (subject to the fable clamp below).
344
+ * Set --effort=xhigh / DARIO_EFFORT=xhigh for the Opus/Fable tier.)
350
345
  * 'low' / 'medium' / 'high' / 'xhigh' / 'max' → pin to that value
351
346
  * 'ultracode' → 'xhigh' (CC's ultracode mode; xhigh on the wire)
352
347
  * 'client' → extract from `clientBody.output_config.effort` (normalized
353
- * for the wire); fall back to the per-family default if
354
- * absent/non-string
355
- *
356
- * FABLE CLAMP (2026-06-09, live replay bisect on the deployed proxy):
357
- * fable-5 SOFT-REFUSES `max` and `xhigh` 200 with stop_reason "refusal"
358
- * and empty content on every prompt, not a 400 while `high` answers
359
- * normally (byte-identical request bodies, only output_config.effort
360
- * mutated). Empirical matrix on claude-fable-5:
361
- * high → answers xhigh → refusal max refusal
362
- * So on the fable family any resolved 'max'/'xhigh' (from --effort /
363
- * DARIO_EFFORT pins, ultracode, or client passthrough) is clamped to
364
- * 'high', the strongest level fable accepts. Operators who pin
365
- * --effort=max for Opus's sake keep that on every other family.
348
+ * for the wire); fall back to the default if absent/non-string
349
+ *
350
+ * FABLE CLAMP — REMOVED 2026-07-01. Fable 5 was SUSPENDED 2026-06-12 (US-gov
351
+ * directive) and REDEPLOYED 2026-07-01. The pre-suspension model (2026-06-09
352
+ * replay bisect) soft-refused `max`/`xhigh` (200 + stop_reason "refusal") and
353
+ * defaulted to `high`; dario special-cased it. A fresh live replay on 2026-07-01
354
+ * through the deployed proxy (CC 2.1.198's verbatim fable body, only
355
+ * output_config.effort mutated) shows the redeployed fable now ANSWERS all three
356
+ *high/xhigh/maxend_turn, zero refusals — and CC 2.1.198 itself sends
357
+ * `effort: xhigh` on fable (same as opus). So the clamp + the fable-only default
358
+ * are gone: fable now takes the general path (default 'max', no clamp), matching
359
+ * how dario treats opus. `model` is retained in the signature for callers and in
360
+ * case a future model needs per-family effort handling again.
366
361
  *
367
362
  * Exported for tests.
368
363
  */
@@ -1052,49 +1052,43 @@ function normalizeEffortForWire(effort) {
1052
1052
  * - May 17 2026, CC 2.1.143: effort = 'xhigh' (verified by capture-full-body.mjs)
1053
1053
  *
1054
1054
  * undefined → 'max' (highest *universally*-supported level. CC's own wire
1055
- * default is 'xhigh', but that's Opus-only — Sonnet/Haiku-class
1055
+ * default is 'xhigh', but that's Opus/Fable-only — Sonnet/Haiku-class
1056
1056
  * 400 on 'xhigh' ("supported: high|low|max|medium"). 'max' is
1057
1057
  * accepted by all and still routes to the subscription pool
1058
1058
  * (verified: representative-claim=five_hour on Opus + Sonnet).
1059
- * Set --effort=xhigh / DARIO_EFFORT=xhigh for Opus's extra tier.)
1060
- * EXCEPT fable: real CC's print-mode default for fable is
1061
- * 'high' (live capture 2026-06-09, CC v2.1.170 — the same
1062
- * capture got 'xhigh' on opus and 'high' on fable), so the
1063
- * unset-flag default mirrors that per-family. An explicit
1064
- * flag still pins (subject to the fable clamp below).
1059
+ * Set --effort=xhigh / DARIO_EFFORT=xhigh for the Opus/Fable tier.)
1065
1060
  * 'low' / 'medium' / 'high' / 'xhigh' / 'max' → pin to that value
1066
1061
  * 'ultracode' → 'xhigh' (CC's ultracode mode; xhigh on the wire)
1067
1062
  * 'client' → extract from `clientBody.output_config.effort` (normalized
1068
- * for the wire); fall back to the per-family default if
1069
- * absent/non-string
1063
+ * for the wire); fall back to the default if absent/non-string
1070
1064
  *
1071
- * FABLE CLAMP (2026-06-09, live replay bisect on the deployed proxy):
1072
- * fable-5 SOFT-REFUSES `max` and `xhigh` 200 with stop_reason "refusal"
1073
- * and empty content on every prompt, not a 400 — while `high` answers
1074
- * normally (byte-identical request bodies, only output_config.effort
1075
- * mutated). Empirical matrix on claude-fable-5:
1076
- * high → answers xhigh refusal max refusal
1077
- * So on the fable family any resolved 'max'/'xhigh' (from --effort /
1078
- * DARIO_EFFORT pins, ultracode, or client passthrough) is clamped to
1079
- * 'high', the strongest level fable accepts. Operators who pin
1080
- * --effort=max for Opus's sake keep that on every other family.
1065
+ * FABLE CLAMP — REMOVED 2026-07-01. Fable 5 was SUSPENDED 2026-06-12 (US-gov
1066
+ * directive) and REDEPLOYED 2026-07-01. The pre-suspension model (2026-06-09
1067
+ * replay bisect) soft-refused `max`/`xhigh` (200 + stop_reason "refusal") and
1068
+ * defaulted to `high`; dario special-cased it. A fresh live replay on 2026-07-01
1069
+ * through the deployed proxy (CC 2.1.198's verbatim fable body, only
1070
+ * output_config.effort mutated) shows the redeployed fable now ANSWERS all three
1071
+ * high/xhigh/max end_turn, zero refusals and CC 2.1.198 itself sends
1072
+ * `effort: xhigh` on fable (same as opus). So the clamp + the fable-only default
1073
+ * are gone: fable now takes the general path (default 'max', no clamp), matching
1074
+ * how dario treats opus. `model` is retained in the signature for callers and in
1075
+ * case a future model needs per-family effort handling again.
1081
1076
  *
1082
1077
  * Exported for tests.
1083
1078
  */
1084
1079
  export function resolveEffort(flag, clientBody, model) {
1085
- const isFable = (model ?? '').toLowerCase().includes('fable');
1086
- const familyDefault = isFable ? 'high' : 'max';
1087
- const clamp = (effort) => isFable && (effort === 'max' || effort === 'xhigh') ? 'high' : effort;
1080
+ void model; // no per-family effort handling at present (see FABLE CLAMP note above)
1081
+ const familyDefault = 'max';
1088
1082
  if (flag === undefined)
1089
1083
  return familyDefault;
1090
1084
  if (flag === 'client') {
1091
1085
  const clientOC = clientBody.output_config;
1092
1086
  const clientEffort = clientOC?.effort;
1093
1087
  if (typeof clientEffort === 'string' && clientEffort.length > 0)
1094
- return clamp(normalizeEffortForWire(clientEffort));
1088
+ return normalizeEffortForWire(clientEffort);
1095
1089
  return familyDefault;
1096
1090
  }
1097
- return clamp(normalizeEffortForWire(flag));
1091
+ return normalizeEffortForWire(flag);
1098
1092
  }
1099
1093
  /**
1100
1094
  * Returns true if the given model accepts `thinking: { type: "adaptive" }`.
@@ -1604,7 +1598,11 @@ export function buildCCRequest(clientBody, billingTag, cacheControl, identity, o
1604
1598
  }
1605
1599
  else if (supportsAdaptiveThinking(model)) {
1606
1600
  if (!skip || !skip.has('thinking')) {
1607
- ccRequest.thinking = { type: 'adaptive' };
1601
+ // CC 2.1.198 sends `display: "omitted"` alongside the adaptive type on
1602
+ // every adaptive-thinking model (verified via capture-full-body.mjs on
1603
+ // fable-5 + opus-4-8, 2026-07-01). Match it so the wire shape stays
1604
+ // byte-aligned with CC.
1605
+ ccRequest.thinking = { type: 'adaptive', display: 'omitted' };
1608
1606
  }
1609
1607
  if (!skip || !skip.has('context_management')) {
1610
1608
  ccRequest.context_management = { edits: [{ type: 'clear_thinking_20251015', keep: 'all' }] };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askalf/dario",
3
- "version": "4.8.111",
3
+ "version": "4.8.112",
4
4
  "description": "Use your Claude Pro/Max subscription in any tool — Cursor, Cline, Aider, the Agent SDK, your scripts — at subscription pricing, not per-token API bills. One local Anthropic + OpenAI-compatible endpoint.",
5
5
  "type": "module",
6
6
  "bin": {