feat(migrations): add migration for Claude 3.7 to 4.5 Sonnet

Migrates existing AgentNode blocks using claude-3-7-sonnet-20250219 to
claude-sonnet-4-5-20250929 before the model is retired on Feb 19, 2026.
This commit is contained in:
Bently
2026-01-26 11:33:04 +00:00
parent 168e4ed0ec
commit ee71866ed6

View File

@@ -0,0 +1,11 @@
-- Migrate Claude 3.7 Sonnet to Claude 4.5 Sonnet
-- This updates all AgentNode blocks that use the deprecated Claude 3.7 Sonnet model
-- Anthropic is retiring claude-3-7-sonnet-20250219 on February 19, 2026
UPDATE "AgentNode"
SET "constantInput" = JSONB_SET(
"constantInput"::jsonb,
'{model}',
'"claude-sonnet-4-5-20250929"'::jsonb
)
WHERE "constantInput"::jsonb->>'model' = 'claude-3-7-sonnet-20250219';