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
e3e8cac54f
commit
aabd473b33
10 files changed
+312
-12
No files matched your search
@@ -27,21 +27,26 @@ providers:
|
||||
- id: "agnes-3.0-flash"
|
||||
display_name: "Agnes 3.0 Flash"
|
||||
type: "text"
|
||||
free: true # 2026-09-24 自动同步:文档「当前优惠」写当前免费(scripts/sync_models.py)
|
||||
# 第十三轮: Agnes 3.0 Flash 文档「输入模态:文本、图像 URL」→ 支持视觉(对话带图)。
|
||||
# 实测 data:image/png;base64,... 也能识别。
|
||||
vision: true
|
||||
- id: "agnes-2.5-flash"
|
||||
display_name: "Agnes 2.5 Flash"
|
||||
type: "text"
|
||||
free: true # 2026-09-24 自动同步:文档「当前优惠」写当前免费(scripts/sync_models.py)
|
||||
# Agnes 2.5 Flash(2.0 升级版):OpenAI 兼容 /v1/chat/completions,支持图像 URL 输入与工具调用,
|
||||
# 上下文 512K / 最大输出 65.5K;当前定价暂免(¥0/百万)。参见官方文档 agnes-25-flash。
|
||||
vision: true
|
||||
- id: "agnes-image-2.5-flash"
|
||||
display_name: "Agnes Image 2.5 Flash"
|
||||
type: "image"
|
||||
free: true # 2026-09-24 自动同步:文档「当前优惠」写当前免费(scripts/sync_models.py)
|
||||
- id: "agnes-video-2.5-flash"
|
||||
display_name: "Agnes Video 2.5 Flash"
|
||||
type: "video"
|
||||
free: true # 2026-09-24 自动同步:文档「当前优惠」写当前限时免费(scripts/sync_models.py)
|
||||
free_limited: true # 限时免费;文档改口径后同步会自动撤掉这行
|
||||
# 2026-09-24 自动同步:官方文档新增(scripts/sync_models.py)
|
||||
- id: "agnes-2.5-pro"
|
||||
display_name: "Agnes 2.5 Pro"
|
||||
@@ -56,10 +61,12 @@ providers:
|
||||
- id: "agnes-image-2.0-flash"
|
||||
display_name: "Agnes Image 2.0 Flash"
|
||||
type: "image"
|
||||
free: true # 2026-09-24 自动同步:文档「当前优惠」写当前免费(scripts/sync_models.py)
|
||||
# 2026-09-24 自动同步:官方文档新增(scripts/sync_models.py)
|
||||
- id: "agnes-image-2.1-flash"
|
||||
display_name: "Agnes Image 2.1 Flash"
|
||||
type: "image"
|
||||
free: true # 2026-09-24 自动同步:文档「当前优惠」写当前免费(scripts/sync_models.py)
|
||||
# 2026-09-24 自动同步:官方文档新增(scripts/sync_models.py)
|
||||
- id: "agnes-video-2.5"
|
||||
display_name: "Agnes Video 2.5"
|
||||
@@ -68,6 +75,7 @@ providers:
|
||||
- id: "agnes-video-v2.0"
|
||||
display_name: "Agnes Video V2.0"
|
||||
type: "video"
|
||||
free: true # 2026-09-24 自动同步:文档「当前优惠」写当前免费(scripts/sync_models.py)
|
||||
|
||||
volc_engine:
|
||||
name: "火山方舟 Coding Plan"
|
||||
|
||||
Reference in new issue
Block a user