@blockrun/cc 0.7.1 → 0.7.2

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.
@@ -2,7 +2,7 @@ import http from 'node:http';
2
2
  import { getOrCreateWallet, getOrCreateSolanaWallet, createPaymentPayload, createSolanaPaymentPayload, parsePaymentRequired, extractPaymentDetails, solanaKeyToBytes, SOLANA_NETWORK, } from '@blockrun/llm';
3
3
  function debug(options, ...args) {
4
4
  if (options.debug)
5
- console.log('[brcc]', ...args);
5
+ console.error('[brcc]', ...args);
6
6
  }
7
7
  const DEFAULT_MAX_TOKENS = 4096;
8
8
  let lastOutputTokens = 0;
@@ -45,12 +45,12 @@ export function createProxy(options) {
45
45
  const original = parsed.max_tokens;
46
46
  const model = (parsed.model || '').toLowerCase();
47
47
  const modelCap = (model.includes('deepseek') || model.includes('haiku') || model.includes('gpt-oss')) ? 8192 : 16384;
48
- if (lastOutputTokens > 0) {
49
- parsed.max_tokens = Math.min(lastOutputTokens, modelCap);
50
- }
51
- else {
52
- parsed.max_tokens = Math.min(parsed.max_tokens, DEFAULT_MAX_TOKENS, modelCap);
53
- }
48
+ // Use max of (last output × 2, default 4096) capped by model limit
49
+ // This ensures short replies don't starve the next request
50
+ const adaptive = lastOutputTokens > 0
51
+ ? Math.max(lastOutputTokens * 2, DEFAULT_MAX_TOKENS)
52
+ : DEFAULT_MAX_TOKENS;
53
+ parsed.max_tokens = Math.min(adaptive, modelCap);
54
54
  if (original !== parsed.max_tokens) {
55
55
  debug(options, `max_tokens: ${original} → ${parsed.max_tokens} (last output: ${lastOutputTokens || 'none'})`);
56
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/cc",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Run Claude Code with any model — no rate limits, no account locks, no phone verification. Pay per use with USDC.",
5
5
  "type": "module",
6
6
  "bin": {