feat(plugin): support account-scoped adapted model catalogs (#533)

* feat(plugin): publish account-scoped adapted model catalogs

* fix(core): preserve candidate account scope during execution

Apply the narrowed candidate scope before provider account selection, including affinity and account rotation. Cover adapted-only models and same-name models with incompatible tool capabilities through the real OpenAI selector and local HTTP fixtures.

Co-authored-by: Codex <noreply@openai.com>

---------

Co-authored-by: Zyy <zyycn@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Ke Wang
2026-10-27 13:37:57 +08:00
committed by GitHub
co-authored by Codex Zyy
parent 9296885cce
commit 19fbb5da75
31 changed files with 1125 additions and 65 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ flowchart LR
| 页面模型请求 | 每次选择 Client Key,经固定实例版本的 Responses 桥执行,返回原生 JSON 或 SSE |
| 请求中间件、模型路由、账号调度、重试策略、请求观察 | 匹配功能范围的正常网关请求自动使用;重试策略故障时交给后续处理 |
| 上游适配器 | 为内置 OpenAI / xAI 的生成请求提供上游实现;沿用宿主选号、代理、租约与结算,命中但不可用时拒绝请求 |
| 模型目录 | 启用后原子发布别名,列表与路由继承目标模型的能力和现有访问范围 |
| 模型目录 | 原子发布直接别名或适配模型;别名继承目标能力,适配模型按适配器账号范围和声明能力参与既有路由 |
| 基础数据页面 | 通过宿主数据回调读取账号基础信息与已有额度观测,展示本身不进入请求改写链 |
| 入口认证 | 客户端按插件协议访问,宿主把明确的 principal 映射到 Client Key |
| 命令行 | 在宿主环境运行 `codex-proxy-rs plugin <配置 ID> --help` |