feat: 加入embeddings、rerank - #287
Open
SoraKasvgano wants to merge 1 commit into
Open
Conversation
1. Embedding 502 修复 (internal/relay/transformers.go) - 从 embedding 兼容列表中移除了 openai_response 类型。openai_response 的 outbound transformer 会构造错误的 URL 路径,导致上游必定失败。 ──- 你需要将 LM Studio embedding 渠道的类型改为 openai_embedding 或 openai_chat_completion,这样 outbound transformer 才能正确构造 /v1/embeddings 请求路径。 2. /v1/rerank 支持 (internal/relay/rerank.go + internal/server/server.go) - 新增了 Jina/Cohere 格式的 rerank 透传 handler,复用现有的 group/balancer/metrics 基础设施。 - 支持负载均衡、熔断、重试、自定义 header、代理等所有渠道特性。 - 使用方式:创建一个渠道指向 rerank 服务(如 Jina),创建分组映射模型名,然后通过 POST /v1/rerank 调用。 3. 分组/渠道重名错误优化 (internal/db/errors.go + handlers) - 新增 IsDuplicateError 工具函数,检测 SQLite/MySQL/PostgreSQL 的 UNIQUE 约束错误。 - 创建分组或渠道时如果名称重复,现在返回 HTTP 409 + "Resource already exists",而不是原始的数据库错误信息。
Author
|
Author
|
Commit 97d6a04 axonhub/llm 另外这个go mod tidy 好像获取不到 |
3 tasks
chenjingxiong
added a commit
to chenjingxiong/octopus
that referenced
this pull request
Jun 21, 2026
…truirui#208 已内置) 合入的 PR: - bestruirui#262 添加活动热力图自定义日期范围选择功能 (cherry-pick) - bestruirui#271 修复日志无法滚动问题 (手动适配:VirtualizedGrid reachEnd 重置 + 日志分页偏移) - bestruirui#287 加入 rerank 转发路由 + 重复资源检测 (手动适配) - bestruirui#208 空响应检测触发负载均衡重试 → 已被 axonhub/llm 内置 WithEmptyResponseDetection() 覆盖,无需手动移植 跳过的 PR: - bestruirui#282 TOTP + JSON 替换 (+1425/-115,改动过大) - bestruirui#270 key 选择模式 (改了已删除的 images.go,需大量适配) - bestruirui#199 熔断器开关 (改了已删除的 transformer,冲突复杂) - bestruirui#198 渠道标签系统 (13 文件,改动偏大) - bestruirui#194 日志筛选增强 (8 文件 +512/-86,改动偏大) - bestruirui#190 统计清除 (合并提交多,冲突复杂) - bestruirui#184 渠道排序 (排序已内置上游,复制功能非核心) 版本升级至 v0.9.28-2 Co-Authored-By: Claude <noreply@anthropic.com>
hadc188
added a commit
to hadc188/octopus
that referenced
this pull request
Aug 5, 2026
同步上游: - feat: API 转换迁移到 axonhub/llm(含渠道类型字符串迁移 003) - perf: 前端 Next.js 改为 Vite - fix: 日志清理/清空并发、日志内存延迟释放、ParamOverride、saveLog 回归 - feat: DeepSeek thinking + Nvidia chat template 支持 本地修复(基于议题/PR 调研): - feat: 支持 /v1/responses/compact(codex 压缩,bestruirui#294) - fix: 首字超时覆盖「等待上游响应头」阶段(bestruirui#289) - feat: 渠道 key 选择模式(成本/轮询/加权随机,bestruirui#270,修复 bestruirui#245) - feat: 支持 /v1/rerank(Jina/Cohere,bestruirui#287) - feat: 渠道/分组重名返回 409 - fix: http client 增加 ResponseHeaderTimeout 兜底
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.
才能正确构造 /v1/embeddings 请求路径。