clauddy 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/usage.js +7 -4
package/package.json
CHANGED
package/usage.js
CHANGED
|
@@ -19,10 +19,13 @@ function labelFor(model) {
|
|
|
19
19
|
: m.includes('mythos')
|
|
20
20
|
? 'Mythos'
|
|
21
21
|
: null
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
if (!fam) return model
|
|
23
|
+
// version after the family: opus-5, opus-4-8, haiku-4-5-<date>
|
|
24
|
+
let ver = m.match(/(?:opus|sonnet|haiku|fable|mythos)-(\d{1,2})(?:-(\d{1,2}))?(?!\d)/)
|
|
25
|
+
// legacy ids put the version before the family: claude-3-5-sonnet
|
|
26
|
+
if (!ver) ver = m.match(/-(\d)-(\d+)/)
|
|
27
|
+
if (ver) return ver[2] ? `${fam} ${ver[1]}.${ver[2]}` : `${fam} ${ver[1]}`
|
|
28
|
+
return fam
|
|
26
29
|
}
|
|
27
30
|
|
|
28
31
|
function tokensOf(entry) {
|