Files
token-list-share/.gitignore
Charles7c 853dc39f3a 修正可用模型列表口径,并支持复制模型名
可用模型列表此前直接用 /admin/accounts/{id}/models 的返回,那是上游渠道挂载的
全量目录,未经账号 model_mapping 投影,导致「上游有但账号没配」的模型(qwen3.6-flash、
qwen3.7-max)被列成可用,而实际调用返回 404 model_not_found;别名式映射
(deepseek-v4-flash => deepseek-v4-flash-0731)还会把上游名列出来、别名反而不可用。

- 新增 projectAccountModels:复刻网关 /v1/models 的 projectAccountModelsBody,
  候选为「上游模型 ∪ model_mapping 别名」,逐条解析映射(精确优先、末尾 * 通配最长优先),
  未命中即丢弃,命中后校验映射目标确实存在于上游目录,最终输出别名而非上游名
- 过滤链统一为:上游全量 → model_mapping 投影 → 分组 model_allowlist → 账号粒度状态
- 状态判定回到账号粒度(挂它的账号里至少一个在线才算可用),不再按分组任一账号在线放大
- filterModelsByAllowlist 复刻 Sub2API GroupModelAllowlist.FilterForListing
- AdminAccount 补 credentials(model_mapping 不在脱敏清单内,可安全读取),
  移除三个 Sub2API 并不存在的 models/model_whitelist/allowed_models 字段

可用模型弹窗:模型名支持点击复制(带 1.5s 对勾反馈,非安全上下文回退 execCommand),
并左对齐——.model-table td 的居中特异性高于 .model-name,需用 td.model-name 覆盖。
2026-09-15 14:54:20 +08:00

22 lines
427 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
node_modules
dist
.idea
.DS_Store
*.local
.env
.env.*.local
*.tar.gz
# 探针本地试跑产物与凭证(含 Cookie绝不可提交
__pycache__/
deploy/bailian-probe.env
*.probe.jsonl
bailian.json
bailian.json.state.json
.tmp-bailian/
# 本地联调用的快照替身:防止把过期样例数据打进 dist
public/data/
# 本地工作台数据(记忆、临时脚本与部署日志,不进版本库)
.workbuddy/