claw-subagent-service 0.0.148 → 0.0.150

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claw-subagent-service",
3
- "version": "0.0.148",
3
+ "version": "0.0.150",
4
4
  "description": "虾说智能助手",
5
5
  "main": "cli.js",
6
6
  "bin": {
@@ -165,10 +165,10 @@ async function forwardChatMessage(sessionId, content, onDelta, logFn, timeoutMs
165
165
  log('DEBUG', `请求超时: ${timeoutMs}ms`);
166
166
 
167
167
  // 构建请求体,包含 system 和 model 参数
168
- // model 字段是必需的,告诉 Gateway 使用哪个 AI 提供商和模型
168
+ // model 字段格式: "provider/model-id",例如 "kimi-coding/kimi-k2.6"
169
169
  const requestBody = {
170
170
  system: SYSTEM_PROMPT,
171
- model: { providerID: 'opencode', modelID: 'default' },
171
+ model: 'kimi-coding/kimi-k2.6',
172
172
  parts: [{ type: 'text', text: content }]
173
173
  };
174
174
 
@@ -176,7 +176,12 @@ async function forwardChatMessage(sessionId, content, onDelta, logFn, timeoutMs
176
176
 
177
177
  try {
178
178
  log('DEBUG', `发送请求到: ${url}`);
179
- log('DEBUG', `请求体: ${JSON.stringify(requestBody).substring(0, 500)}`);
179
+ // 只记录请求体结构,避免 system 提示词过长截断其他字段
180
+ const requestBodyForLog = {
181
+ ...requestBody,
182
+ system: `[${requestBody.system.length} 字符的系统提示词]`
183
+ };
184
+ log('DEBUG', `请求体结构: ${JSON.stringify(requestBodyForLog)}`);
180
185
 
181
186
  const response = await axios.post(url, requestBody, {
182
187
  headers: { 'Content-Type': 'application/json' },