Repository navigation
feat(upstream): 平台优先接入与自动协议转换 - #1434
Merged
Merged
Conversation
Co-authored-by: Codex <codex@vectorcontrol.tech>
6 tasks
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.
问题与效果
独立上游按产品接入:选择平台、填写 API Key,自建平台补充 Base URL。模型发现、凭据、模型授权和路由统一初始化;逐协议设置保留在高级配置中。
改动清单
/api/imported-upstreams/connect,模型发现支持有界分页、超时和响应大小限制;认证失败、发现失败和写入失败不会留下部分配置。发现接口不支持时明确返回预设模型状态,不将其标为已验证可用。net/url构造,保留 JSON/SSE 与图片准备拒绝断言,移除未发布历史中的凭据 URL 字面量。验证与未完成项
最终提交
75ae1daad4dd96ade281b0d97cf856d00067bb83,treec606f82908621ea6d628926b71faf6604b764be2,工作区干净。go test ./... -count=1 -race。go test ./... -count=1 -race -p 1 -timeout 900s已通过,使用独立临时测试库;管理、代理、导入、OAuth、平台接入和 store 均通过。尚未完成特殊认证渠道、通用变换/流/限流策略及部分非生成接口。真实厂商和下游客户端验收继续由 #1396 跟踪。本 PR 不包含正式发版或生产部署。
关联 Issue
Refs #1396