Commit 0822e4f
committed
fix(terminal): support claude-sonnet-4-5 model name formatting
Updated the model name regex pattern to properly handle version numbers
with hyphens (e.g., claude-sonnet-4-5-20250929). Previously, only single
digit versions were supported (e.g., claude-sonnet-4-20250514).
Changes:
- Modified regex from /claude-(\w+)-(\d+)-\d+/ to /claude-(\w+)-([\d-]+)-(\d{8})/
- Added [\d-]+ pattern to match multi-part version numbers like "4-5"
- Updated JSDoc examples to include claude-sonnet-4-5-20250929 format
- Added test cases for Claude 4.5 and mixed version formats
Fixes the issue where claude-sonnet-4-5-20250929 was being displayed as
"sonnet-4" instead of "sonnet-4-5" in usage reports.1 parent 18a88a9 commit 0822e4f
1 file changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
322 | | - | |
| 321 | + | |
| 322 | + | |
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
| 329 | + | |
329 | 330 | | |
330 | 331 | | |
331 | 332 | | |
| |||
970 | 971 | | |
971 | 972 | | |
972 | 973 | | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
973 | 983 | | |
974 | 984 | | |
0 commit comments