@wu529778790/open-im 1.8.1-beta.1 → 1.8.1-beta.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.
@@ -39,11 +39,14 @@ function isResult(msg) {
39
39
  */
40
40
  async function getOrCreateSession(sessionId, _workDir, // 保留参数以备将来使用
41
41
  model, permissionMode) {
42
+ const resolvedModel = model?.trim() || 'claude-opus-4-5';
42
43
  const sessionOptions = {
43
- model: model || 'claude-opus-4-5',
44
+ model: resolvedModel,
44
45
  permissionMode,
45
46
  // 可以添加其他选项,如 hooks, allowedTools 等
46
47
  };
48
+ const baseUrl = process.env.ANTHROPIC_BASE_URL ?? '(default)';
49
+ log.info(`[ClaudeSDK] model param=${String(model ?? '')} resolved=${resolvedModel} baseUrl=${baseUrl}`);
47
50
  let session;
48
51
  if (sessionId) {
49
52
  // 尝试恢复已有会话
@@ -115,6 +118,7 @@ export class ClaudeSDKAdapter {
115
118
  log.warn('Claude SDK: No API credentials found in environment variables');
116
119
  }
117
120
  log.info(`[V2] Session: ${sessionId ?? 'new'}, prompt="${prompt.slice(0, 50)}..."`);
121
+ log.info(`ClaudeSDK model param=${String(options?.model ?? '')} baseUrl=${process.env.ANTHROPIC_BASE_URL ?? '(default)'}`);
118
122
  // 获取或创建会话
119
123
  const { session } = await getOrCreateSession(sessionId, workDir, options?.model, permissionMode);
120
124
  // 发送用户消息
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wu529778790/open-im",
3
- "version": "1.8.1-beta.1",
3
+ "version": "1.8.1-beta.3",
4
4
  "description": "Multi-platform IM bridge for AI CLI tools (Claude, Codex, CodeBuddy)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",