@inference-gateway/cli 0.140.1 → 0.141.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.
Files changed (2) hide show
  1. package/README.md +1 -231
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -25,7 +25,6 @@ An agentic command-line assistant that writes code, understands project context,
25
25
  - [Features](#features)
26
26
  - [Installation](#installation)
27
27
  - [Quick Start](#quick-start)
28
- - [Claude Code Mode (Subscription)](#claude-code-mode-subscription)
29
28
  - [Commands](#commands)
30
29
  - [Tools for LLMs](#tools-for-llms)
31
30
  - [Configuration](#configuration)
@@ -312,236 +311,6 @@ Now that you're up and running, explore these guides:
312
311
  - **[Shortcuts Guide](docs/shortcuts-guide.md)** - Custom shortcuts and AI-powered snippets
313
312
  - **[A2A Agents](docs/agents-configuration.md)** - Agent-to-agent communication setup
314
313
 
315
- ## Claude Code Mode (Subscription)
316
-
317
- Save on API costs by using your Claude Max or Pro subscription instead of pay-as-you-go API pricing.
318
-
319
- ### Overview
320
-
321
- Claude Code mode enables you to use your **Claude Max or Pro subscription** ($100-200/month fixed cost)
322
- instead of paying per token via the Anthropic API. This is ideal for heavy users who want
323
- predictable monthly costs.
324
-
325
- **Cost Comparison:**
326
-
327
- | Mode | Pricing | Best For |
328
- | -------------------- | --------------------------------------- | --------------------------------------- |
329
- | **Gateway Mode** | Pay per token ($3-$75 per million) | API users, multi-provider needs |
330
- | **Claude Code Mode** | Fixed monthly ($100-200) | Heavy Claude users, cost predictability |
331
-
332
- ### Prerequisites
333
-
334
- - **Claude Max or Pro subscription** - Required ($100-200/month)
335
- - **Claude Code CLI** - Official CLI from Anthropic
336
-
337
- Install the Claude Code CLI:
338
-
339
- ```bash
340
- npm install -g @anthropic-ai/claude-code
341
- ```
342
-
343
- ### Setup
344
-
345
- 1. **Configure for Claude Code mode**:
346
-
347
- Edit `.infer/config.yaml`:
348
-
349
- ```yaml
350
- # Enable Claude Code mode
351
- claude_code:
352
- enabled: true
353
- cli_path: claude # or /usr/local/bin/claude if not in PATH
354
- timeout: 600
355
- max_output_tokens: 32000
356
- thinking_budget: 10000
357
-
358
- # Disable gateway mode
359
- gateway:
360
- run: false
361
-
362
- # Set model (no provider prefix needed)
363
- agent:
364
- model: claude-sonnet-4-5-20250929
365
- ```
366
-
367
- 2. **Authenticate with your subscription**:
368
-
369
- ```bash
370
- infer claude-code setup
371
- ```
372
-
373
- This opens your browser to authenticate with your Claude Max/Pro account.
374
-
375
- 3. **Verify authentication**:
376
-
377
- ```bash
378
- infer claude-code test
379
- ```
380
-
381
- 4. **Use normally**:
382
-
383
- ```bash
384
- infer chat # Now using your subscription!
385
- ```
386
-
387
- ### Available Commands
388
-
389
- - `infer claude-code setup` - Authenticate with Claude subscription
390
- - `infer claude-code test` - Test authentication and CLI integration
391
-
392
- ### Configuration Options
393
-
394
- ```yaml
395
- claude_code:
396
- enabled: true # Enable/disable Claude Code mode
397
- cli_path: claude # Path to claude binary
398
- timeout: 600 # Command timeout in seconds
399
- max_output_tokens: 32000 # Maximum output tokens per request
400
- thinking_budget: 10000 # Token budget for extended thinking
401
- extra_args: # Extra arguments appended verbatim to the claude CLI invocation
402
- - --max-turns
403
- - "5"
404
- ```
405
-
406
- **Environment Variables:**
407
-
408
- ```bash
409
- export INFER_CLAUDE_CODE_ENABLED=true
410
- export INFER_CLAUDE_CODE_CLI_PATH=/usr/local/bin/claude
411
- export INFER_CLAUDE_CODE_TIMEOUT=600
412
- export INFER_CLAUDE_CODE_EXTRA_ARGS="--max-turns,5" # comma/newline-separated; wins over --claude-code-extra-args
413
- ```
414
-
415
- **Pass-through behavior:**
416
-
417
- Claude Code mode is a pure pass-through: infer does not inject its system prompt, context blocks, or
418
- system reminders, and does not re-execute claude's tool calls locally - claude runs with its own
419
- defaults and native tools. Infer's `prompts.yaml` and `reminders.yaml` do not apply in this mode.
420
-
421
- To add instructions on top of claude's built-in system prompt (passed via `--append-system-prompt`),
422
- set the dedicated prompt in `.infer/prompts.yaml` (empty by default):
423
-
424
- ```yaml
425
- agent:
426
- system_prompt_claude_code: "Always answer in English."
427
- ```
428
-
429
- Or via environment variable:
430
-
431
- ```bash
432
- export INFER_PROMPTS_AGENT_SYSTEM_PROMPT_CLAUDE_CODE="Always answer in English."
433
- ```
434
-
435
- ### Features and Limitations
436
-
437
- | Feature | Gateway Mode | Claude Code Mode |
438
- | --------------------- | --------------------------------------- | ---------------------------------------- |
439
- | **Cost** | Pay-per-token | Fixed monthly |
440
- | **Providers** | All providers (Anthropic, OpenAI, etc.) | Claude only |
441
- | **Models** | All provider models | Claude models only |
442
- | **Images** | ✓ Supported | ✗ Not supported (stripped from messages) |
443
- | **Prompt Caching** | ✓ Supported | ✗ Not available via CLI |
444
- | **Streaming** | ✓ Supported | ✓ Supported |
445
- | **Tool Execution** | ✓ Supported | ✓ Supported |
446
- | **Extended Thinking** | ✓ Supported | ✓ Supported |
447
- | **Authentication** | API keys | Browser login |
448
-
449
- **Supported Models:**
450
-
451
- The following Claude models are available via Claude Code subscription mode:
452
-
453
- **Claude 4.5 Series (Latest):**
454
-
455
- - `claude-opus-4-5` - Most capable Claude model (vision support)
456
- - `claude-haiku-4-5-20251001` - Fastest Claude model (vision support)
457
- - `claude-sonnet-4-5-20250929` - Latest Sonnet model (default, vision support)
458
-
459
- **Claude 4.1 Series:**
460
-
461
- - `claude-opus-4-1-20250805` - Claude 4.1 Opus (vision support)
462
- - `claude-sonnet-4-1-20250805` - Claude 4.1 Sonnet (vision support)
463
-
464
- **Claude 4 Series:**
465
-
466
- - `claude-opus-4-20250514` - Claude 4 Opus (vision support)
467
- - `claude-sonnet-4-20250514` - Claude 4 Sonnet (vision support)
468
-
469
- **Claude 3.7 Series:**
470
-
471
- - `claude-3-7-sonnet-20250219` - Claude 3.7 Sonnet (vision support)
472
-
473
- **Claude 3.5 Series:**
474
-
475
- - `claude-3-5-haiku-20241022` - Claude 3.5 Haiku (vision support)
476
-
477
- **Claude 3 Series:**
478
-
479
- - `claude-3-haiku-20240307` - Claude 3 Haiku (vision support)
480
- - `claude-3-opus-20240229` - Claude 3 Opus (vision support)
481
-
482
- **Note:** All modern Claude models support vision capabilities. The Claude Code CLI automatically strips images
483
- from messages when using subscription mode.
484
-
485
- ### Troubleshooting
486
-
487
- **CLI Not Found:**
488
-
489
- ```bash
490
- # Check if Claude CLI is installed
491
- which claude
492
-
493
- # If not found, install it
494
- npm install -g @anthropic-ai/claude-code
495
-
496
- # Or set custom path in config
497
- claude_code:
498
- cli_path: /full/path/to/claude
499
- ```
500
-
501
- **Authentication Issues:**
502
-
503
- ```bash
504
- # Re-authenticate
505
- infer claude-code setup
506
-
507
- # Test authentication
508
- infer claude-code test
509
- ```
510
-
511
- **Update CLI:**
512
-
513
- ```bash
514
- npm update -g @anthropic-ai/claude-code
515
- ```
516
-
517
- ### Switching Between Modes
518
-
519
- You can easily switch between gateway and Claude Code modes:
520
-
521
- **To Claude Code mode:**
522
-
523
- ```yaml
524
- # .infer/config.yaml
525
- claude_code:
526
- enabled: true
527
- gateway:
528
- run: false
529
- agent:
530
- model: claude-sonnet-4-5-20250929 # No provider prefix
531
- ```
532
-
533
- **To Gateway mode:**
534
-
535
- ```yaml
536
- # .infer/config.yaml
537
- claude_code:
538
- enabled: false
539
- gateway:
540
- run: true
541
- agent:
542
- model: anthropic/claude-sonnet-4-5-20250929 # With provider prefix
543
- ```
544
-
545
314
  ## Commands
546
315
 
547
316
  The CLI provides several commands for different workflows. For detailed documentation, see [Commands Reference](docs/commands-reference.md).
@@ -906,6 +675,7 @@ All configuration can be set via environment variables with the `INFER_` prefix:
906
675
 
907
676
  ```bash
908
677
  export INFER_GATEWAY_URL="http://localhost:8080"
678
+ export INFER_GATEWAY_MOCK=true # embedded mock gateway with canned scenario responses, no real LLM
909
679
  export INFER_AGENT_MODEL="deepseek/deepseek-v4-pro"
910
680
  export INFER_TOOLS_BASH_ENABLED=true
911
681
  export INFER_CHAT_THEME="tokyo-night"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inference-gateway/cli",
3
- "version": "0.140.1",
3
+ "version": "0.141.0",
4
4
  "description": "A Git-first CLI coding agent that turns ideas, issues, and tasks into real code changes.",
5
5
  "bin": {
6
6
  "infer": "bin/run.js"