Skip to content

Commit 59b1031

Browse files
authored
📦 NEW: Claude 3.5 haiku (#112)
1 parent 7d3e4ef commit 59b1031

File tree

6 files changed

+33
-6
lines changed

6 files changed

+33
-6
lines changed

‎packages/baseai/src/data/models.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,16 @@ export const modelsByProvider: ModelsByProviderInclCosts = {
414414
toolChoice: true,
415415
parallelToolCalls: true
416416
}
417+
},
418+
{
419+
id: 'claude-3-5-haiku-20241022',
420+
provider: ANTHROPIC,
421+
promptCost: 1,
422+
completionCost: 5,
423+
toolSupport: {
424+
toolChoice: true,
425+
parallelToolCalls: true
426+
}
417427
}
418428
],
419429
[GROQ]: [

‎packages/baseai/src/dev/data/models.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,16 @@ export const modelsByProvider: ModelsByProviderInclCosts = {
334334
toolChoice: true,
335335
parallelToolCalls: true
336336
}
337+
},
338+
{
339+
id: 'claude-3-5-haiku-20241022',
340+
provider: ANTHROPIC,
341+
promptCost: 1,
342+
completionCost: 5,
343+
toolSupport: {
344+
toolChoice: true,
345+
parallelToolCalls: true
346+
}
337347
}
338348
],
339349
[GROQ]: [

‎packages/baseai/types/model.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ export type AnthropicModels =
3636
| 'anthropic:claude-3-5-sonnet-20240620'
3737
| 'anthropic:claude-3-opus-20240229'
3838
| 'anthropic:claude-3-sonnet-20240229'
39-
| 'anthropic:claude-3-haiku-20240307';
39+
| 'anthropic:claude-3-haiku-20240307'
40+
| 'anthropic:claude-3-5-haiku-20241022';
4041

4142
export type GroqModels =
4243
| 'groq:llama-3.1-70b-versatile'
@@ -74,4 +75,6 @@ export type MistralAIModels =
7475
| 'mistral:open-mistral-nemo'
7576
| 'mistral:codestral-latest';
7677

78+
export type XAIModels = 'xai:grok-beta';
79+
7780
export type OllamaModels = `ollama:${string}`;

‎packages/core/src/data/models.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@ export const modelsByProvider: ModelsByProviderInclCosts = {
235235
promptCost: 0.25,
236236
completionCost: 1.25,
237237
},
238+
{
239+
id: 'claude-3-5-haiku-20241022',
240+
provider: ANTHROPIC,
241+
promptCost: 1,
242+
completionCost: 5,
243+
},
238244
],
239245
[GROQ]: [
240246
{

‎packages/core/src/pipes/pipes.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,7 @@ export class Pipe {
142142
}
143143

144144
private isStreamRequested(options: RunOptions | RunOptionsStream): boolean {
145-
return (
146-
('stream' in options && options.stream === true) ||
147-
this.pipe.meta.stream
148-
);
145+
return 'stream' in options && options.stream === true;
149146
}
150147

151148
private warnIfToolsWithStream(requestedStream: boolean): void {

‎packages/core/types/model.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ export type AnthropicModels =
3636
| 'anthropic:claude-3-5-sonnet-20240620'
3737
| 'anthropic:claude-3-opus-20240229'
3838
| 'anthropic:claude-3-sonnet-20240229'
39-
| 'anthropic:claude-3-haiku-20240307';
39+
| 'anthropic:claude-3-haiku-20240307'
40+
| 'anthropic:claude-3-5-haiku-20241022';
4041

4142
export type GroqModels =
4243
| 'groq:llama-3.1-70b-versatile'

0 commit comments

Comments
 (0)