@anthropic-ai/sdk 0.67.1 → 0.69.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/CHANGELOG.md +16 -0
- package/helpers/beta/json-schema.d.mts +12 -0
- package/helpers/beta/json-schema.d.mts.map +1 -1
- package/helpers/beta/json-schema.d.ts +12 -0
- package/helpers/beta/json-schema.d.ts.map +1 -1
- package/helpers/beta/json-schema.js +34 -0
- package/helpers/beta/json-schema.js.map +1 -1
- package/helpers/beta/json-schema.mjs +33 -0
- package/helpers/beta/json-schema.mjs.map +1 -1
- package/helpers/beta/zod.d.mts +13 -2
- package/helpers/beta/zod.d.mts.map +1 -1
- package/helpers/beta/zod.d.ts +13 -2
- package/helpers/beta/zod.d.ts.map +1 -1
- package/helpers/beta/zod.js +30 -1
- package/helpers/beta/zod.js.map +1 -1
- package/helpers/beta/zod.mjs +29 -1
- package/helpers/beta/zod.mjs.map +1 -1
- package/internal/utils/values.d.mts +1 -0
- package/internal/utils/values.d.mts.map +1 -1
- package/internal/utils/values.d.ts +1 -0
- package/internal/utils/values.d.ts.map +1 -1
- package/internal/utils/values.js +8 -1
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +6 -0
- package/internal/utils/values.mjs.map +1 -1
- package/lib/BetaMessageStream.d.mts +11 -9
- package/lib/BetaMessageStream.d.mts.map +1 -1
- package/lib/BetaMessageStream.d.ts +11 -9
- package/lib/BetaMessageStream.d.ts.map +1 -1
- package/lib/BetaMessageStream.js +14 -9
- package/lib/BetaMessageStream.js.map +1 -1
- package/lib/BetaMessageStream.mjs +14 -9
- package/lib/BetaMessageStream.mjs.map +1 -1
- package/lib/beta-parser.d.mts +22 -0
- package/lib/beta-parser.d.mts.map +1 -0
- package/lib/beta-parser.d.ts +22 -0
- package/lib/beta-parser.d.ts.map +1 -0
- package/lib/beta-parser.js +59 -0
- package/lib/beta-parser.js.map +1 -0
- package/lib/beta-parser.mjs +55 -0
- package/lib/beta-parser.mjs.map +1 -0
- package/lib/transform-json-schema.d.mts +3 -0
- package/lib/transform-json-schema.d.mts.map +1 -0
- package/lib/transform-json-schema.d.ts +3 -0
- package/lib/transform-json-schema.d.ts.map +1 -0
- package/lib/transform-json-schema.js +114 -0
- package/lib/transform-json-schema.js.map +1 -0
- package/lib/transform-json-schema.mjs +111 -0
- package/lib/transform-json-schema.mjs.map +1 -0
- package/package.json +1 -1
- package/resources/beta/beta.d.mts +2 -2
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +2 -2
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/index.d.mts +1 -1
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +1 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/messages/batches.d.mts +6 -6
- package/resources/beta/messages/batches.d.ts +6 -6
- package/resources/beta/messages/batches.js +6 -6
- package/resources/beta/messages/batches.mjs +6 -6
- package/resources/beta/messages/index.d.mts +1 -1
- package/resources/beta/messages/index.d.mts.map +1 -1
- package/resources/beta/messages/index.d.ts +1 -1
- package/resources/beta/messages/index.d.ts.map +1 -1
- package/resources/beta/messages/index.js.map +1 -1
- package/resources/beta/messages/index.mjs.map +1 -1
- package/resources/beta/messages/messages.d.mts +91 -12
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +91 -12
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js +31 -4
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs +31 -4
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/messages/batches.d.mts +6 -6
- package/resources/messages/batches.d.ts +6 -6
- package/resources/messages/batches.js +6 -6
- package/resources/messages/batches.mjs +6 -6
- package/resources/messages/messages.d.mts +3 -2
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +3 -2
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/src/helpers/beta/json-schema.ts +43 -0
- package/src/helpers/beta/zod.ts +40 -3
- package/src/internal/utils/values.ts +7 -0
- package/src/lib/BetaMessageStream.ts +32 -25
- package/src/lib/beta-parser.ts +105 -0
- package/src/lib/transform-json-schema.ts +124 -0
- package/src/resources/beta/beta.ts +10 -0
- package/src/resources/beta/index.ts +5 -0
- package/src/resources/beta/messages/batches.ts +6 -6
- package/src/resources/beta/messages/index.ts +5 -0
- package/src/resources/beta/messages/messages.ts +151 -20
- package/src/resources/messages/batches.ts +6 -6
- package/src/resources/messages/messages.ts +3 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
import { Anthropic } from '../../../client';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
3
5
|
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
+
import { Stream } from '../../../core/streaming';
|
|
7
|
+
import { MODEL_NONSTREAMING_TOKENS } from '../../../internal/constants';
|
|
8
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
9
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
10
|
+
import {
|
|
11
|
+
parseBetaMessage,
|
|
12
|
+
type ExtractParsedContentFromBetaParams,
|
|
13
|
+
type ParsedBetaMessage,
|
|
14
|
+
} from '../../../lib/beta-parser';
|
|
15
|
+
import { BetaMessageStream } from '../../../lib/BetaMessageStream';
|
|
16
|
+
import {
|
|
17
|
+
BetaToolRunner,
|
|
18
|
+
BetaToolRunnerParams,
|
|
19
|
+
BetaToolRunnerRequestOptions,
|
|
20
|
+
} from '../../../lib/tools/BetaToolRunner';
|
|
21
|
+
import type { Model } from '../../messages/messages';
|
|
6
22
|
import * as MessagesAPI from '../../messages/messages';
|
|
23
|
+
import * as BetaAPI from '../beta';
|
|
7
24
|
import * as BatchesAPI from './batches';
|
|
8
25
|
import {
|
|
9
26
|
BatchCancelParams,
|
|
@@ -24,19 +41,7 @@ import {
|
|
|
24
41
|
BetaMessageBatchSucceededResult,
|
|
25
42
|
BetaMessageBatchesPage,
|
|
26
43
|
} from './batches';
|
|
27
|
-
import
|
|
28
|
-
import { Stream } from '../../../core/streaming';
|
|
29
|
-
import { buildHeaders } from '../../../internal/headers';
|
|
30
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
31
|
-
import type { Model } from '../../messages/messages';
|
|
32
|
-
import { BetaMessageStream } from '../../../lib/BetaMessageStream';
|
|
33
|
-
import { MODEL_NONSTREAMING_TOKENS } from '../../../internal/constants';
|
|
34
|
-
import {
|
|
35
|
-
BetaToolRunner,
|
|
36
|
-
BetaToolRunnerParams,
|
|
37
|
-
BetaToolRunnerRequestOptions,
|
|
38
|
-
} from '../../../lib/tools/BetaToolRunner';
|
|
39
|
-
import { Anthropic } from '../../../client';
|
|
44
|
+
import * as MessagesMessagesAPI from './messages';
|
|
40
45
|
|
|
41
46
|
const DEPRECATED_MODELS: {
|
|
42
47
|
[K in Model]?: string;
|
|
@@ -64,7 +69,8 @@ export class Messages extends APIResource {
|
|
|
64
69
|
* The Messages API can be used for either single queries or stateless multi-turn
|
|
65
70
|
* conversations.
|
|
66
71
|
*
|
|
67
|
-
* Learn more about the Messages API in our
|
|
72
|
+
* Learn more about the Messages API in our
|
|
73
|
+
* [user guide](https://docs.claude.com/en/docs/initial-setup)
|
|
68
74
|
*
|
|
69
75
|
* @example
|
|
70
76
|
* ```ts
|
|
@@ -115,10 +121,46 @@ export class Messages extends APIResource {
|
|
|
115
121
|
}) as APIPromise<BetaMessage> | APIPromise<Stream<BetaRawMessageStreamEvent>>;
|
|
116
122
|
}
|
|
117
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Send a structured list of input messages with text and/or image content, along with an expected `output_format` and
|
|
126
|
+
* the response will be automatically parsed and available in the `parsed` property of the message.
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* ```ts
|
|
130
|
+
* const message = await client.beta.messages.parse({
|
|
131
|
+
* model: 'claude-3-5-sonnet-20241022',
|
|
132
|
+
* max_tokens: 1024,
|
|
133
|
+
* messages: [{ role: 'user', content: 'What is 2+2?' }],
|
|
134
|
+
* output_format: zodOutputFormat(z.object({ answer: z.number() }), 'math'),
|
|
135
|
+
* });
|
|
136
|
+
*
|
|
137
|
+
* console.log(message.parsed?.answer); // 4
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
parse<Params extends MessageCreateParamsNonStreaming>(
|
|
141
|
+
params: Params,
|
|
142
|
+
options?: RequestOptions,
|
|
143
|
+
): APIPromise<ParsedBetaMessage<ExtractParsedContentFromBetaParams<Params>>> {
|
|
144
|
+
options = {
|
|
145
|
+
...options,
|
|
146
|
+
headers: buildHeaders([
|
|
147
|
+
{ 'anthropic-beta': [...(params.betas ?? []), 'structured-outputs-2025-09-17'].toString() },
|
|
148
|
+
options?.headers,
|
|
149
|
+
]),
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
return this.create(params, options).then((message) => parseBetaMessage(message, params)) as APIPromise<
|
|
153
|
+
ParsedBetaMessage<ExtractParsedContentFromBetaParams<Params>>
|
|
154
|
+
>;
|
|
155
|
+
}
|
|
156
|
+
|
|
118
157
|
/**
|
|
119
158
|
* Create a Message stream
|
|
120
159
|
*/
|
|
121
|
-
stream
|
|
160
|
+
stream<Params extends BetaMessageStreamParams>(
|
|
161
|
+
body: Params,
|
|
162
|
+
options?: RequestOptions,
|
|
163
|
+
): BetaMessageStream<ExtractParsedContentFromBetaParams<Params>> {
|
|
122
164
|
return BetaMessageStream.createMessage(this, body, options);
|
|
123
165
|
}
|
|
124
166
|
|
|
@@ -129,7 +171,7 @@ export class Messages extends APIResource {
|
|
|
129
171
|
* including tools, images, and documents, without creating it.
|
|
130
172
|
*
|
|
131
173
|
* Learn more about token counting in our
|
|
132
|
-
* [user guide](/en/docs/build-with-claude/token-counting)
|
|
174
|
+
* [user guide](https://docs.claude.com/en/docs/build-with-claude/token-counting)
|
|
133
175
|
*
|
|
134
176
|
* @example
|
|
135
177
|
* ```ts
|
|
@@ -169,6 +211,10 @@ export class Messages extends APIResource {
|
|
|
169
211
|
}
|
|
170
212
|
}
|
|
171
213
|
|
|
214
|
+
export interface BetaAllThinkingTurns {
|
|
215
|
+
type: 'all';
|
|
216
|
+
}
|
|
217
|
+
|
|
172
218
|
export type BetaMessageStreamParams = MessageCreateParamsBase;
|
|
173
219
|
|
|
174
220
|
export interface BetaBase64ImageSource {
|
|
@@ -459,6 +505,33 @@ export interface BetaCitationsWebSearchResultLocation {
|
|
|
459
505
|
url: string;
|
|
460
506
|
}
|
|
461
507
|
|
|
508
|
+
export interface BetaClearThinking20251015Edit {
|
|
509
|
+
type: 'clear_thinking_20251015';
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Number of most recent assistant turns to keep thinking blocks for. Older turns
|
|
513
|
+
* will have their thinking blocks removed.
|
|
514
|
+
*/
|
|
515
|
+
keep?: BetaThinkingTurns | BetaAllThinkingTurns | 'all';
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export interface BetaClearThinking20251015EditResponse {
|
|
519
|
+
/**
|
|
520
|
+
* Number of input tokens cleared by this edit.
|
|
521
|
+
*/
|
|
522
|
+
cleared_input_tokens: number;
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Number of thinking turns that were cleared.
|
|
526
|
+
*/
|
|
527
|
+
cleared_thinking_turns: number;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* The type of context management edit applied.
|
|
531
|
+
*/
|
|
532
|
+
type: 'clear_thinking_20251015';
|
|
533
|
+
}
|
|
534
|
+
|
|
462
535
|
export interface BetaClearToolUses20250919Edit {
|
|
463
536
|
type: 'clear_tool_uses_20250919';
|
|
464
537
|
|
|
@@ -556,6 +629,8 @@ export interface BetaCodeExecutionTool20250522 {
|
|
|
556
629
|
* Create a cache control breakpoint at this content block.
|
|
557
630
|
*/
|
|
558
631
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
632
|
+
|
|
633
|
+
strict?: boolean;
|
|
559
634
|
}
|
|
560
635
|
|
|
561
636
|
export interface BetaCodeExecutionTool20250825 {
|
|
@@ -572,6 +647,8 @@ export interface BetaCodeExecutionTool20250825 {
|
|
|
572
647
|
* Create a cache control breakpoint at this content block.
|
|
573
648
|
*/
|
|
574
649
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
650
|
+
|
|
651
|
+
strict?: boolean;
|
|
575
652
|
}
|
|
576
653
|
|
|
577
654
|
export interface BetaCodeExecutionToolResultBlock {
|
|
@@ -733,14 +810,14 @@ export interface BetaContextManagementConfig {
|
|
|
733
810
|
/**
|
|
734
811
|
* List of context management edits to apply
|
|
735
812
|
*/
|
|
736
|
-
edits?: Array<BetaClearToolUses20250919Edit>;
|
|
813
|
+
edits?: Array<BetaClearToolUses20250919Edit | BetaClearThinking20251015Edit>;
|
|
737
814
|
}
|
|
738
815
|
|
|
739
816
|
export interface BetaContextManagementResponse {
|
|
740
817
|
/**
|
|
741
818
|
* List of context management edits that were applied.
|
|
742
819
|
*/
|
|
743
|
-
applied_edits: Array<BetaClearToolUses20250919EditResponse>;
|
|
820
|
+
applied_edits: Array<BetaClearToolUses20250919EditResponse | BetaClearThinking20251015EditResponse>;
|
|
744
821
|
}
|
|
745
822
|
|
|
746
823
|
export interface BetaCountTokensContextManagementResponse {
|
|
@@ -807,6 +884,15 @@ export interface BetaInputTokensTrigger {
|
|
|
807
884
|
value: number;
|
|
808
885
|
}
|
|
809
886
|
|
|
887
|
+
export interface BetaJSONOutputFormat {
|
|
888
|
+
/**
|
|
889
|
+
* The JSON schema of the format
|
|
890
|
+
*/
|
|
891
|
+
schema: { [key: string]: unknown };
|
|
892
|
+
|
|
893
|
+
type: 'json_schema';
|
|
894
|
+
}
|
|
895
|
+
|
|
810
896
|
export interface BetaMCPToolResultBlock {
|
|
811
897
|
content: string | Array<BetaTextBlock>;
|
|
812
898
|
|
|
@@ -869,6 +955,8 @@ export interface BetaMemoryTool20250818 {
|
|
|
869
955
|
* Create a cache control breakpoint at this content block.
|
|
870
956
|
*/
|
|
871
957
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
958
|
+
|
|
959
|
+
strict?: boolean;
|
|
872
960
|
}
|
|
873
961
|
|
|
874
962
|
export type BetaMemoryTool20250818Command =
|
|
@@ -1686,6 +1774,12 @@ export interface BetaThinkingDelta {
|
|
|
1686
1774
|
type: 'thinking_delta';
|
|
1687
1775
|
}
|
|
1688
1776
|
|
|
1777
|
+
export interface BetaThinkingTurns {
|
|
1778
|
+
type: 'thinking_turns';
|
|
1779
|
+
|
|
1780
|
+
value: number;
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1689
1783
|
export interface BetaTool {
|
|
1690
1784
|
/**
|
|
1691
1785
|
* [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.
|
|
@@ -1717,6 +1811,8 @@ export interface BetaTool {
|
|
|
1717
1811
|
*/
|
|
1718
1812
|
description?: string;
|
|
1719
1813
|
|
|
1814
|
+
strict?: boolean;
|
|
1815
|
+
|
|
1720
1816
|
type?: 'custom' | null;
|
|
1721
1817
|
}
|
|
1722
1818
|
|
|
@@ -1752,6 +1848,8 @@ export interface BetaToolBash20241022 {
|
|
|
1752
1848
|
* Create a cache control breakpoint at this content block.
|
|
1753
1849
|
*/
|
|
1754
1850
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
1851
|
+
|
|
1852
|
+
strict?: boolean;
|
|
1755
1853
|
}
|
|
1756
1854
|
|
|
1757
1855
|
export interface BetaToolBash20250124 {
|
|
@@ -1768,6 +1866,8 @@ export interface BetaToolBash20250124 {
|
|
|
1768
1866
|
* Create a cache control breakpoint at this content block.
|
|
1769
1867
|
*/
|
|
1770
1868
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
1869
|
+
|
|
1870
|
+
strict?: boolean;
|
|
1771
1871
|
}
|
|
1772
1872
|
|
|
1773
1873
|
/**
|
|
@@ -1862,6 +1962,8 @@ export interface BetaToolComputerUse20241022 {
|
|
|
1862
1962
|
* The X11 display number (e.g. 0, 1) for the display.
|
|
1863
1963
|
*/
|
|
1864
1964
|
display_number?: number | null;
|
|
1965
|
+
|
|
1966
|
+
strict?: boolean;
|
|
1865
1967
|
}
|
|
1866
1968
|
|
|
1867
1969
|
export interface BetaToolComputerUse20250124 {
|
|
@@ -1893,6 +1995,8 @@ export interface BetaToolComputerUse20250124 {
|
|
|
1893
1995
|
* The X11 display number (e.g. 0, 1) for the display.
|
|
1894
1996
|
*/
|
|
1895
1997
|
display_number?: number | null;
|
|
1998
|
+
|
|
1999
|
+
strict?: boolean;
|
|
1896
2000
|
}
|
|
1897
2001
|
|
|
1898
2002
|
export interface BetaToolResultBlockParam {
|
|
@@ -1928,6 +2032,8 @@ export interface BetaToolTextEditor20241022 {
|
|
|
1928
2032
|
* Create a cache control breakpoint at this content block.
|
|
1929
2033
|
*/
|
|
1930
2034
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
2035
|
+
|
|
2036
|
+
strict?: boolean;
|
|
1931
2037
|
}
|
|
1932
2038
|
|
|
1933
2039
|
export interface BetaToolTextEditor20250124 {
|
|
@@ -1944,6 +2050,8 @@ export interface BetaToolTextEditor20250124 {
|
|
|
1944
2050
|
* Create a cache control breakpoint at this content block.
|
|
1945
2051
|
*/
|
|
1946
2052
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
2053
|
+
|
|
2054
|
+
strict?: boolean;
|
|
1947
2055
|
}
|
|
1948
2056
|
|
|
1949
2057
|
export interface BetaToolTextEditor20250429 {
|
|
@@ -1960,6 +2068,8 @@ export interface BetaToolTextEditor20250429 {
|
|
|
1960
2068
|
* Create a cache control breakpoint at this content block.
|
|
1961
2069
|
*/
|
|
1962
2070
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
2071
|
+
|
|
2072
|
+
strict?: boolean;
|
|
1963
2073
|
}
|
|
1964
2074
|
|
|
1965
2075
|
export interface BetaToolTextEditor20250728 {
|
|
@@ -1982,6 +2092,8 @@ export interface BetaToolTextEditor20250728 {
|
|
|
1982
2092
|
* defaults to displaying the full file.
|
|
1983
2093
|
*/
|
|
1984
2094
|
max_characters?: number | null;
|
|
2095
|
+
|
|
2096
|
+
strict?: boolean;
|
|
1985
2097
|
}
|
|
1986
2098
|
|
|
1987
2099
|
export type BetaToolUnion =
|
|
@@ -2159,6 +2271,8 @@ export interface BetaWebFetchTool20250910 {
|
|
|
2159
2271
|
* Maximum number of times the tool can be used in the API request.
|
|
2160
2272
|
*/
|
|
2161
2273
|
max_uses?: number | null;
|
|
2274
|
+
|
|
2275
|
+
strict?: boolean;
|
|
2162
2276
|
}
|
|
2163
2277
|
|
|
2164
2278
|
export interface BetaWebFetchToolResultBlock {
|
|
@@ -2260,6 +2374,8 @@ export interface BetaWebSearchTool20250305 {
|
|
|
2260
2374
|
*/
|
|
2261
2375
|
max_uses?: number | null;
|
|
2262
2376
|
|
|
2377
|
+
strict?: boolean;
|
|
2378
|
+
|
|
2263
2379
|
/**
|
|
2264
2380
|
* Parameters for the user's location. Used to provide more relevant search
|
|
2265
2381
|
* results.
|
|
@@ -2465,6 +2581,11 @@ export interface MessageCreateParamsBase {
|
|
|
2465
2581
|
*/
|
|
2466
2582
|
metadata?: BetaMetadata;
|
|
2467
2583
|
|
|
2584
|
+
/**
|
|
2585
|
+
* Body param: A schema to specify Claude's output format in responses.
|
|
2586
|
+
*/
|
|
2587
|
+
output_format?: BetaJSONOutputFormat | null;
|
|
2588
|
+
|
|
2468
2589
|
/**
|
|
2469
2590
|
* Body param: Determines whether to use priority capacity (if available) or
|
|
2470
2591
|
* standard capacity for this request.
|
|
@@ -2759,6 +2880,11 @@ export interface MessageCountTokensParams {
|
|
|
2759
2880
|
*/
|
|
2760
2881
|
mcp_servers?: Array<BetaRequestMCPServerURLDefinition>;
|
|
2761
2882
|
|
|
2883
|
+
/**
|
|
2884
|
+
* Body param: A schema to specify Claude's output format in responses.
|
|
2885
|
+
*/
|
|
2886
|
+
output_format?: BetaJSONOutputFormat | null;
|
|
2887
|
+
|
|
2762
2888
|
/**
|
|
2763
2889
|
* Body param: System prompt.
|
|
2764
2890
|
*
|
|
@@ -2895,6 +3021,7 @@ Messages.BetaToolRunner = BetaToolRunner;
|
|
|
2895
3021
|
|
|
2896
3022
|
export declare namespace Messages {
|
|
2897
3023
|
export {
|
|
3024
|
+
type BetaAllThinkingTurns as BetaAllThinkingTurns,
|
|
2898
3025
|
type BetaBase64ImageSource as BetaBase64ImageSource,
|
|
2899
3026
|
type BetaBase64PDFSource as BetaBase64PDFSource,
|
|
2900
3027
|
type BetaBashCodeExecutionOutputBlock as BetaBashCodeExecutionOutputBlock,
|
|
@@ -2920,6 +3047,8 @@ export declare namespace Messages {
|
|
|
2920
3047
|
type BetaCitationsConfigParam as BetaCitationsConfigParam,
|
|
2921
3048
|
type BetaCitationsDelta as BetaCitationsDelta,
|
|
2922
3049
|
type BetaCitationsWebSearchResultLocation as BetaCitationsWebSearchResultLocation,
|
|
3050
|
+
type BetaClearThinking20251015Edit as BetaClearThinking20251015Edit,
|
|
3051
|
+
type BetaClearThinking20251015EditResponse as BetaClearThinking20251015EditResponse,
|
|
2923
3052
|
type BetaClearToolUses20250919Edit as BetaClearToolUses20250919Edit,
|
|
2924
3053
|
type BetaClearToolUses20250919EditResponse as BetaClearToolUses20250919EditResponse,
|
|
2925
3054
|
type BetaCodeExecutionOutputBlock as BetaCodeExecutionOutputBlock,
|
|
@@ -2953,6 +3082,7 @@ export declare namespace Messages {
|
|
|
2953
3082
|
type BetaInputJSONDelta as BetaInputJSONDelta,
|
|
2954
3083
|
type BetaInputTokensClearAtLeast as BetaInputTokensClearAtLeast,
|
|
2955
3084
|
type BetaInputTokensTrigger as BetaInputTokensTrigger,
|
|
3085
|
+
type BetaJSONOutputFormat as BetaJSONOutputFormat,
|
|
2956
3086
|
type BetaMCPToolResultBlock as BetaMCPToolResultBlock,
|
|
2957
3087
|
type BetaMCPToolUseBlock as BetaMCPToolUseBlock,
|
|
2958
3088
|
type BetaMCPToolUseBlockParam as BetaMCPToolUseBlockParam,
|
|
@@ -3013,6 +3143,7 @@ export declare namespace Messages {
|
|
|
3013
3143
|
type BetaThinkingConfigEnabled as BetaThinkingConfigEnabled,
|
|
3014
3144
|
type BetaThinkingConfigParam as BetaThinkingConfigParam,
|
|
3015
3145
|
type BetaThinkingDelta as BetaThinkingDelta,
|
|
3146
|
+
type BetaThinkingTurns as BetaThinkingTurns,
|
|
3016
3147
|
type BetaTool as BetaTool,
|
|
3017
3148
|
type BetaToolBash20241022 as BetaToolBash20241022,
|
|
3018
3149
|
type BetaToolBash20250124 as BetaToolBash20250124,
|
|
@@ -20,7 +20,7 @@ export class Batches extends APIResource {
|
|
|
20
20
|
* can take up to 24 hours to complete.
|
|
21
21
|
*
|
|
22
22
|
* Learn more about the Message Batches API in our
|
|
23
|
-
* [user guide](/en/docs/build-with-claude/batch-processing)
|
|
23
|
+
* [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* ```ts
|
|
@@ -50,7 +50,7 @@ export class Batches extends APIResource {
|
|
|
50
50
|
* `results_url` field in the response.
|
|
51
51
|
*
|
|
52
52
|
* Learn more about the Message Batches API in our
|
|
53
|
-
* [user guide](/en/docs/build-with-claude/batch-processing)
|
|
53
|
+
* [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
|
|
54
54
|
*
|
|
55
55
|
* @example
|
|
56
56
|
* ```ts
|
|
@@ -68,7 +68,7 @@ export class Batches extends APIResource {
|
|
|
68
68
|
* returned first.
|
|
69
69
|
*
|
|
70
70
|
* Learn more about the Message Batches API in our
|
|
71
|
-
* [user guide](/en/docs/build-with-claude/batch-processing)
|
|
71
|
+
* [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
|
|
72
72
|
*
|
|
73
73
|
* @example
|
|
74
74
|
* ```ts
|
|
@@ -92,7 +92,7 @@ export class Batches extends APIResource {
|
|
|
92
92
|
* like to delete an in-progress batch, you must first cancel it.
|
|
93
93
|
*
|
|
94
94
|
* Learn more about the Message Batches API in our
|
|
95
|
-
* [user guide](/en/docs/build-with-claude/batch-processing)
|
|
95
|
+
* [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
|
|
96
96
|
*
|
|
97
97
|
* @example
|
|
98
98
|
* ```ts
|
|
@@ -116,7 +116,7 @@ export class Batches extends APIResource {
|
|
|
116
116
|
* non-interruptible.
|
|
117
117
|
*
|
|
118
118
|
* Learn more about the Message Batches API in our
|
|
119
|
-
* [user guide](/en/docs/build-with-claude/batch-processing)
|
|
119
|
+
* [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
|
|
120
120
|
*
|
|
121
121
|
* @example
|
|
122
122
|
* ```ts
|
|
@@ -137,7 +137,7 @@ export class Batches extends APIResource {
|
|
|
137
137
|
* requests. Use the `custom_id` field to match results to requests.
|
|
138
138
|
*
|
|
139
139
|
* Learn more about the Message Batches API in our
|
|
140
|
-
* [user guide](/en/docs/build-with-claude/batch-processing)
|
|
140
|
+
* [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)
|
|
141
141
|
*
|
|
142
142
|
* @example
|
|
143
143
|
* ```ts
|
|
@@ -35,7 +35,8 @@ export class Messages extends APIResource {
|
|
|
35
35
|
* The Messages API can be used for either single queries or stateless multi-turn
|
|
36
36
|
* conversations.
|
|
37
37
|
*
|
|
38
|
-
* Learn more about the Messages API in our
|
|
38
|
+
* Learn more about the Messages API in our
|
|
39
|
+
* [user guide](https://docs.claude.com/en/docs/initial-setup)
|
|
39
40
|
*
|
|
40
41
|
* @example
|
|
41
42
|
* ```ts
|
|
@@ -93,7 +94,7 @@ export class Messages extends APIResource {
|
|
|
93
94
|
* including tools, images, and documents, without creating it.
|
|
94
95
|
*
|
|
95
96
|
* Learn more about token counting in our
|
|
96
|
-
* [user guide](/en/docs/build-with-claude/token-counting)
|
|
97
|
+
* [user guide](https://docs.claude.com/en/docs/build-with-claude/token-counting)
|
|
97
98
|
*
|
|
98
99
|
* @example
|
|
99
100
|
* ```ts
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.69.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.69.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.69.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.69.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|