Repository navigation
feat(ModelBind): anthropic 定价行进 Model Bind 下拉、Models 页 Label 列、下拉按 vendor 分组、Model Mapping 按 target 设并发度(v0.6.20) - #356
Merged
Conversation
…拉按 vendor 分组排序; - 派生条件改为「vendor 在激活链 且 model 以该 vendor 原生前缀族开头」:anthropic 的 claude-haiku-5-5 等新型号不再需要改内置目录或 bindable_models;copilot / antigravity / gemini 等无前缀族 vendor 行不派生,identity 规则合成范围不变; - ModelPricingEntry 增 label(默认空):Models 页 Label 列 + 行展开可编辑(已保存行仅 vendor / model 锁定);下拉 label 优先级 bindable_models > pricing label(offline_key 归一互配)> 内置 label > model 名; - 下拉按归属 vendor 在激活链(订阅状态顺序)中的位次分组、组内版本降序,中继条目与无归属 custom 条目排最后; - Model Mapping 子页签每条 target 增「Concurrency」列(仅注册表点名 concurrency 的 vendor),读写 vendors.<type>.concurrency.models[target],留空沿用默认,与 Overview Model Calling 内联编辑同源; - 测试:派生 / label 优先级 / 分组排序用例,Config 页 Label 列与 Concurrency 列 Node harness 用例;文档同步; 🤖 Generated with [Claude Code](https://claude.com/claude-code), [CodeX](https://openai.com), [Gemini Code Assistant](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code), [CodeX](https://openai.com), [Gemini Code Assistant](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
…bel 列、下拉按 vendor 分组、Model Mapping 子页签按 target 设并发度; 🤖 Generated with [Claude Code](https://claude.com/claude-code), [CodeX](https://openai.com), [Gemini Code Assistant](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
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.
变更摘要
claude-haiku-5-5、claude-fable-5-2等在 Models 页配价即进下拉,不再依赖改内置目录_ANTHROPIC或session_policies.bindable_models;copilot / antigravity / gemini 等无前缀族 vendor 的行(上游回报名)仍不派生,identity 规则合成范围不变。ModelPricingEntry.label(默认空),表格 Model 右侧显示、行展开可编辑(已保存行仅 vendor / model 锁定);下拉 label 优先级bindable_models> pricing label(offline_key归一互配)> 内置 label > model 名。tiers,订阅状态顺序)中的位次分组,组内版本降序;中继条目与无归属 custom 条目排最后。default(显示「默认 N」),读写vendors.<type>.concurrency.models[target],与 Overview Model Calling 内联编辑同源;anthropic 等 monitor 模式 vendor 无此列。session-model-bind.md/config-reference.md同步。动机
Session 页 Model Bind 下拉选不到 Models 清单里的 Haiku 5.5:派生条目只取 native 系 vendor,anthropic 被排除。顺带消除「每次新增模型都要改代码或加 bindable_models」的维护负担,并按用户要求补齐 Label 美化、分组排序与 target 级并发度配置。
验证
uv run pytest:2491 passed(新增test_model_catalog.py派生 / label 优先级 / 分组排序用例、test_zhipu_concurrency.py预建槽位用例、test_dashboard_config_tab.pyLabel 列与 Concurrency 列 Node harness 用例);ruff check / format 通过。Sonnet 5.5 · anthropic, Opus 5.5, Haiku 5.5, Fable 5.2, …后接GLM 5.4 · zhipu, …;Vendors › Zhipu › Model Mapping 带 Concurrency 列(1 / 5 / 1),展开行有可编辑数字字段,Anthropic 子页签无此列;Overview Model Calling 显示glm-5.4 0 / 5、glm-5.3-flash 0 / 1(无流量)。PUT /api/config写入推断 label(pricing revision 13 → 14),写入前快照留档。风险点
default),本次未改。claude-haiku-4.5、Claude Haiku 4.5)的 label 按offline_key归一后作用于同名内置条目,多行同名时取首个非空 label。