Agnes 免费/限时免费标注 + 免费标签间距对齐(老板 2026-09-24)
老板两件事:
1) Agnes 的模型也要标免费或限时免费 —— 之前只有 OpenCode 的 space-bunny-free 有标注;
2) 免费标签跟模型名的间隔不一样,优化。
免费标注:
- 口径(照官方措辞,按 bullet 切块判定,不关键词泛扫):
· OpenCode 价格表 Input/Output = Free(原逻辑)
· Agnes 定价页「### 当前优惠」:当前(均)免费 → 免费;当前限时免费 → 限时免费
坑:Agnes 视频 agnes-video-2.5 那条 bullet 写着「输入图片前 5 张免费」——
那是计费公式的免费额度、不是模型免费,所以只认严格措辞「当前免费 / 当前均免费 /
均免费 / 限时免费」,且只认反引号里的完整 id(agnes-video-2.5 是
agnes-video-2.5-flash 的子串,字符串包含会串味)。
- 配置:free: true(免费)+ 新增 free_limited: true(限时免费)。
落盘 7 条:3.0-flash / 2.5-flash / image-2.0-flash / image-2.1-flash /
image-2.5-flash / video-v2.0 = 免费;video-2.5-flash = 限时免费。
- scripts/sync_models.py:新增 _agnes_free_map() / _set_agnes_free(),免费标注纳入
漂移比对 + --apply 落盘(官方改口径 → 整行撤掉标注),回读校验新增 Agnes 免费位检查;
新增模型块也会带上标注。
- 后端:ModelInfo.free_limited + /v1/models 带出 free_limited(别名随目标继承)。
- 前端:标签文案 免费 / 限时免费(中英各 +2 键,i18n 755/755 对称),提示语同步更新
(原文案只提 OpenCode Go 计划,已不准确)。
间距:
- 根因:.st-row 是 flex(gap:8px),.name-free 又加 margin-left:6px → 标签左侧 8+6=14px、
右侧 8px,与其它行「模型名 → 供应商名」的 8px 节奏不一致。
- 修法:.st-row .name-free { margin-left: 0 }(表格单元格是行内排布、无 flex gap,
那边保留 6px)。同源最小页实测:修前 14/8,修后 8/8。
测试:新增 test_agnes_free_map_rules、test_agnes_free_apply_and_revoke_round_trip
(含 撤标注/限时→免费/幂等/相邻手写注释不被碰);195 passed / 0 failed。
This commit is contained in:
1 parent
4d25cb64e1
commit
13d4fdc44e
10 files changed
+312
-12
No files matched your search
@@ -382,7 +382,9 @@ export default {
|
||||
capability: 'Capability',
|
||||
visionTag: 'Vision',
|
||||
freeTag: 'Free',
|
||||
freeHint: 'Officially free model: no token billing (quota is set by the vendor; only Space Bunny Free in the current OpenCode Go plan)',
|
||||
freeHint: 'Officially free model: no usage-based billing (quota is set by the vendor; both the Agnes and OpenCode Go free tiers are labelled)',
|
||||
freeLimitedTag: 'Limited-time free',
|
||||
freeLimitedHint: 'Officially "limited-time free": the offer has an expiry — the daily sync updates this label when the vendor changes it',
|
||||
paramTag: 'Params locked',
|
||||
paramLocked: 'Parameters pinned by the gateway: {p} (upstream hard limit; values from clients and the speed test are overridden)',
|
||||
allTextModels: 'All text models',
|
||||
|
||||
Reference in new issue
Block a user