Skip to content

Commit 1c19622

Browse files
james-deeeGravyPouchRPate97haseabgithub-actions[bot]
authored
Merge upsteam/v0.5.4 with new Claude versions (#7)
* patch: add gpt-4.5 models * added claude-3-7-sonnet model types * fix typo * added claude-sonnet-3.5 latest models * run pnpm update docs * Version Packages * update changelog --------- Co-authored-by: GravyPouch <29843812+GravyPouch@users.noreply.github.com> Co-authored-by: RPate97 <ryantpate97@gmail.com> Co-authored-by: Haseab <haseab.amin@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 1de3e34 commit 1c19622

File tree

5 files changed

+72
-33
lines changed

5 files changed

+72
-33
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
# @libretto/token.js
22

3+
## 0.3.0
4+
5+
Merge from token.js/v0.5.4:
6+
7+
https://github.com/token-js/token.js/releases/tag/v0.5.4
8+
9+
## 0.2.0
10+
11+
Handle Anthropic system messages correctly.
12+
313
## 0.1.0
414

515
Initial release of Libretto AI's library for users of TokenJS.
616

7-
NOTE: Currently, only OpenAI and Anthropic will have events sent to Libretto.
17+
NOTE: Currently, only OpenAI and Anthropic will have events sent to Libretto.

docs/providers/anthropic.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
## Usage
66

77
{% code title=".env" %}
8+
89
```bash
910
ANTHROPIC_API_KEY=
1011
```
12+
1113
{% endcode %}
1214

1315
```typescript
@@ -40,6 +42,9 @@ main()
4042

4143
| Model | Chat Completion | Streaming | JSON Output | Image Input | Function Calling | N > 1 |
4244
| -------------------------- | --------------- | --------- | ----------- | ----------- | ---------------- | ----- |
45+
| claude-3-7-sonnet-latest |||||||
46+
| claude-3-7-sonnet-20250219 |||||||
47+
| claude-3-5-sonnet-latest |||||||
4348
| claude-3-5-sonnet-20240620 |||||||
4449
| claude-3-5-haiku-20241022 |||||||
4550
| claude-3-opus-20240229 |||||||
@@ -58,4 +63,4 @@ main()
5863

5964
## Additional Resources
6065

61-
* [Anthropic Documentation](https://docs.anthropic.com)
66+
- [Anthropic Documentation](https://docs.anthropic.com)

docs/providers/openai.md

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -38,36 +38,38 @@ main()
3838
<!-- compatibility -->
3939
## Supported Models
4040

41-
| Model | Chat Completion | Streaming | JSON Output | Image Input | Function Calling | N > 1 |
42-
| ---------------------- | --------------- | --------- | ----------- | ----------- | ---------------- | ----- |
43-
| gpt-4o |||||||
44-
| gpt-4o-mini |||||||
45-
| gpt-4o-2024-05-13 |||||||
46-
| gpt-4o-2024-08-06 |||||||
47-
| gpt-4-turbo |||||||
48-
| gpt-4-turbo-2024-04-09 |||||||
49-
| gpt-4-0125-preview |||||||
50-
| gpt-4-turbo-preview |||||||
51-
| gpt-4-1106-preview |||||||
52-
| gpt-4-vision-preview |||||||
53-
| gpt-4 |||||||
54-
| gpt-4-0314 |||||||
55-
| gpt-4-0613 |||||||
56-
| gpt-4-32k |||||||
57-
| gpt-4-32k-0314 |||||||
58-
| gpt-4-32k-0613 |||||||
59-
| gpt-3.5-turbo |||||||
60-
| gpt-3.5-turbo-16k |||||||
61-
| gpt-3.5-turbo-0301 |||||||
62-
| gpt-3.5-turbo-0613 |||||||
63-
| gpt-3.5-turbo-1106 |||||||
64-
| gpt-3.5-turbo-0125 |||||||
65-
| gpt-3.5-turbo-16k-0613 |||||||
66-
| o3-mini |||||||
67-
| o1-mini |||||||
68-
| o1-mini-2024-09-12 |||||||
69-
| o1-preview |||||||
70-
| o1-preview-2024-09-12 |||||||
41+
| Model | Chat Completion | Streaming | JSON Output | Image Input | Function Calling | N > 1 |
42+
| -------------------------- | --------------- | --------- | ----------- | ----------- | ---------------- | ----- |
43+
| gpt-4.5-preview |||||||
44+
| gpt-4.5-preview-2025-02-27 |||||||
45+
| gpt-4o |||||||
46+
| gpt-4o-mini |||||||
47+
| gpt-4o-2024-05-13 |||||||
48+
| gpt-4o-2024-08-06 |||||||
49+
| gpt-4-turbo |||||||
50+
| gpt-4-turbo-2024-04-09 |||||||
51+
| gpt-4-0125-preview |||||||
52+
| gpt-4-turbo-preview |||||||
53+
| gpt-4-1106-preview |||||||
54+
| gpt-4-vision-preview |||||||
55+
| gpt-4 |||||||
56+
| gpt-4-0314 |||||||
57+
| gpt-4-0613 |||||||
58+
| gpt-4-32k |||||||
59+
| gpt-4-32k-0314 |||||||
60+
| gpt-4-32k-0613 |||||||
61+
| gpt-3.5-turbo |||||||
62+
| gpt-3.5-turbo-16k |||||||
63+
| gpt-3.5-turbo-0301 |||||||
64+
| gpt-3.5-turbo-0613 |||||||
65+
| gpt-3.5-turbo-1106 |||||||
66+
| gpt-3.5-turbo-0125 |||||||
67+
| gpt-3.5-turbo-16k-0613 |||||||
68+
| o3-mini |||||||
69+
| o1-mini |||||||
70+
| o1-mini-2024-09-12 |||||||
71+
| o1-preview |||||||
72+
| o1-preview-2024-09-12 |||||||
7173

7274
### Legend
7375
| Symbol | Description |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@libretto/token.js",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/libretto-ai/token.js"

src/models.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ export const TableDisplayNames = {
1111
export const models = {
1212
openai: {
1313
models: [
14+
'gpt-4.5-preview',
15+
'gpt-4.5-preview-2025-02-27',
1416
'gpt-4o',
1517
'gpt-4o-mini',
1618
'gpt-4o-2024-05-13',
@@ -42,6 +44,8 @@ export const models = {
4244
] as const,
4345
supportsCompletion: true,
4446
supportsStreaming: [
47+
'gpt-4.5-preview',
48+
'gpt-4.5-preview-2025-02-27',
4549
'gpt-4o',
4650
'gpt-4o-mini',
4751
'gpt-4o-2024-05-13',
@@ -68,6 +72,8 @@ export const models = {
6872
'o3-mini',
6973
] as const,
7074
supportsJSON: [
75+
'gpt-4.5-preview',
76+
'gpt-4.5-preview-2025-02-27',
7177
'gpt-4o',
7278
'gpt-4o-mini',
7379
'gpt-4o-2024-05-13',
@@ -84,6 +90,8 @@ export const models = {
8490
'o3-mini',
8591
] as const,
8692
supportsImages: [
93+
'gpt-4.5-preview',
94+
'gpt-4.5-preview-2025-02-27',
8795
'gpt-4o',
8896
'gpt-4o-mini',
8997
'gpt-4o-2024-05-13',
@@ -96,6 +104,8 @@ export const models = {
96104
'gpt-4-vision-preview',
97105
] as const,
98106
supportsToolCalls: [
107+
'gpt-4.5-preview',
108+
'gpt-4.5-preview-2025-02-27',
99109
'gpt-4o',
100110
'gpt-4o-mini',
101111
'gpt-4o-2024-05-13',
@@ -128,6 +138,9 @@ export const models = {
128138
},
129139
anthropic: {
130140
models: [
141+
'claude-3-7-sonnet-latest',
142+
'claude-3-7-sonnet-20250219',
143+
'claude-3-5-sonnet-latest',
131144
'claude-3-5-sonnet-20240620',
132145
'claude-3-5-haiku-20241022',
133146
'claude-3-opus-20240229',
@@ -139,6 +152,9 @@ export const models = {
139152
] as const,
140153
supportsCompletion: true,
141154
supportsStreaming: [
155+
'claude-3-7-sonnet-latest',
156+
'claude-3-7-sonnet-20250219',
157+
'claude-3-5-sonnet-latest',
142158
'claude-3-5-sonnet-20240620',
143159
'claude-3-5-haiku-20241022',
144160
'claude-3-opus-20240229',
@@ -150,12 +166,18 @@ export const models = {
150166
] as const,
151167
supportsJSON: [] as const,
152168
supportsImages: [
169+
'claude-3-7-sonnet-latest',
170+
'claude-3-7-sonnet-20250219',
171+
'claude-3-5-sonnet-latest',
153172
'claude-3-5-sonnet-20240620',
154173
'claude-3-opus-20240229',
155174
'claude-3-sonnet-20240229',
156175
'claude-3-haiku-20240307',
157176
] as const,
158177
supportsToolCalls: [
178+
'claude-3-7-sonnet-latest',
179+
'claude-3-7-sonnet-20250219',
180+
'claude-3-5-sonnet-latest',
159181
'claude-3-5-sonnet-20240620',
160182
'claude-3-5-haiku-20241022',
161183
'claude-3-opus-20240229',

0 commit comments

Comments
 (0)