@ai-sdk/anthropic 4.0.32 → 4.0.34

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.
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  InvalidArgumentError,
3
3
  NoSuchModelError,
4
+ type Experimental_BatchLanguageModelV4 as BatchLanguageModelV4,
4
5
  type FilesV4,
5
- type LanguageModelV4,
6
6
  type ProviderV4,
7
7
  type SkillsV4,
8
8
  } from '@ai-sdk/provider';
@@ -16,7 +16,7 @@ import {
16
16
  type FetchFunction,
17
17
  } from '@ai-sdk/provider-utils';
18
18
  import { AnthropicFiles } from './anthropic-files';
19
- import { AnthropicLanguageModel } from './anthropic-language-model';
19
+ import { AnthropicMessagesBatchLanguageModel } from './anthropic-messages-batch';
20
20
  import type { AnthropicModelId } from './anthropic-language-model-options';
21
21
  import { anthropicTools } from './anthropic-tools';
22
22
  import { AnthropicSkills } from './skills/anthropic-skills';
@@ -39,16 +39,16 @@ export interface AnthropicProvider extends ProviderV4 {
39
39
  /**
40
40
  * Creates a model for text generation.
41
41
  */
42
- (modelId: AnthropicModelId): LanguageModelV4;
42
+ (modelId: AnthropicModelId): BatchLanguageModelV4;
43
43
 
44
44
  /**
45
45
  * Creates a model for text generation.
46
46
  */
47
- languageModel(modelId: AnthropicModelId): LanguageModelV4;
47
+ languageModel(modelId: AnthropicModelId): BatchLanguageModelV4;
48
48
 
49
- chat(modelId: AnthropicModelId): LanguageModelV4;
49
+ chat(modelId: AnthropicModelId): BatchLanguageModelV4;
50
50
 
51
- messages(modelId: AnthropicModelId): LanguageModelV4;
51
+ messages(modelId: AnthropicModelId): BatchLanguageModelV4;
52
52
 
53
53
  /**
54
54
  * @deprecated Use `embeddingModel` instead.
@@ -156,7 +156,7 @@ export function createAnthropic(
156
156
  };
157
157
 
158
158
  const createChatModel = (modelId: AnthropicModelId) =>
159
- new AnthropicLanguageModel(modelId, {
159
+ new AnthropicMessagesBatchLanguageModel(modelId, {
160
160
  provider: providerName,
161
161
  baseURL,
162
162
  headers: getHeaders,