Skip to content

Conversation

@dingyi222666
Copy link
Member

This PR bumps adapter package versions and fixes a shared utility initialization issue.

New Features

N/A

Bug fixes

  • Fix additionalKwargs initialization in shared utils to prevent undefined assignment (packages/shared/src/utils.ts)

Other Changes

  • Bump most adapter packages from alpha.5 to alpha.6
  • Bump openai-like-adapter from alpha.6 to alpha.7
  • Bump qwen-adapter from alpha.6 to alpha.7
  • Bump gemini-adapter from alpha.10 to alpha.11

This ensures all adapters are on consistent version numbers and resolves potential runtime issues with uninitialized object properties in the shared utilities.

…ation

- Bump most adapter packages from alpha.5 to alpha.6
- Bump openai-like-adapter from alpha.6 to alpha.7
- Bump qwen-adapter from alpha.6 to alpha.7
- Bump gemini-adapter from alpha.10 to alpha.11
- Fix additionalKwargs initialization in shared utils to prevent undefined assignment
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 28, 2025

Walkthrough

在 packages/shared/src/utils.ts 的 convertMessageToMessageChunk 中,将局部变量 additionalKwargs 从 let 的内联类型声明改为 const,并初始化为 {},未改变导出接口或其他文件。

Changes

Cohort / File(s) Summary
消息片段转换内部变量调整
packages/shared/src/utils.ts
additionalKwargslet 带内联类型改为 const,并显式初始化为 {};未影响函数签名或导出实体。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

我在代码田里蹦一蹦,🥕
把 let 换成 const 不再动。
空壳 {} 安心种,
小小变量更从容。
轻风拂过 utils.ts,兔子点头:稳如松。

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed 提供的标题“Fix: Bump adapter versions and fix shared utils initialization”清晰地概括了 PR 中的两大核心更改:升级适配器版本以及修复共享工具初始化问题,准确反映了开发者的主要意图和改动内容。标题简洁明了,不包含无关噪声或冗余信息,使得团队成员在查看历史记录时能够一眼了解变更重点。整体来看,标题与变更集高度吻合,无需进一步修改。
Description Check ✅ Passed 作者提供的描述详细列出了对多个适配器包的版本升级及 shared utils 初始化 Bug 修复,涵盖了 PR 的核心更改内容并与 raw_summary 和 PR 目标保持一致。描述中明确指出了受影响的文件路径、版本号变更范围以及修复的具体问题,使审阅者能够快速理解变更背景和动机。整体来看,描述既不离题也不模糊,为代码审查提供了充分的上下文和细节。
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/shared-adapter

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ada5c44 and 4e26b15.

⛔ Files ignored due to path filters (15)
  • packages/azure-openai-adapter/package.json is excluded by !**/*.json
  • packages/claude-adapter/package.json is excluded by !**/*.json
  • packages/deepseek-adapter/package.json is excluded by !**/*.json
  • packages/dify-adapter/package.json is excluded by !**/*.json
  • packages/doubao-adapter/package.json is excluded by !**/*.json
  • packages/gemini-adapter/package.json is excluded by !**/*.json
  • packages/hunyuan-adapter/package.json is excluded by !**/*.json
  • packages/ollama-adapter/package.json is excluded by !**/*.json
  • packages/openai-adapter/package.json is excluded by !**/*.json
  • packages/openai-like-adapter/package.json is excluded by !**/*.json
  • packages/qwen-adapter/package.json is excluded by !**/*.json
  • packages/rwkv-adapter/package.json is excluded by !**/*.json
  • packages/spark-adapter/package.json is excluded by !**/*.json
  • packages/wenxin-adapter/package.json is excluded by !**/*.json
  • packages/zhipu-adapter/package.json is excluded by !**/*.json
📒 Files selected for processing (1)
  • packages/shared/src/utils.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: lint
🔇 Additional comments (1)
packages/shared/src/utils.ts (1)

325-332: 初始化 additionalKwargs 避免未定义写入

之前这里直接给 additionalKwargs.reasoning_content 赋值时可能因为变量仍是 undefined 而抛错,现在初始化为空对象并改为 const 后保证了引用安全且仍允许属性写入,👍。


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dingyi222666 dingyi222666 merged commit 3f08420 into v1-dev Sep 28, 2025
5 checks passed
@dingyi222666 dingyi222666 deleted the fix/shared-adapter branch September 28, 2025 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants