Skip to content

Commit 57924b2

Browse files
ericdalloeca-agent
andcommitted
Add Claude Sonnet 5 support
Uses the anthropic-v2 variant set (adaptive summarized thinking) like the other gen-5 models, matched via the sonnet-5 regex in variantsByModel. 🤖 Generated with [ECA](https://eca.dev) (nubank-anthropic/opus-4.8 - max) Co-Authored-By: eca-agent <git@eca.dev>
1 parent 2cd74a4 commit 57924b2

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Add built-in variants for `glm-5.2` (case-insensitive): `none`, `medium`, `high`.
66
- New `/export` and `/import` commands to transfer a chat between machines as a structured, resumable file preserving model, variant, usage and chat-id. #28
7+
- Add Claude Sonnet 5 support.
78

89
## 0.143.1
910

docs/config/variants.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ ECA ships with built-in variants for some known models via the `variantsByModel`
2727
| `high` | `{"output_config": {"effort": "high"}, "thinking": {"type": "adaptive"}}` |
2828
| `max` | `{"output_config": {"effort": "max"}, "thinking": {"type": "adaptive"}}` |
2929

30-
=== "Anthropic (opus 4.7+, fable/mythos 5)"
30+
=== "Anthropic (opus 4.7+, sonnet/fable/mythos 5)"
3131

32-
Applies to models matching `opus-4-7`, `opus-4-8`, `fable-5`, `mythos-5` (any separator: `-`, `.`, `_`).
32+
Applies to models matching `opus-4-7`, `opus-4-8`, `sonnet-5`, `fable-5`, `mythos-5` (any separator: `-`, `.`, `_`).
3333

3434
| Variant | Payload |
3535
| ---------- | ------- |

src/eca/config.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
:key "${env:ANTHROPIC_API_KEY}"
103103
:requiresAuth? true
104104
:models {"claude-sonnet-4-6" {}
105+
"claude-sonnet-5" {}
105106
"claude-opus-4-6" {}
106107
"claude-opus-4-7" {}
107108
"claude-opus-4-8" {}
@@ -206,7 +207,7 @@
206207
:shellCommand {:summaryMaxLength 35}
207208
:outputTruncation {:lines 2000 :sizeKb 50}}
208209
:variantsByModel {".*sonnet[-._]4[-._]6|opus[-._]4[-._][56]" {:variants anthropic-variants}
209-
".*opus[-._]4[-._][78]|.*fable[-._]5|.*mythos[-._]5" {:variants anthropic-v2-variants}
210+
".*opus[-._]4[-._][78]|.*sonnet[-._]5|.*fable[-._]5|.*mythos[-._]5" {:variants anthropic-v2-variants}
210211
".*gpt[-._]5(?:[-._](?:2|4|5)(?!\\d)|[-._]3[-._]codex)" {:variants openai-variants
211212
:excludeProviders ["github-copilot"]}
212213
".*deepseek[-._]v4[-._]pro" {:variants deepseek-variants

src/eca/models.clj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
"anthropic/claude-opus-4-7"
150150
"anthropic/claude-opus-4.8"
151151
"anthropic/claude-opus-4-8"
152+
"anthropic/claude-sonnet-5"
152153
"anthropic/claude-fable-5"
153154
"anthropic/claude-mythos-5"
154155
"anthropic/claude-haiku-4-5-20251001"})

0 commit comments

Comments
 (0)