@core-ai/anthropic 0.6.0 → 0.7.0
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/dist/index.d.ts +6 -26
- package/dist/index.js +2 -4
- package/package.json +4 -5
package/dist/index.d.ts
CHANGED
|
@@ -20,20 +20,10 @@ type AnthropicReasoningMetadata = {
|
|
|
20
20
|
|
|
21
21
|
declare const anthropicGenerateProviderOptionsSchema: z.ZodObject<{
|
|
22
22
|
topK: z.ZodOptional<z.ZodNumber>;
|
|
23
|
-
stopSequences: z.ZodOptional<z.ZodArray<z.ZodString
|
|
24
|
-
betas: z.ZodOptional<z.ZodArray<z.ZodString
|
|
23
|
+
stopSequences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
|
+
betas: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
25
|
outputConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
26
|
-
},
|
|
27
|
-
topK?: number | undefined;
|
|
28
|
-
stopSequences?: string[] | undefined;
|
|
29
|
-
betas?: string[] | undefined;
|
|
30
|
-
outputConfig?: Record<string, unknown> | undefined;
|
|
31
|
-
}, {
|
|
32
|
-
topK?: number | undefined;
|
|
33
|
-
stopSequences?: string[] | undefined;
|
|
34
|
-
betas?: string[] | undefined;
|
|
35
|
-
outputConfig?: Record<string, unknown> | undefined;
|
|
36
|
-
}>;
|
|
26
|
+
}, z.core.$strict>;
|
|
37
27
|
type AnthropicGenerateProviderOptions = z.infer<typeof anthropicGenerateProviderOptionsSchema>;
|
|
38
28
|
declare module '@core-ai/core-ai' {
|
|
39
29
|
interface GenerateProviderOptions {
|
|
@@ -42,20 +32,10 @@ declare module '@core-ai/core-ai' {
|
|
|
42
32
|
}
|
|
43
33
|
declare const anthropicProviderOptionsSchema: z.ZodObject<{
|
|
44
34
|
topK: z.ZodOptional<z.ZodNumber>;
|
|
45
|
-
stopSequences: z.ZodOptional<z.ZodArray<z.ZodString
|
|
46
|
-
betas: z.ZodOptional<z.ZodArray<z.ZodString
|
|
35
|
+
stopSequences: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36
|
+
betas: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
47
37
|
outputConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
48
|
-
},
|
|
49
|
-
topK?: number | undefined;
|
|
50
|
-
stopSequences?: string[] | undefined;
|
|
51
|
-
betas?: string[] | undefined;
|
|
52
|
-
outputConfig?: Record<string, unknown> | undefined;
|
|
53
|
-
}, {
|
|
54
|
-
topK?: number | undefined;
|
|
55
|
-
stopSequences?: string[] | undefined;
|
|
56
|
-
betas?: string[] | undefined;
|
|
57
|
-
outputConfig?: Record<string, unknown> | undefined;
|
|
58
|
-
}>;
|
|
38
|
+
}, z.core.$strict>;
|
|
59
39
|
type AnthropicProviderOptions = AnthropicGenerateProviderOptions;
|
|
60
40
|
|
|
61
41
|
export { type AnthropicGenerateProviderOptions, type AnthropicProviderOptions as AnthropicModelProviderOptions, type AnthropicProvider, type AnthropicProviderOptions$1 as AnthropicProviderOptions, type AnthropicReasoningMetadata, anthropicGenerateProviderOptionsSchema, anthropicProviderOptionsSchema, createAnthropic };
|
package/dist/index.js
CHANGED
|
@@ -12,8 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
// src/chat-adapter.ts
|
|
14
14
|
import { APIError } from "@anthropic-ai/sdk";
|
|
15
|
-
import {
|
|
16
|
-
import { ProviderError, getProviderMetadata } from "@core-ai/core-ai";
|
|
15
|
+
import { ProviderError, getProviderMetadata, zodSchemaToJsonSchema } from "@core-ai/core-ai";
|
|
17
16
|
|
|
18
17
|
// src/model-capabilities.ts
|
|
19
18
|
var DEFAULT_CAPABILITIES = {
|
|
@@ -334,8 +333,7 @@ function createStructuredOutputOptions(options) {
|
|
|
334
333
|
};
|
|
335
334
|
}
|
|
336
335
|
function toAnthropicJsonSchema(schema) {
|
|
337
|
-
|
|
338
|
-
return normalizeAnthropicJsonSchema(rawSchema);
|
|
336
|
+
return normalizeAnthropicJsonSchema(zodSchemaToJsonSchema(schema));
|
|
339
337
|
}
|
|
340
338
|
function normalizeAnthropicJsonSchema(value) {
|
|
341
339
|
const normalized = normalizeAnthropicJsonValue(value);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@core-ai/anthropic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Anthropic provider package for @core-ai/core-ai",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Omnifact (https://omnifact.ai)",
|
|
@@ -42,12 +42,11 @@
|
|
|
42
42
|
"test:watch": "vitest"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@core-ai/core-ai": "^0.
|
|
46
|
-
"@anthropic-ai/sdk": "^0.78.0"
|
|
47
|
-
"zod-to-json-schema": "^3.25.1"
|
|
45
|
+
"@core-ai/core-ai": "^0.7.0",
|
|
46
|
+
"@anthropic-ai/sdk": "^0.78.0"
|
|
48
47
|
},
|
|
49
48
|
"peerDependencies": {
|
|
50
|
-
"zod": "^
|
|
49
|
+
"zod": "^4.0.0"
|
|
51
50
|
},
|
|
52
51
|
"devDependencies": {
|
|
53
52
|
"@core-ai/eslint-config": "*",
|