@askalf/dario 6.13.2 → 6.13.3
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/dist/beta-family-drops.d.ts +15 -0
- package/dist/beta-family-drops.js +32 -0
- package/dist/live-fingerprint.d.ts +1 -1
- package/dist/live-fingerprint.js +1 -1
- package/dist/proxy.d.ts +10 -2
- package/dist/proxy.js +17 -24
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The betas a model family does not send although the opus base (TEMPLATE.anthropic_beta) carries
|
|
3
|
+
* them. betaForModel removes each key's flags from every model whose lowercased id contains the
|
|
4
|
+
* key, so `sonnet` covers the whole Sonnet line and `sonnet-4` only the Sonnet 4 line.
|
|
5
|
+
*
|
|
6
|
+
* An entry matches dario's header to the installed Claude Code's captured set for that family; it
|
|
7
|
+
* says nothing about upstream acceptance. A beta can enable a request feature that the body still
|
|
8
|
+
* uses after the flag is gone, so a removal here is only as sound as the capture it came from. The
|
|
9
|
+
* wire-drift watcher reports a mismatch in either direction.
|
|
10
|
+
*
|
|
11
|
+
* scripts/wire-drift-fix.mjs adds to this object from a wire-drift report. It reads the JSON
|
|
12
|
+
* literal between the markers and writes it back as JSON.stringify(drops, null, 2), so keep it
|
|
13
|
+
* plain JSON in that form: the script refuses a block it cannot read back byte for byte.
|
|
14
|
+
*/
|
|
15
|
+
export declare const FAMILY_BETA_DROPS: Readonly<Record<string, readonly string[]>>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The betas a model family does not send although the opus base (TEMPLATE.anthropic_beta) carries
|
|
3
|
+
* them. betaForModel removes each key's flags from every model whose lowercased id contains the
|
|
4
|
+
* key, so `sonnet` covers the whole Sonnet line and `sonnet-4` only the Sonnet 4 line.
|
|
5
|
+
*
|
|
6
|
+
* An entry matches dario's header to the installed Claude Code's captured set for that family; it
|
|
7
|
+
* says nothing about upstream acceptance. A beta can enable a request feature that the body still
|
|
8
|
+
* uses after the flag is gone, so a removal here is only as sound as the capture it came from. The
|
|
9
|
+
* wire-drift watcher reports a mismatch in either direction.
|
|
10
|
+
*
|
|
11
|
+
* scripts/wire-drift-fix.mjs adds to this object from a wire-drift report. It reads the JSON
|
|
12
|
+
* literal between the markers and writes it back as JSON.stringify(drops, null, 2), so keep it
|
|
13
|
+
* plain JSON in that form: the script refuses a block it cannot read back byte for byte.
|
|
14
|
+
*/
|
|
15
|
+
// wire-drift-fix:begin
|
|
16
|
+
export const FAMILY_BETA_DROPS = {
|
|
17
|
+
"haiku": [
|
|
18
|
+
"mid-conversation-system-2026-04-07",
|
|
19
|
+
"mid-conversation-tool-changes-2026-07-01",
|
|
20
|
+
"inline-tools-2026-09-15",
|
|
21
|
+
"effort-2025-11-24",
|
|
22
|
+
"afk-mode-2026-01-31"
|
|
23
|
+
],
|
|
24
|
+
"sonnet": [
|
|
25
|
+
"mid-conversation-tool-changes-2026-07-01",
|
|
26
|
+
"inline-tools-2026-09-15"
|
|
27
|
+
],
|
|
28
|
+
"sonnet-4": [
|
|
29
|
+
"mid-conversation-system-2026-04-07"
|
|
30
|
+
]
|
|
31
|
+
};
|
|
32
|
+
// wire-drift-fix:end
|
|
@@ -510,7 +510,7 @@ export declare function detectDrift(t: TemplateData, installedOverride?: string
|
|
|
510
510
|
*/
|
|
511
511
|
export declare const SUPPORTED_CC_RANGE: {
|
|
512
512
|
readonly min: "1.0.0";
|
|
513
|
-
readonly maxTested: "2.1.
|
|
513
|
+
readonly maxTested: "2.1.293";
|
|
514
514
|
};
|
|
515
515
|
/**
|
|
516
516
|
* Compare two dotted-numeric version strings. Returns negative if `a<b`,
|
package/dist/live-fingerprint.js
CHANGED
|
@@ -1211,7 +1211,7 @@ export function detectDrift(t, installedOverride) {
|
|
|
1211
1211
|
*/
|
|
1212
1212
|
export const SUPPORTED_CC_RANGE = {
|
|
1213
1213
|
min: '1.0.0',
|
|
1214
|
-
maxTested: '2.1.
|
|
1214
|
+
maxTested: '2.1.293',
|
|
1215
1215
|
};
|
|
1216
1216
|
/**
|
|
1217
1217
|
* Compare two dotted-numeric version strings. Returns negative if `a<b`,
|
package/dist/proxy.d.ts
CHANGED
|
@@ -121,6 +121,7 @@ export declare const AFK_MODE_BETA = "afk-mode-2026-01-31";
|
|
|
121
121
|
export declare const ADVISOR_TOOL_BETA = "advisor-tool-2026-03-01";
|
|
122
122
|
export declare const CLAUDE_CODE_BETA = "claude-code-20250219";
|
|
123
123
|
export declare const MID_CONVERSATION_TOOL_CHANGES_BETA = "mid-conversation-tool-changes-2026-07-01";
|
|
124
|
+
export declare const INLINE_TOOLS_BETA = "inline-tools-2026-09-15";
|
|
124
125
|
/**
|
|
125
126
|
* Model-conditional anthropic-beta set for current Claude Code. `base` is the
|
|
126
127
|
* opus/sonnet order (TEMPLATE.anthropic_beta); each family is a transform of
|
|
@@ -133,16 +134,19 @@ export declare const MID_CONVERSATION_TOOL_CHANGES_BETA = "mid-conversation-tool
|
|
|
133
134
|
* fable-5 = base (same drop as opus-5)
|
|
134
135
|
* sonnet-5 = base (== opus — wire-drift
|
|
135
136
|
* live capture, CC 2.1.204: mid-conversation-system included)
|
|
136
|
-
* CC 2.1.265 does NOT send mid-conversation-tool-changes here
|
|
137
|
+
* CC 2.1.265 does NOT send mid-conversation-tool-changes here,
|
|
138
|
+
* and CC 2.1.292 does not send inline-tools here.
|
|
137
139
|
* sonnet-4-x = sonnet-5 − {mid-conversation-system} (CC 2.1.201 dropped it
|
|
138
140
|
* from sonnet 4.6; 2.1.199 sonnet == opus and still kept it — #667)
|
|
139
141
|
* haiku-4-5 = base − {mid-conversation-system, mid-conversation-tool-changes,
|
|
140
|
-
* effort, afk-mode}, and claude-code-20250219 MOVED to
|
|
142
|
+
* inline-tools, effort, afk-mode}, and claude-code-20250219 MOVED to
|
|
141
143
|
* position 5 (before advisor-tool)
|
|
142
144
|
*
|
|
143
145
|
* mid-conversation-tool-changes-2026-07-01 entered `base` with the 2026-09-08
|
|
144
146
|
* rebake (CC 2.1.265). The live wire-drift capture on that rebake shows it on
|
|
145
147
|
* opus-4-8 / opus-5 / fable-5 only — the sonnet line and haiku do not get it.
|
|
148
|
+
* inline-tools-2026-09-15 has the same split: in `base` from CC 2.1.292, sent
|
|
149
|
+
* on opus-4-8 / opus-5 / fable-5 and never on the sonnet line or haiku.
|
|
146
150
|
*
|
|
147
151
|
* `[1m]`-labelled models additionally carry context-1m-2025-08-07 at POSITION 2
|
|
148
152
|
* (immediately after claude-code-20250219), not appended at the tail. CC does
|
|
@@ -159,6 +163,10 @@ export declare const MID_CONVERSATION_TOOL_CHANGES_BETA = "mid-conversation-tool
|
|
|
159
163
|
* Removing a beta can never provoke an upstream 400 (the runtime rejection
|
|
160
164
|
* cache only ever needs to ADD strips), so the haiku omissions are safe; the
|
|
161
165
|
* position adjustments keep the per-family order correct.
|
|
166
|
+
*
|
|
167
|
+
* The removals themselves are data: FAMILY_BETA_DROPS (src/beta-family-drops.ts),
|
|
168
|
+
* which the wire-drift watcher extends when Claude Code stops sending a base
|
|
169
|
+
* flag on a family. Order changes stay here.
|
|
162
170
|
*/
|
|
163
171
|
export declare function betaForModel(base: string, model: string | null | undefined, skipContext1m?: boolean): string;
|
|
164
172
|
/**
|
package/dist/proxy.js
CHANGED
|
@@ -6,6 +6,7 @@ import { join } from 'node:path';
|
|
|
6
6
|
import { homedir } from 'node:os';
|
|
7
7
|
import { setDefaultResultOrder } from 'node:dns';
|
|
8
8
|
import { arch, platform } from 'node:process';
|
|
9
|
+
import { FAMILY_BETA_DROPS } from './beta-family-drops.js';
|
|
9
10
|
import { getAccessToken, getStatus, ignoreCcCredentials } from './oauth.js';
|
|
10
11
|
import { buildHealthResponse, derivePoolStatus, probeRequested, shouldDiscloseHealthInternals, shouldRunServingProbe } from './health-response.js';
|
|
11
12
|
import { getServingProbe } from './serving-probe.js';
|
|
@@ -481,6 +482,7 @@ export const AFK_MODE_BETA = 'afk-mode-2026-01-31';
|
|
|
481
482
|
export const ADVISOR_TOOL_BETA = 'advisor-tool-2026-03-01';
|
|
482
483
|
export const CLAUDE_CODE_BETA = 'claude-code-20250219';
|
|
483
484
|
export const MID_CONVERSATION_TOOL_CHANGES_BETA = 'mid-conversation-tool-changes-2026-07-01';
|
|
485
|
+
export const INLINE_TOOLS_BETA = 'inline-tools-2026-09-15';
|
|
484
486
|
/**
|
|
485
487
|
* Insert `flag` immediately AFTER the first `anchor`, deduped. If `flag` is
|
|
486
488
|
* already present the list is returned unchanged; if `anchor` is absent `flag`
|
|
@@ -517,16 +519,19 @@ function moveBetaBefore(flags, flag, anchor) {
|
|
|
517
519
|
* fable-5 = base (same drop as opus-5)
|
|
518
520
|
* sonnet-5 = base (== opus — wire-drift
|
|
519
521
|
* live capture, CC 2.1.204: mid-conversation-system included)
|
|
520
|
-
* CC 2.1.265 does NOT send mid-conversation-tool-changes here
|
|
522
|
+
* CC 2.1.265 does NOT send mid-conversation-tool-changes here,
|
|
523
|
+
* and CC 2.1.292 does not send inline-tools here.
|
|
521
524
|
* sonnet-4-x = sonnet-5 − {mid-conversation-system} (CC 2.1.201 dropped it
|
|
522
525
|
* from sonnet 4.6; 2.1.199 sonnet == opus and still kept it — #667)
|
|
523
526
|
* haiku-4-5 = base − {mid-conversation-system, mid-conversation-tool-changes,
|
|
524
|
-
* effort, afk-mode}, and claude-code-20250219 MOVED to
|
|
527
|
+
* inline-tools, effort, afk-mode}, and claude-code-20250219 MOVED to
|
|
525
528
|
* position 5 (before advisor-tool)
|
|
526
529
|
*
|
|
527
530
|
* mid-conversation-tool-changes-2026-07-01 entered `base` with the 2026-09-08
|
|
528
531
|
* rebake (CC 2.1.265). The live wire-drift capture on that rebake shows it on
|
|
529
532
|
* opus-4-8 / opus-5 / fable-5 only — the sonnet line and haiku do not get it.
|
|
533
|
+
* inline-tools-2026-09-15 has the same split: in `base` from CC 2.1.292, sent
|
|
534
|
+
* on opus-4-8 / opus-5 / fable-5 and never on the sonnet line or haiku.
|
|
530
535
|
*
|
|
531
536
|
* `[1m]`-labelled models additionally carry context-1m-2025-08-07 at POSITION 2
|
|
532
537
|
* (immediately after claude-code-20250219), not appended at the tail. CC does
|
|
@@ -543,35 +548,23 @@ function moveBetaBefore(flags, flag, anchor) {
|
|
|
543
548
|
* Removing a beta can never provoke an upstream 400 (the runtime rejection
|
|
544
549
|
* cache only ever needs to ADD strips), so the haiku omissions are safe; the
|
|
545
550
|
* position adjustments keep the per-family order correct.
|
|
551
|
+
*
|
|
552
|
+
* The removals themselves are data: FAMILY_BETA_DROPS (src/beta-family-drops.ts),
|
|
553
|
+
* which the wire-drift watcher extends when Claude Code stops sending a base
|
|
554
|
+
* flag on a family. Order changes stay here.
|
|
546
555
|
*/
|
|
547
556
|
export function betaForModel(base, model, skipContext1m = false) {
|
|
548
557
|
const m = (model ?? '').toLowerCase();
|
|
549
558
|
let flags = base.split(',').map((s) => s.trim()).filter(Boolean);
|
|
559
|
+
// Every family key the model id contains contributes its removals: `sonnet`
|
|
560
|
+
// reaches the whole Sonnet line (only sonnet-5 is captured, and the sonnet-4
|
|
561
|
+
// line has never carried a flag sonnet-5 lacks), `sonnet-4` adds the
|
|
562
|
+
// mid-conversation-system drop that Sonnet 5 does not take.
|
|
563
|
+
const drop = new Set(Object.entries(FAMILY_BETA_DROPS).filter(([key]) => m.includes(key)).flatMap(([, flags]) => flags));
|
|
564
|
+
flags = flags.filter((f) => !drop.has(f));
|
|
550
565
|
if (m.includes('haiku')) {
|
|
551
|
-
const drop = new Set([
|
|
552
|
-
MID_CONVERSATION_SYSTEM_BETA,
|
|
553
|
-
MID_CONVERSATION_TOOL_CHANGES_BETA,
|
|
554
|
-
EFFORT_BETA,
|
|
555
|
-
AFK_MODE_BETA,
|
|
556
|
-
]);
|
|
557
|
-
flags = flags.filter((f) => !drop.has(f));
|
|
558
566
|
flags = moveBetaBefore(flags, CLAUDE_CODE_BETA, ADVISOR_TOOL_BETA);
|
|
559
567
|
}
|
|
560
|
-
else if (m.includes('sonnet')) {
|
|
561
|
-
// The whole sonnet line drops mid-conversation-tool-changes: the live
|
|
562
|
-
// capture on the rebake that first put it in `base` (CC 2.1.265) shows
|
|
563
|
-
// sonnet-5 WITHOUT it while opus-4-8/opus-5/fable-5 carry it. Only
|
|
564
|
-
// sonnet-5 is captured, but the sonnet-4 line trails sonnet-5 on every
|
|
565
|
-
// beta so far — it has never carried a flag sonnet-5 lacks.
|
|
566
|
-
flags = flags.filter((f) => f !== MID_CONVERSATION_TOOL_CHANGES_BETA);
|
|
567
|
-
if (/sonnet-4/.test(m)) {
|
|
568
|
-
// CC 2.1.201 dropped mid-conversation-system from SONNET 4.6's beta set
|
|
569
|
-
// (2.1.199 sonnet == opus and still carried it — live capture #667).
|
|
570
|
-
// Scoped to the sonnet-4 line: Sonnet 5 carries it again — the wire-drift
|
|
571
|
-
// runner's live capture on CC 2.1.204 shows sonnet-5's set equal to opus's.
|
|
572
|
-
flags = flags.filter((f) => f !== MID_CONVERSATION_SYSTEM_BETA);
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
568
|
// opus, fable + unknown families keep the base set unchanged. fable-5 and
|
|
576
569
|
// opus-5 carried fallback-credit-2026-06-01 from CC 2.1.220 to 2.1.281; CC
|
|
577
570
|
// 2.1.282 sends neither with it (wire-drift capture 2026-09-25).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askalf/dario",
|
|
3
|
-
"version": "6.13.
|
|
3
|
+
"version": "6.13.3",
|
|
4
4
|
"description": "Use your Claude and ChatGPT subscriptions in Cursor, Cline, Aider, Claude Code and the Agent SDK — at subscription pricing, not per-token API bills. One local Anthropic + OpenAI-compatible endpoint: either plan answers either wire shape, with automatic failover when one hits its limit.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|