[Bug]: vertex_ai Claude rows store “not sooner than” floors and wrong shutdown dates as deprecation_date

使用 LiteLLM Proxy 并开启 model_deprecation_warnings 告警时,如果配置了 vertex_ai/claude-* 模型,每天收到的弃用提醒可能把 Google 模型卡上的 "Not sooner than" 时间下限,或错误的固定日期当成 deprecatio

快速结论:使用 LiteLLM Proxy 并开启 model_deprecation_warnings 告警时,如果配置了 vertex_ai/claude-* 模型,每天收到的弃用提醒可能把 Google 模型卡上的 “Not sooner than” 时间下限,或错误的固定日期当成 deprecation_date,从而误报即将下线。优先排查所用的 LiteLLM 版本或远端 cost map 中对应行的 deprecation_date 取值是否与 Google 官方模型卡一致。

适用环境:Issue 已确认的环境为 LiteLLM v1.106.9,使用 vertex_ai/claude-* 模型、开启 general_settings.alerting(示例为 Slack)及 model_deprecation_warnings 告警类型;vertex_location 示例为 eu。Issue 未提及操作系统、Python、CUDA、显卡或 PyTorch 版本,此处不补写。

最快修复方案:Issue 讨论链只说明修复已进入 rolling registry PR(#53569、#54742),并会在 PR 合并后自动关闭该 Issue;未提供用户侧可验证的一步修复命令。暂无确认的一步修复方案,可优先尝试升级到包含对应 registry 修复的 LiteLLM 版本。

注意事项:该修复依赖 LiteLLM 的 registry / cost map 更新,Issue 正文显示远端 cost map 在 main 的 519d8442 上仍是旧值,因此仅在本地改配置不一定能消除告警;未找到 Vertex 模型卡的 vertex_ai/claude-mythos-5-2 不在修复讨论范围内。告警日期是否恢复正确,仍需以 Google 官方模型卡和弃用页为准。

问题场景

用户在 LiteLLM Proxy 中把 model_name 映射到 vertex_ai/claude-sonnet-5 等 Vertex AI Claude 模型,并开启 model_deprecation_warnings 的 Slack 告警。每天检查弃用提醒时,收到 claude-sonnet-5 及带区域前缀的别名(如 eu/、eu-us/)将在 2026-12-24 下线、剩余 29 天的预警。实际上 Google 模型卡写的是 “Not sooner than December 24, 2026” 这类下限表述,模型仍为 GA,并不代表当天会停用。同 Issue 还指出 vertex_ai/claude-sonnet-4-5、vertex_ai/claude-opus-4-5、vertex_ai/claude-haiku-4-5 等行存了错误的固定停用日期。

Issue 提到 #41964 已从 anthropic 行移除这类 “not sooner than” 下限,但当时无法核对 Google 排期,vertex_ai/ 行被保留下来,于是问题仍在 Proxy 告警中出现。

报错原文

[Bug]: vertex_ai Claude rows store "not sooner than" floors and wrong shutdown dates as deprecation_date

Deprecating within 30 days:
• claude-sonnet-5 (provider: vertex_ai-anthropic_models, deprecates 2026-12-24, in 29d)
• eu-us/claude-sonnet-5 (provider: vertex_ai-anthropic_models, deprecates 2026-12-24, in 29d)
• eu/claude-sonnet-5 (provider: vertex_ai-anthropic_models, deprecates 2026-12-24, in 29d)

原因分析

最可能的原因是 LiteLLM 模型注册表(registry / 远端 cost map)中 vertex_ai/claude-* 行的 deprecation_date 字段取值不当。一类行把 Google 模型卡里的 “Not sooner than” / “No sooner than” 下限日期当成了确定弃用日期,例如 claude-sonnet-5 存为 2026-12-24、claude-opus-5 存为 2027-01-24 等,但这些模型在 Google 侧仍是 GA,不应带确定 deprecation_date。

另一类行存了错误固定日期,例如 claude-sonnet-4-5 存为 2026-09-29(实际是 Google 当天标记弃用的日子),而模型卡和弃用页给出的停用日期是 2026-11-30;claude-opus-4-5、claude-haiku-4-5 也存在类似偏差。告警逻辑读取这些日期后,就会对尚未真正到期的模型发出 30 天内弃用提醒。

环境排查

  • 确认 LiteLLM 版本:Issue 中为 v1.106.9,并提到远端 cost map 在 main 的 519d8442 上仍是同样的旧值。
  • 确认是否使用了滚动 registry / 远端 cost map;如果远端值未更新,本地改动可能被覆盖。
  • 检查 model_list 中 vertex_ai/claude-* 的 model 字段,以及 model_name 是否带 eu/、eu-us/ 等前缀,因为 Issue 中告警会同时列出别名。
  • 确认 general_settings.alerting 与 alert_types 已启用 model_deprecation_warnings,以便复现或验证告警。
  • 核对对应 Google Vertex AI Claude 模型卡与 Google partner models 弃用页的日期表述,区分 “Not sooner than” 下限和固定 retirement date。

解决步骤

  1. 先确认告警中的模型是否为 vertex_ai/claude-*,并记录告警给出的 deprecates 日期和剩余天数,作为排查基准。
  2. 对照 Issue 列出的映射,检查当前 registry / cost map 中对应行:vertex_ai/claude-sonnet-5、claude-opus-5、claude-opus-4-6、claude-opus-4-7、claude-opus-4-8、claude-fable-5、claude-fable-5-1、claude-fable-5-2 是否仍带 “not sooner than” 下限日期;以及 claude-sonnet-4-5、claude-opus-4-5、claude-haiku-4-5 是否存了错误固定日期。
  3. 按 Issue 的期望处理:下限行不应携带 deprecation_date;三个有固定停用日期的行应改为 Google 模型卡/弃用页给出的日期(分别为 2026-11-30、2027-01-22、2027-02-28)。
  4. 如果使用 LiteLLM 的远端 cost map / rolling registry,优先升级或切换到已包含 PR #53569 / #54742 修复的版本,而不是只改本地覆盖值。
  5. 重启 LiteLLM Proxy,使 registry 与告警调度重新加载。
  6. 如果升级后仍收到同一告警,检查是否仍在使用旧版远端 cost map,或本地存在覆盖注册表的配置。

验证方法

重启 Proxy 后等待下一次 model_deprecation_warnings 检查,确认 Slack 不再把 vertex_ai/claude-sonnet-5 及 eu/、eu-us/ 别名列为 30 天内弃用;对于 claude-sonnet-4-5 等固定日期行,告警中的 deprecates 日期应与 Google 模型卡/弃用页一致。也可直接检查加载后的 registry / cost map 中对应行的 deprecation_date,下限行应为空,固定日期行应为正确停用日期。

参考来源

BerriAI/litellm #54436

GamsGo AI

AI 工具推荐

想把多个 AI 模型放在一个入口?

GamsGo AI 集成 ChatGPT、DeepSeek、Gemini、Claude、Midjourney、Veo 等常用模型,适合写作、绘图、视频和日常 AI 工作流。

了解 GamsGo AI

推广链接:通过此链接购买,我可能获得佣金,不影响你的价格。

这个方案解决了吗?

celebrityanime
celebrityanime
文章: 38419

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注