chore(models): deactivate Claude 3.5 - #912
Conversation
Set the deactivatedAt field to 2025-10-22 for the Claude 3.5 Sonnet (2024-10-22) model in anthropicModels to reflect its planned deactivation date. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.com>
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
WalkthroughUpdated the Anthropic model registry to set a deactivation date for "Claude 3.5 Sonnet (2024-10-22)": deactivatedAt is now new Date("2025-10-22T00:00:00Z"). No other fields changed. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/models/src/models/anthropic.ts (2)
102-112: Optional: add a deprecation window to surface warnings before cutoff.If your policy mirrors
claude-2.1, consider setting a deprecation date ~30 days earlier so clients get heads‑up messaging.Proposed diff:
name: "Claude 3.5 Sonnet (2024-10-22)", family: "anthropic", - deprecatedAt: undefined, + // Start warning users one month prior + deprecatedAt: new Date("2025-09-22T00:00:00Z"), deactivatedAt: new Date("2025-10-22T00:00:00Z"),I can also add a small unit test to assert current-time gating before/after the boundary.
102-112: Deactivation enforcement verified — uses strict>(effective after timestamp); UTC ISO timestamps used)
- Enforcement locations: apps/gateway/src/models/models.ts (filter:
currentDate > model.deactivatedAt), apps/gateway/src/chat/chat.ts (throws whennew Date() > modelInfo.deactivatedAt).- Sync/IO: apps/worker/src/services/sync-models.ts writes
deactivatedAtto the DB; API serializes withmodel.deactivatedAt?.toISOString()(apps/gateway/src/models/models.ts). DB schema containsdeactivatedAt(packages/db/src/schema.ts). Model definition usesnew Date("2025-10-22T00:00:00Z")(packages/models/src/models/anthropic.ts). Tests/e2e use the complementary<=check.- Semantics: comparisons are JS Date epoch-ms comparisons (timezone-agnostic / UTC-aware because timestamps use
Z). Current code treats a model as deactivated only when now > deactivatedAt (if now === deactivatedAt the model remains available).- Action: change
>to>=in the gateway/chat checks if you require the model to be unavailable at the exact deactivation timestamp; ensure the sync worker runs and any runtime caches are invalidated so deactivation takes effect without a redeploy.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/models/src/models/anthropic.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
{apps/api,apps/gateway,apps/ui,apps/docs,packages}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Always use top-level import; never use require() or dynamic imports (e.g., import(), next/dynamic)
Files:
packages/models/src/models/anthropic.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Never useanyoras anyin this TypeScript project unless absolutely necessary
Always use top-levelimport; never userequireor dynamic imports
Files:
packages/models/src/models/anthropic.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: lint / run
- GitHub Check: generate / run
- GitHub Check: test / run
- GitHub Check: build / run
- GitHub Check: autofix
- GitHub Check: e2e-shards (2)
- GitHub Check: e2e-shards (4)
- GitHub Check: e2e-shards (1)
- GitHub Check: e2e-shards (5)
- GitHub Check: e2e-shards (3)
Summary
Changes
Model Configuration
anthropicModelsarray inanthropic.tsdeactivatedAtfromundefinedtonew Date("2025-10-22T00:00:00Z")for Claude 3.5 Sonnet modelTest plan
deactivatedAtfield is correctly set to the specified date🌿 Generated by Terry
ℹ️ Tag @terragon-labs to ask questions and address PR feedback
📎 Task: https://www.terragonlabs.com/task/c3b84bfd-ab4f-4d5d-afa1-c40c835a3612
Summary by CodeRabbit