Transformers
mh3467 commited on
Commit
4eeb472
Β·
verified Β·
1 Parent(s): c034be2

update cc instructions

Browse files
Files changed (1) hide show
  1. README.md +61 -22
README.md CHANGED
@@ -394,26 +394,65 @@ claude --version
394
 
395
  2. Configure Claude Code.
396
 
397
- We support the OpenAI and Anthropic API style for integration into Claude Code.
398
 
399
- Note: OpenAI API style here refers to the `chat/completions/` format.
400
 
401
- We recommend using `claude-code-router`. For details, see [https://github.com/musistudio/claude-code-router](https://github.com/musistudio/claude-code-router).
402
 
403
- After Claude Code is installed, install `claude-code-router` :
 
404
 
405
- ```bash
406
- # install ccr via npm
407
- npm install -g @musistudio/claude-code-router
 
 
 
 
 
 
 
 
 
408
 
409
- # validate it is installed
410
- ccr -v
411
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
412
 
413
- Add the following configurations to `~/.claude-code-router/config.json`.
414
 
415
- ```json
416
- {
 
 
 
 
 
 
 
 
 
 
 
 
417
  "PORT": 3456,
418
  "Providers": [
419
  {
@@ -433,17 +472,17 @@ Add the following configurations to `~/.claude-code-router/config.json`.
433
  "longContext": "stepfun-api,step-3.5-flash",
434
  "webSearch": "stepfun-api,step-3.5-flash"
435
  }
436
- }
437
- ```
438
- You can now start Claude Code:
439
 
440
- ```bash
441
- # Start Claude
442
- ccr code
443
 
444
- # restart ccr if configs are changed
445
- ccr restart
446
- ```
447
 
448
  #### 7.1.4 Use Step 3.5 Flash on Codex
449
  1. Install Codex
 
394
 
395
  2. Configure Claude Code.
396
 
397
+ To accommodate diverse workflows in Claude Code, we support both **Anthropic-style** and **OpenAI-style** APIs.
398
 
399
+ **Option A: Anthropic API style**:
400
 
401
+ > If you intend to use the **OpenRouter** API, refer to the OpenRouter integration guide.
402
 
403
+ Step 1: Edit Claude Settings. Update `~/.claude/settings.json`.
404
+ > You only need to modify the fields shown below. Leave the rest of the file unchanged.
405
 
406
+ ```json
407
+ {
408
+ "env": {
409
+ "ANTHROPIC_API_KEY": "API_KEY_from_StepFun",
410
+ "ANTHROPIC_BASE_URL": "https://api.stepfun.ai/"
411
+ },
412
+ "model": "step-3.5-flash"
413
+ }
414
+ ```
415
+ Step 2: Start Claude Code.
416
+
417
+ Save the file, and then start Claude Code. Run `/status` to confirm the model and base URL.
418
 
419
+ ```txt
420
+ ❯ /status
421
+ ─────────────────────────────────────────────────────────────────────────────────
422
+ Settings: Status Config Usage (←/β†’ or tab to cycle)
423
+
424
+ Version: 2.1.1
425
+ Session name: /rename to add a name
426
+ Session ID: 676dae61-259d-4eef-8c2f-0f1641600553
427
+ cwd: /Users/step-test/
428
+ Auth token: none
429
+ API key: ANTHROPIC_API_KEY
430
+ Anthropic base URL: https://api.stepfun.ai/
431
+
432
+ Model: step-3.5-flash
433
+ Setting sources: User settings
434
+ ```
435
+
436
+ **Option B: OpenAI API style**
437
+
438
+ > Note: OpenAI API style here refers to the `chat/completions/` format.
439
 
440
+ > We recommend using `claude-code-router`. For details, see [https://github.com/musistudio/claude-code-router](https://github.com/musistudio/claude-code-router).
441
 
442
+ After Claude Code is installed, install `claude-code-router` :
443
+
444
+ ```bash
445
+ # install ccr via npm
446
+ npm install -g @musistudio/claude-code-router
447
+
448
+ # validate it is installed
449
+ ccr -v
450
+ ```
451
+
452
+ Add the following configurations to `~/.claude-code-router/config.json`.
453
+
454
+ ```json
455
+ {
456
  "PORT": 3456,
457
  "Providers": [
458
  {
 
472
  "longContext": "stepfun-api,step-3.5-flash",
473
  "webSearch": "stepfun-api,step-3.5-flash"
474
  }
475
+ }
476
+ ```
477
+ You can now start Claude Code:
478
 
479
+ ```bash
480
+ # Start Claude
481
+ ccr code
482
 
483
+ # restart ccr if configs are changed
484
+ ccr restart
485
+ ```
486
 
487
  #### 7.1.4 Use Step 3.5 Flash on Codex
488
  1. Install Codex