@blockrun/cc 0.4.1 → 0.5.0

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.
@@ -24,7 +24,7 @@ export async function startCommand(options) {
24
24
  console.log(`Model: ${chalk.green(model)}`);
25
25
  console.log(`Proxy: ${chalk.cyan(`http://localhost:${port}`)}`);
26
26
  console.log(`Backend: ${chalk.dim(apiUrl)}\n`);
27
- const server = createProxy({ port, apiUrl, chain: 'solana' });
27
+ const server = createProxy({ port, apiUrl, chain: 'solana', modelOverride: model });
28
28
  launchServer(server, port, shouldLaunch, model);
29
29
  }
30
30
  else {
@@ -45,7 +45,7 @@ export async function startCommand(options) {
45
45
  console.log(`Model: ${chalk.green(model)}`);
46
46
  console.log(`Proxy: ${chalk.cyan(`http://localhost:${port}`)}`);
47
47
  console.log(`Backend: ${chalk.dim(apiUrl)}\n`);
48
- const server = createProxy({ port, apiUrl, chain: 'base' });
48
+ const server = createProxy({ port, apiUrl, chain: 'base', modelOverride: model });
49
49
  launchServer(server, port, shouldLaunch, model);
50
50
  }
51
51
  }
@@ -4,5 +4,6 @@ export interface ProxyOptions {
4
4
  port: number;
5
5
  apiUrl: string;
6
6
  chain?: Chain;
7
+ modelOverride?: string;
7
8
  }
8
9
  export declare function createProxy(options: ProxyOptions): http.Server;
@@ -29,6 +29,16 @@ export function createProxy(options) {
29
29
  });
30
30
  req.on('end', async () => {
31
31
  try {
32
+ if (options.modelOverride && body) {
33
+ try {
34
+ const parsed = JSON.parse(body);
35
+ if (parsed.model) {
36
+ parsed.model = options.modelOverride;
37
+ body = JSON.stringify(parsed);
38
+ }
39
+ }
40
+ catch { /* not JSON, pass through */ }
41
+ }
32
42
  const headers = {
33
43
  'Content-Type': 'application/json',
34
44
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/cc",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
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": {