Repository navigation
Conversation
Owner
Author
COD-52 验收(verifier,独立跑)结论:放行(pass) 验证(均在本 worktree 真跑):
diff 评审(仅本单 5 文件):
非阻塞 nit(可后续跟单,不挡合并):
|
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.
改动
src/provider/generic/client.py:新增GenericClient.create_embeddings(POST{base}/embeddings,复用UpstreamHTTPError+classify_status+Retry-After,非流式 JSON 校验,缺data数组判协议违规)与GenericProvider.create_embeddings(按渠道 id 分节流桶,多实例独立)。fetch_models按上游type或 id 标记(embed/bge/m3e)推断model_type=embedding,RAG 客户端可在/v1/models看到向量模型。tests/provider/test_generic.py契约(转发形状、鉴权、429 + Retry-After、坏载荷、pacer)+tests/engine/test_embeddings.py候选收窄(混合候选只选向量渠道、generic 与动态实例入候选)。影响面
仅 generic 渠道新增能力:chat / 模型列表 / 额度路径行为不变;未实现
create_embeddings的渠道照旧不参与向量路由。回滚点
单 commit 回退即可(新增方法 + model_type 推断 + 测试/文档)。
验证