openclaw-apikey-cli 1.0.1 → 1.0.3

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 (3) hide show
  1. package/README.md +3 -3
  2. package/index.js +4 -25
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -22,12 +22,12 @@ openclaw-set-key sk-your-api-key-here
22
22
  该工具会自动配置以下固定参数:
23
23
 
24
24
  - **Provider ID**: `custom-models-csdn-net`
25
- - **Base URL**: `https://test-models.csdn.net/api/v1`
25
+ - **Base URL**: `https://models.csdn.net/v1`
26
26
  - **Model ID**: `glm-4.7`
27
27
  - **Endpoint**: OpenAI-compatible (自动添加 `/chat/completions` 路径)
28
28
  - **Authorization**: API Key 通过命令行传入
29
29
 
30
- 实际请求 URL: `https://test-models.csdn.net/api/v1/chat/completions`
30
+ 实际请求 URL: `https://models.csdn.net/v1/chat/completions`
31
31
 
32
32
  你只需要提供 API Key 作为参数即可。
33
33
 
@@ -49,7 +49,7 @@ $ npx openclaw-set-key sk-ofudiveyqumxobnaaioracekvxipvjshiakdjkwxqgixm
49
49
 
50
50
  Configuration:
51
51
  Provider: custom-models-csdn-net
52
- Base URL: https://test-models.csdn.net/api/v1
52
+ Base URL: https://models.csdn.net/v1
53
53
  Model: glm-4.7
54
54
  API Key: sk-exnww...rjszm
55
55
 
package/index.js CHANGED
@@ -7,10 +7,10 @@ const os = require('os');
7
7
  // 固定配置
8
8
  const CONFIG = {
9
9
  providerId: 'custom-models-csdn-net',
10
- baseUrl: 'https://test-models.csdn.net/api/v1',
10
+ baseUrl: 'https://models.csdn.net/v1',
11
11
  modelId: 'glm-4.7',
12
12
  api: 'openai-completions',
13
- modelName: 'GLM-4.7 (CSDN Test)'
13
+ modelName: 'GLM-4.7 (CSDN)'
14
14
  };
15
15
 
16
16
  // 获取 OpenClaw 配置路径
@@ -39,17 +39,7 @@ function updateMainConfig(configPath, apiKey) {
39
39
  models: [
40
40
  {
41
41
  id: CONFIG.modelId,
42
- name: CONFIG.modelName,
43
- reasoning: false,
44
- input: ['text'],
45
- cost: {
46
- input: 0,
47
- output: 0,
48
- cacheRead: 0,
49
- cacheWrite: 0
50
- },
51
- contextWindow: 128000,
52
- maxTokens: 8192
42
+ name: CONFIG.modelName
53
43
  }
54
44
  ]
55
45
  };
@@ -91,18 +81,7 @@ function updateModelsConfig(configPath, apiKey) {
91
81
  models: [
92
82
  {
93
83
  id: CONFIG.modelId,
94
- name: CONFIG.modelName,
95
- reasoning: false,
96
- input: ['text'],
97
- cost: {
98
- input: 0,
99
- output: 0,
100
- cacheRead: 0,
101
- cacheWrite: 0
102
- },
103
- contextWindow: 128000,
104
- maxTokens: 8192,
105
- api: CONFIG.api
84
+ name: CONFIG.modelName
106
85
  }
107
86
  ]
108
87
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-apikey-cli",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "CLI tool to update OpenClaw API key for CSDN custom provider",
5
5
  "main": "index.js",
6
6
  "bin": {