@blockrun/clawrouter 0.12.21 → 0.12.23
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/cli.js +10 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6078,8 +6078,12 @@ async function startProxy(options) {
|
|
|
6078
6078
|
const paymentChain = options.paymentChain ?? await resolvePaymentChain();
|
|
6079
6079
|
const apiBase = options.apiBase ?? (paymentChain === "solana" && solanaPrivateKeyBytes ? BLOCKRUN_SOLANA_API : BLOCKRUN_API);
|
|
6080
6080
|
if (paymentChain === "solana" && !solanaPrivateKeyBytes) {
|
|
6081
|
-
console.warn(
|
|
6082
|
-
|
|
6081
|
+
console.warn(
|
|
6082
|
+
`[ClawRouter] \u26A0 Payment chain is Solana but no mnemonic found \u2014 falling back to Base (EVM).`
|
|
6083
|
+
);
|
|
6084
|
+
console.warn(
|
|
6085
|
+
`[ClawRouter] To fix: run "npx @blockrun/clawrouter wallet recover" if your mnemonic exists,`
|
|
6086
|
+
);
|
|
6083
6087
|
console.warn(`[ClawRouter] or run "npx @blockrun/clawrouter chain base" to switch to EVM.`);
|
|
6084
6088
|
} else if (paymentChain === "solana") {
|
|
6085
6089
|
console.log(`[ClawRouter] Payment chain: Solana (${BLOCKRUN_SOLANA_API})`);
|
|
@@ -6485,7 +6489,10 @@ async function tryModelRequest(upstreamUrl, method, headers, body, modelId, maxT
|
|
|
6485
6489
|
const contentType = response.headers.get("content-type") || "";
|
|
6486
6490
|
if (contentType.includes("json") || contentType.includes("text")) {
|
|
6487
6491
|
try {
|
|
6488
|
-
const clonedChunks = await readBodyWithTimeout(
|
|
6492
|
+
const clonedChunks = await readBodyWithTimeout(
|
|
6493
|
+
response.clone().body,
|
|
6494
|
+
ERROR_BODY_READ_TIMEOUT_MS
|
|
6495
|
+
);
|
|
6489
6496
|
const responseBody = Buffer.concat(clonedChunks).toString();
|
|
6490
6497
|
const degradedReason = detectDegradedSuccessResponse(responseBody);
|
|
6491
6498
|
if (degradedReason) {
|