feat(ragkit): 云端向量后端容错与 batch_size 适配(0.2.1) - #89
Merged
Conversation
- backend.py: 默认批大小 16→10(DashScope text-embedding-v4 兼容模式硬上限),支持 cloud config 的 batch_size 覆盖 - pipeline.py + ragkit.py: 云端调用失败(密钥失效/网络异常/sidecar 崩溃)捕获为 vector_error,自动降级词汇+元数据路,不再整体崩溃,stderr 透出失败详情 - README.md + query/SKILL.md: 补各平台 API key 设置、强制走云端、batch_size 调优、vector_error 降级信号说明 - tests: 新增降级不崩与 batch 覆盖用例,批大小边界改为 10 - 定版 0.2.1(plugin.json + marketplace.json 同步) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
本地一批未提交的 ragkit 改动是「云端向量后端容错 + batch_size 适配」的完整工作,原打算发 0.1.3——但同步时发现上游已发布过 0.1.3 并推进到 0.2.0,故在 0.2.0 之上重挂为 0.2.1。
改动内容
代码
backend.py:默认批大小_BATCH16→10(DashScopetext-embedding-v4兼容模式单请求硬上限 10,原值会报400 InvalidParameter);_encode_cloud支持 cloud config 的batch_size覆盖。pipeline.py+ragkit.py:云端调用失败(密钥失效/网络异常/sidecar 崩溃)捕获为新状态vector_error,自动降级词汇+元数据路,退出码仍为 0,stderr 透出失败详情。tests/conftest.py:run_cli显式 UTF-8,修 Windows GBK 解码崩溃。文档 / 元数据
README.md+skills/query/SKILL.md:补各平台 API key 设置、强制走云端、batch_size 调优、vector_error降级信号说明。验证
python scripts/check_marketplace_versions.py:✓ 四插件四宿主锁步,ragkit @ 0.2.1pytest plugins/ragkit/tests/:47 passed🤖 Generated with Claude Code