opencode-anthropic-multi-account 0.2.102 → 0.2.104
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/{chunk-FQBFDF73.js → chunk-QTHKVNEI.js} +6 -1
- package/dist/chunk-QTHKVNEI.js.map +1 -0
- package/dist/{chunk-Z4CX5QR6.js → chunk-R4DIX7J7.js} +166 -217
- package/dist/chunk-R4DIX7J7.js.map +1 -0
- package/dist/fingerprint-capture.d.ts +1 -0
- package/dist/fingerprint-capture.js +2 -2
- package/dist/index.js +13 -9
- package/dist/index.js.map +1 -1
- package/dist/scrub-template.d.ts +1 -0
- package/dist/scrub-template.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-FQBFDF73.js.map +0 -1
- package/dist/chunk-Z4CX5QR6.js.map +0 -1
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
refreshLiveFingerprintAsync,
|
|
13
13
|
resetFingerprintCaptureForTest,
|
|
14
14
|
setFingerprintCaptureTestOverridesForTest
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-R4DIX7J7.js";
|
|
16
|
+
import "./chunk-QTHKVNEI.js";
|
|
17
17
|
export {
|
|
18
18
|
LIVE_TTL_MS,
|
|
19
19
|
SUPPORTED_CC_RANGE,
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
detectCliVersion,
|
|
11
11
|
detectDrift,
|
|
12
12
|
fingerprint_data_default,
|
|
13
|
+
getClaudeCodeSystemPromptVariants,
|
|
13
14
|
isClaudeCode1mModelLabel,
|
|
14
15
|
isClaudeFableModel,
|
|
15
16
|
loadClaudeCodeSharedRequestProfile,
|
|
@@ -19,11 +20,12 @@ import {
|
|
|
19
20
|
refreshLiveFingerprintAsync,
|
|
20
21
|
resolveClaudeCodeCacheControl,
|
|
21
22
|
resolveClaudeCodeModelAlias,
|
|
23
|
+
selectClaudeCodeSystemPrompt,
|
|
22
24
|
stampClaudeCodeCch,
|
|
23
25
|
toClaudeCodeWireModelId
|
|
24
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-R4DIX7J7.js";
|
|
25
27
|
import "./chunk-ITZJ5FTB.js";
|
|
26
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-QTHKVNEI.js";
|
|
27
29
|
|
|
28
30
|
// src/index.ts
|
|
29
31
|
import {
|
|
@@ -1992,7 +1994,7 @@ import { TokenRefreshError } from "opencode-multi-account-core";
|
|
|
1992
1994
|
import { randomUUID as randomUUID4 } from "crypto";
|
|
1993
1995
|
|
|
1994
1996
|
// src/model/config.ts
|
|
1995
|
-
var
|
|
1997
|
+
var FALLBACK_CREDIT_BETA = "fallback-credit-2026-06-01";
|
|
1996
1998
|
var MID_CONVERSATION_SYSTEM_BETA = "mid-conversation-system-2026-04-07";
|
|
1997
1999
|
var EFFORT_BETA = "effort-2025-11-24";
|
|
1998
2000
|
function splitBetaFlags(value) {
|
|
@@ -2003,7 +2005,10 @@ var config = {
|
|
|
2003
2005
|
longContextBetas: ["context-1m-2025-08-07", "context-management-2025-06-27"],
|
|
2004
2006
|
modelOverrides: {
|
|
2005
2007
|
fable: {
|
|
2006
|
-
add: [
|
|
2008
|
+
add: [FALLBACK_CREDIT_BETA]
|
|
2009
|
+
},
|
|
2010
|
+
"opus-5": {
|
|
2011
|
+
add: [FALLBACK_CREDIT_BETA]
|
|
2007
2012
|
},
|
|
2008
2013
|
"sonnet-5": {
|
|
2009
2014
|
add: [EFFORT_BETA]
|
|
@@ -2589,9 +2594,6 @@ function resolveOutputEffort(inputBody, configuredEffort = getConfiguredOutputEf
|
|
|
2589
2594
|
function isHaikuModel(modelId) {
|
|
2590
2595
|
return resolveClaudeCodeModelAlias(modelId).toLowerCase().includes("haiku");
|
|
2591
2596
|
}
|
|
2592
|
-
function getSystemPromptForModel(template, modelId) {
|
|
2593
|
-
return modelId.toLowerCase().includes("fable") && template.system_prompt_fable ? template.system_prompt_fable : template.system_prompt;
|
|
2594
|
-
}
|
|
2595
2597
|
function collectToolUseIds(message) {
|
|
2596
2598
|
if (!Array.isArray(message.content)) {
|
|
2597
2599
|
return [];
|
|
@@ -2633,6 +2635,7 @@ var ADAPTIVE_THINKING_MODEL_MATCHERS = [
|
|
|
2633
2635
|
(modelId) => modelId.includes("claude-sonnet-4-6") || modelId.includes("claude-sonnet-4.6"),
|
|
2634
2636
|
(modelId) => modelId.includes("claude-opus-4-6") || modelId.includes("claude-opus-4.6"),
|
|
2635
2637
|
(modelId) => /claude-opus-4[-._]([7-9]|\d{2,})/.test(modelId),
|
|
2638
|
+
(modelId) => /claude-opus-(?:[5-9]|\d{2,})(?:[-._]\d+)?(?:\[1m\])?$/.test(modelId),
|
|
2636
2639
|
(modelId) => /claude-fable-(?:[5-9]|\d{2,})(?:[-._]\d+)?(?:\[1m\])?$/.test(modelId)
|
|
2637
2640
|
];
|
|
2638
2641
|
var DEFAULT_MAX_OUTPUT_TOKENS = 32e3;
|
|
@@ -2658,7 +2661,8 @@ function resolveMaxTokens(requestedMaxTokens) {
|
|
|
2658
2661
|
return Math.min(normalized, DEFAULT_MAX_OUTPUT_TOKENS);
|
|
2659
2662
|
}
|
|
2660
2663
|
function filterInjectedSystemTexts(systemTexts, template, billingHeader) {
|
|
2661
|
-
|
|
2664
|
+
const promptVariants = new Set(Object.values(getClaudeCodeSystemPromptVariants(template)));
|
|
2665
|
+
return systemTexts.filter((entry) => entry !== billingHeader && entry !== template.agent_identity && entry !== template.system_prompt && !promptVariants.has(entry) && !entry.startsWith("x-anthropic-billing-header:"));
|
|
2662
2666
|
}
|
|
2663
2667
|
function getCcVersion(template) {
|
|
2664
2668
|
return template?.cc_version ?? claudeCodeIntegration.detectCliVersion();
|
|
@@ -2744,7 +2748,7 @@ function buildUpstreamRequest(inputBody, identity, template, options) {
|
|
|
2744
2748
|
deviceId: identity.deviceId
|
|
2745
2749
|
},
|
|
2746
2750
|
sessionId: activeSessionId,
|
|
2747
|
-
systemPrompt:
|
|
2751
|
+
systemPrompt: selectClaudeCodeSystemPrompt(template, modelId),
|
|
2748
2752
|
systemTexts: filterInjectedSystemTexts(
|
|
2749
2753
|
systemTexts,
|
|
2750
2754
|
template,
|