@musistudio/claude-code-router 1.0.35 → 1.0.36

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/README.md CHANGED
@@ -47,6 +47,27 @@ The `config.json` file has several key sections:
47
47
  - **`Router`**: Used to set up routing rules. `default` specifies the default model, which will be used for all requests if no other route is configured.
48
48
  - **`API_TIMEOUT_MS`**: Specifies the timeout for API calls in milliseconds.
49
49
 
50
+ #### Environment Variable Interpolation
51
+
52
+ Claude Code Router supports environment variable interpolation for secure API key management. You can reference environment variables in your `config.json` using either `$VAR_NAME` or `${VAR_NAME}` syntax:
53
+
54
+ ```json
55
+ {
56
+ "OPENAI_API_KEY": "$OPENAI_API_KEY",
57
+ "GEMINI_API_KEY": "${GEMINI_API_KEY}",
58
+ "Providers": [
59
+ {
60
+ "name": "openai",
61
+ "api_base_url": "https://api.openai.com/v1/chat/completions",
62
+ "api_key": "$OPENAI_API_KEY",
63
+ "models": ["gpt-5", "gpt-5-mini"]
64
+ }
65
+ ]
66
+ }
67
+ ```
68
+
69
+ This allows you to keep sensitive API keys in environment variables instead of hardcoding them in configuration files. The interpolation works recursively through nested objects and arrays.
70
+
50
71
  Here is a comprehensive example:
51
72
 
52
73
  ```json
@@ -512,5 +533,7 @@ A huge thank you to all our sponsors for their generous support!
512
533
  - [@kesku](https://github.com/kesku)
513
534
  - @水\*丫
514
535
  - @二吉吉
536
+ - @a\*g
537
+ - @*林
515
538
 
516
539
  (If your name is masked, please contact me via my homepage email to update it with your GitHub username.)
package/README_zh.md CHANGED
@@ -503,6 +503,8 @@ jobs:
503
503
  - [@kesku](https://github.com/kesku)
504
504
  - @水\*丫
505
505
  - @二吉吉
506
+ - @a\*g
507
+ - @*林
506
508
 
507
509
  (如果您的名字被屏蔽,请通过我的主页电子邮件与我联系,以便使用您的 GitHub 用户名进行更新。)
508
510