Repository navigation
fix(providers): 补齐 StepFun Plan 订阅端点配置 - #1139
Conversation
Expose the subscription endpoint in the service picker so its key is paired with the Step Plan route and Anthropic Messages format. Bind it to the existing first-party models.dev vendor record. Reuse published model capabilities and existing runtime adapters instead of carrying the obsolete Step 5 metadata supplement from PR vastsa#763.
vastsa
left a comment
There was a problem hiding this comment.
整体实现方向正确:Step Plan 预设的 .com 地址、Anthropic Messages 格式与仓库现有 URL 归一化逻辑相符。请处理以下两项后再合并:
-
更新主线基线。 当前远端
origin/main是2a4b80a6ef9f4136a44345021f21b7a4f1f9e634,PR head38ab396a09b46df20344261d1bb466e2a7881123的父提交仍是3f5ada32eadd002a283d59820682b1a60addf30d,因此 head 不包含最新主线。现有基线检查是在主线推进前通过的;请更新分支并重跑相关检查。 -
补持久回归覆盖。 新增的是用户可选的预设,但现有
provider-presets.test.ts/service-catalog.test.mjs没有断言该项的vendorKey、URL 和apiStyle;e2e-provider-api-style也没有覆盖选择并保存 StepFun Plan。PR 描述的临时 Electron 检查不能防止后续回归。请加入针对该配置的断言,并在 E2E 计划记录对应用户路径(选择预设 → 输入密钥 → 发现/选择模型 → 保存)。
Keep the subscription vendor, endpoint and API format under durable regression coverage, including discovery and explicit model selection through the real settings form in both supported fixture languages. Incorporate upstream main and document the user path so the temporary validation from the original PR remains reproducible in the repository.
Refresh the StepFun Plan candidate against upstream 0.15.9 before PR validation, preserving the existing preset and regression coverage.
Display endpoint hosts and paths in both the service picker and selected service summary so StepFun Plan does not look like the ordinary API. Allow long routes to wrap while excluding URL credentials and query data from the visible endpoint label. Keep request configuration unchanged and cover the visible subscription path alongside the existing Anthropic discovery and save assertions.
|
@vastsa 两项审核意见已处理,当前 head 为
另外,服务列表和选中后的摘要现在直接显示 本地相关测试及完整 provider 界面测试通过,远端 JS、Rust、Docs、PR base 四项检查全部通过。界面测试使用模拟 API 边界,未调用真实付费模型。 |
修复内容
当前模型目录已收录 StepFun Plan 和 Step 5 Preview,但「添加 AI 服务」的预设列表缺少订阅端点。本 PR 补齐 StepFun Plan 配置入口,默认使用
https://api.stepfun.com/step_plan/v1和 Anthropic Messages;现有适配器将请求发送到/step_plan/v1/messages。stepfun-step-planvendorKey,能力和上限直接取第一方目录。api.stepfun.com/step_plan/v1,窄屏允许换行;显示标签不包含 URL 用户名、密码或查询参数。默认接口仍是 Anthropic Messages。替代 #763。旧 PR 的硬编码模型补充已被主线目录覆盖,本次不再引入,也不携带旧 PR 的语音和锁文件修复。
审核意见处理
b684e661797996db3ac64c3c5bdf5764a38fd522(0.15.9),保留分支历史。provider-presets.test.ts固定断言 vendorKey、订阅 URL、apiStyle,并确认普通/v1地址不会匹配订阅预设。service-catalog.test.mjs覆盖唯一入口以及中文名称、英文名称、vendorKey、订阅 URL 搜索。e2e-provider-api-style永久覆盖中英文用户路径:选择 StepFun Plan → 输入测试密钥 → 发现模型 → 显式选择 Step 5 Preview → 保存;检查发现请求和保存参数。最终候选验证
Task candidate:
267698ccbea8e5a0ab122221936e111cbfac8175Base main:
b684e661797996db3ac64c3c5bdf5764a38fd522Environment: macOS,复用本机依赖,独立工作目录与临时 Electron profile。
e2e-provider-api-style:22 个场景通过,覆盖英文和简体中文;6 次创建、28 次更新均通过模拟 API 边界检查。此前 Codex 场景的基线失败随上游同步解决。check:pr-base -- --base upstream/main --head HEAD通过。界面测试使用真实设置组件,外部 API 被替换为测试边界;不声称覆盖 Host 落库、真实密钥或付费模型请求。本次 PR 没有 Rust 代码差异,未额外运行本地 Rust 全量检查。
官方依据:Step Plan API 接入说明。