feat: 聚合供应商支持按模型路由 - #1780
Conversation
|
审查结论:暂不建议合并。当前 Windows artifacts CI 失败,失败用例是 |
|
已同步最新 main(
即:本次 CI 失败不是本 PR 引入,而是上游 main 当前的问题,需要上游先修复该 launcher 测试(Windows 环境)。 |
|
已再次同步最新 main(
PR 当前 |
BigPizzaV3
left a comment
There was a problem hiding this comment.
当前实现仍有一个阻塞性的路由失效路径:
RelayRotationSelector::select_with_outcomes 在调用 match_route_for_aggregate 前先执行 validate_aggregate_members(settings, &self.aggregate)?。因此,只要聚合中的任一成员缺少 relay、base URL 或 API key,选择流程就会直接返回 SelectionError;后续宣称会跳过无效目标的 relay_is_available / RouteMatchInfo::SkippedInvalidRelay 根本没有机会执行。
这会导致一个与 PR 描述相反的行为:某条路由目标失效时,请求不是跳过该规则并继续匹配/回退,而是整个聚合请求失败。请把校验调整到与路由语义一致:路由匹配阶段允许跳过无效目标;最终选中的普通策略成员仍需严格校验。并增加“最高优先级路由目标缺 key,下一条有效路由命中”以及“无有效路由后回退聚合策略”的回归测试。
另外该分支已再次与最新 main 冲突,修复后请 rebase 并重跑三平台 CI。
|
已按 review 意见修复完成,说明如下: 修复内容
CI 结果三平台 CI 全部通过(run 32471131089):
另:8/11 指出的 upstream 主题资源 SHA 问题已被上游 main 修复,当前分支不再涉及。 |
Merge PR BigPizzaV3#1956: establish the floating-panel injection and composition boundary.
Merge PR BigPizzaV3#1958: add the floating-panel appearance modules and source contracts.
Merge PR BigPizzaV3#1959: add the floating-panel core shell modules and source contracts.
…meter-refresh-recvq95WPsHCC3 Refresh MiniMax preset to global endpoint and MiniMax-M3
|
|
Route aggregate relay requests by model pattern instead of only rotating through members. Routes are matched by priority (descending, stable for ties) and skipped when the target is invalid (missing relay/base_url/api_key or not an aggregate member), falling back to the active strategy when no route matches. - select_with_outcomes returns the relay together with match outcomes so diagnostics match the actual selection from a single match pass - route matching skips invalid targets and records SkippedInvalidRelay; only the strategy-selected member is strictly validated - fallback_relays_after filters out invalid members - add route-related translation keys and frontend route editor/validator - tests: skip invalid route targets, fallback to strategy, filter invalid fallback members, keep rotation index unchanged on route hit, and strict validation of a strategy-selected invalid member
453e50e to
b7a48e7
Compare
|
已按 review 意见完成修复并 rebase: 1. 聚合成员预校验问题
现在行为与描述一致:某条路由目标失效时请求跳过该规则继续匹配/回退,而不是整个聚合失败。 2. 回归测试
本地验证: 3. Rebase 与 CI已将分支 rebase 到最新 三平台 CI 全部通过(run 33029088679):
|
概述
model改写为被选中成员供应商的默认模型requires_openai_auth = false详细说明
deepseek-*、gpt-*等通配符模式及精确模型名匹配。修复:聚合供应商不再强制要求 OpenAI 登录
requires_openai_auth = true,强制要求聚合中继并不需要的 OpenAI 登录态。RelayMode::Aggregate生成的供应商配置现在写入requires_openai_auth = false,并且relay_config_status_from_home会将「base_url + bearer token」的聚合配置视为已配置,无需 OpenAI 登录。relay_config_status_treats_aggregate_provider_as_configured_without_openai_auth。Closes #1744.
测试计划
npm testnpm run checkcargo test -p codex-plus-core --test relay_rotationcargo test -p codex-plus-core --test protocol_proxy aggregate -- --nocapturecargo test -p codex-plus-core --test relay_configcargo test -p codex-plus-core --test relay_switch