feat: update Anthropic SDK to v1.20.0 and reorganize model definitions**

## CHANGES

- Bump `anthropic-sdk-go` dependency from v1.19.0 to v1.20.0
- Add deprecation notice for pre-February 2026 legacy models
- Add new Claude Sonnet 4.0 and Opus 4.0 model aliases
- Extend 1M context beta support to all Sonnet 4 variants
- Reorganize model list to separate deprecated from current models
- Add `neturl` to VS Code spell-check dictionary
This commit is contained in:
Kayvan Sylvan
2026-01-31 12:58:44 -08:00
parent bfafc291c9
commit 0285e52c7b
4 changed files with 21 additions and 8 deletions

View File

@@ -134,6 +134,7 @@
"mvdan",
"mychat",
"mygroup",
"neturl",
"nicksnyder",
"nixpkgs",
"nometa",

2
go.mod
View File

@@ -3,7 +3,7 @@ module github.com/danielmiessler/fabric
go 1.25.1
require (
github.com/anthropics/anthropic-sdk-go v1.19.0
github.com/anthropics/anthropic-sdk-go v1.20.0
github.com/atotto/clipboard v0.1.4
github.com/aws/aws-sdk-go-v2 v1.41.0
github.com/aws/aws-sdk-go-v2/config v1.32.6

2
go.sum
View File

@@ -40,6 +40,8 @@ github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFI
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/anthropics/anthropic-sdk-go v1.19.0 h1:mO6E+ffSzLRvR/YUH9KJC0uGw0uV8GjISIuzem//3KE=
github.com/anthropics/anthropic-sdk-go v1.19.0/go.mod h1:WTz31rIUHUHqai2UslPpw5CwXrQP3geYBioRV4WOLvE=
github.com/anthropics/anthropic-sdk-go v1.20.0 h1:KE6gQiAT1aBHMh3Dmp1WgqnyZZLJNo2oX3ka004oDLE=
github.com/anthropics/anthropic-sdk-go v1.20.0/go.mod h1:WTz31rIUHUHqai2UslPpw5CwXrQP3geYBioRV4WOLvE=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40 h1:q4dksr6ICHXqG5hm0ZW5IHyeEJXoIJSOZeBLmWPNeIQ=
github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40/go.mod h1:Q7yQnSMnLvcXlZ8RV+jwz/6y1rQTqbX6C82SndT52Zs=

View File

@@ -36,22 +36,32 @@ func NewClient() (ret *Client) {
ret.maxTokens = 4096
ret.defaultRequiredUserMessage = "Hi"
ret.models = []string{
// The following models will be deprecated on February 19, 2026
string(anthropic.ModelClaude3_7SonnetLatest), string(anthropic.ModelClaude3_7Sonnet20250219),
string(anthropic.ModelClaude3_5HaikuLatest), string(anthropic.ModelClaude3_5Haiku20241022),
string(anthropic.ModelClaude3OpusLatest), string(anthropic.ModelClaude_3_Opus_20240229),
string(anthropic.ModelClaude_3_Haiku_20240307),
string(anthropic.ModelClaudeOpus4_20250514), string(anthropic.ModelClaudeSonnet4_20250514),
string(anthropic.ModelClaudeOpus4_1_20250805),
string(anthropic.ModelClaudeSonnet4_5),
string(anthropic.ModelClaudeSonnet4_5_20250929),
// The following are the current supported models
string(anthropic.ModelClaudeOpus4_5_20251101),
string(anthropic.ModelClaudeOpus4_5),
string(anthropic.ModelClaudeHaiku4_5),
string(anthropic.ModelClaudeHaiku4_5_20251001),
string(anthropic.ModelClaudeSonnet4_20250514),
string(anthropic.ModelClaudeSonnet4_0),
string(anthropic.ModelClaude4Sonnet20250514),
string(anthropic.ModelClaudeSonnet4_5),
string(anthropic.ModelClaudeSonnet4_5_20250929),
string(anthropic.ModelClaudeOpus4_0),
string(anthropic.ModelClaudeOpus4_20250514),
string(anthropic.ModelClaude4Opus20250514),
string(anthropic.ModelClaudeOpus4_1_20250805),
string(anthropic.ModelClaude_3_Haiku_20240307),
}
ret.modelBetas = map[string][]string{
string(anthropic.ModelClaudeSonnet4_20250514): {"context-1m-2025-08-07"},
// Claude Sonnet 4 variants (1M context support)
string(anthropic.ModelClaudeSonnet4_20250514): {"context-1m-2025-08-07"},
string(anthropic.ModelClaudeSonnet4_0): {"context-1m-2025-08-07"},
string(anthropic.ModelClaude4Sonnet20250514): {"context-1m-2025-08-07"},
// Claude Sonnet 4.5 variants (1M context support)
string(anthropic.ModelClaudeSonnet4_5): {"context-1m-2025-08-07"},
string(anthropic.ModelClaudeSonnet4_5_20250929): {"context-1m-2025-08-07"},
}