@anthropic-ai/sdk 0.64.0 → 0.65.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 +14 -0
- package/README.md +14 -14
- package/bin/cli +5 -12
- package/helpers/beta/memory.d.mts +11 -0
- package/helpers/beta/memory.d.mts.map +1 -0
- package/helpers/beta/memory.d.ts +11 -0
- package/helpers/beta/memory.d.ts.map +1 -0
- package/helpers/beta/memory.js +18 -0
- package/helpers/beta/memory.js.map +1 -0
- package/helpers/beta/memory.mjs +15 -0
- package/helpers/beta/memory.mjs.map +1 -0
- package/lib/BetaMessageStream.d.mts.map +1 -1
- package/lib/BetaMessageStream.d.ts.map +1 -1
- package/lib/BetaMessageStream.js +1 -0
- package/lib/BetaMessageStream.js.map +1 -1
- package/lib/BetaMessageStream.mjs +1 -0
- package/lib/BetaMessageStream.mjs.map +1 -1
- package/lib/tools/BetaRunnableTool.d.mts +3 -3
- package/lib/tools/BetaRunnableTool.d.mts.map +1 -1
- package/lib/tools/BetaRunnableTool.d.ts +3 -3
- package/lib/tools/BetaRunnableTool.d.ts.map +1 -1
- 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 +1 -1
- package/resources/beta/messages/batches.d.ts +1 -1
- package/resources/beta/messages/batches.js +1 -1
- package/resources/beta/messages/batches.mjs +1 -1
- 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 +208 -5
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +208 -5
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/messages/batches.d.mts +1 -1
- package/resources/messages/batches.d.ts +1 -1
- package/resources/messages/batches.js +1 -1
- package/resources/messages/batches.mjs +1 -1
- package/resources/messages/messages.d.mts +3 -3
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +3 -3
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/src/helpers/beta/memory.ts +28 -0
- package/src/lib/BetaMessageStream.ts +1 -0
- package/src/lib/tools/BetaRunnableTool.ts +3 -3
- package/src/resources/beta/beta.ts +34 -0
- package/src/resources/beta/index.ts +17 -0
- package/src/resources/beta/messages/batches.ts +1 -1
- package/src/resources/beta/messages/index.ts +17 -0
- package/src/resources/beta/messages/messages.ts +279 -2
- package/src/resources/messages/batches.ts +1 -1
- package/src/resources/messages/messages.ts +11 -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
|
@@ -71,7 +71,7 @@ export class Messages extends APIResource {
|
|
|
71
71
|
* const betaMessage = await client.beta.messages.create({
|
|
72
72
|
* max_tokens: 1024,
|
|
73
73
|
* messages: [{ content: 'Hello, world', role: 'user' }],
|
|
74
|
-
* model: 'claude-sonnet-4-
|
|
74
|
+
* model: 'claude-sonnet-4-5-20250929',
|
|
75
75
|
* });
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
@@ -459,6 +459,56 @@ export interface BetaCitationsWebSearchResultLocation {
|
|
|
459
459
|
url: string;
|
|
460
460
|
}
|
|
461
461
|
|
|
462
|
+
export interface BetaClearToolUses20250919Edit {
|
|
463
|
+
type: 'clear_tool_uses_20250919';
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Minimum number of tokens that must be cleared when triggered. Context will only
|
|
467
|
+
* be modified if at least this many tokens can be removed.
|
|
468
|
+
*/
|
|
469
|
+
clear_at_least?: BetaInputTokensClearAtLeast | null;
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Whether to clear all tool inputs (bool) or specific tool inputs to clear (list)
|
|
473
|
+
*/
|
|
474
|
+
clear_tool_inputs?: boolean | Array<string> | null;
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Tool names whose uses are preserved from clearing
|
|
478
|
+
*/
|
|
479
|
+
exclude_tools?: Array<string> | null;
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Number of tool uses to retain in the conversation
|
|
483
|
+
*/
|
|
484
|
+
keep?: BetaToolUsesKeep;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Condition that triggers the context management strategy
|
|
488
|
+
*/
|
|
489
|
+
trigger?: BetaInputTokensTrigger | BetaToolUsesTrigger;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Results for clear_tool_uses_20250919 edit.
|
|
494
|
+
*/
|
|
495
|
+
export interface BetaClearToolUses20250919EditResponse {
|
|
496
|
+
/**
|
|
497
|
+
* Number of input tokens cleared by this edit.
|
|
498
|
+
*/
|
|
499
|
+
cleared_input_tokens: number;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Number of tool uses that were cleared.
|
|
503
|
+
*/
|
|
504
|
+
cleared_tool_uses: number;
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* The type of context management edit applied.
|
|
508
|
+
*/
|
|
509
|
+
type: 'clear_tool_uses_20250919';
|
|
510
|
+
}
|
|
511
|
+
|
|
462
512
|
export interface BetaCodeExecutionOutputBlock {
|
|
463
513
|
file_id: string;
|
|
464
514
|
|
|
@@ -662,6 +712,33 @@ export interface BetaContentBlockSource {
|
|
|
662
712
|
|
|
663
713
|
export type BetaContentBlockSourceContent = BetaTextBlockParam | BetaImageBlockParam;
|
|
664
714
|
|
|
715
|
+
/**
|
|
716
|
+
* Configuration for context management operations.
|
|
717
|
+
*/
|
|
718
|
+
export interface BetaContextManagementConfig {
|
|
719
|
+
/**
|
|
720
|
+
* List of context management edits to apply
|
|
721
|
+
*/
|
|
722
|
+
edits?: Array<BetaClearToolUses20250919Edit>;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Information about context management operations applied during the request.
|
|
727
|
+
*/
|
|
728
|
+
export interface BetaContextManagementResponse {
|
|
729
|
+
/**
|
|
730
|
+
* List of context management edits that were applied.
|
|
731
|
+
*/
|
|
732
|
+
applied_edits: Array<BetaClearToolUses20250919EditResponse>;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
export interface BetaCountTokensContextManagementResponse {
|
|
736
|
+
/**
|
|
737
|
+
* The original token count before context management was applied
|
|
738
|
+
*/
|
|
739
|
+
original_input_tokens: number;
|
|
740
|
+
}
|
|
741
|
+
|
|
665
742
|
export interface BetaDocumentBlock {
|
|
666
743
|
/**
|
|
667
744
|
* Citation configuration for the document
|
|
@@ -707,6 +784,18 @@ export interface BetaInputJSONDelta {
|
|
|
707
784
|
type: 'input_json_delta';
|
|
708
785
|
}
|
|
709
786
|
|
|
787
|
+
export interface BetaInputTokensClearAtLeast {
|
|
788
|
+
type: 'input_tokens';
|
|
789
|
+
|
|
790
|
+
value: number;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
export interface BetaInputTokensTrigger {
|
|
794
|
+
type: 'input_tokens';
|
|
795
|
+
|
|
796
|
+
value: number;
|
|
797
|
+
}
|
|
798
|
+
|
|
710
799
|
export interface BetaMCPToolResultBlock {
|
|
711
800
|
content: string | Array<BetaTextBlock>;
|
|
712
801
|
|
|
@@ -755,6 +844,137 @@ export interface BetaMCPToolUseBlockParam {
|
|
|
755
844
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
756
845
|
}
|
|
757
846
|
|
|
847
|
+
export interface BetaMemoryTool20250818 {
|
|
848
|
+
/**
|
|
849
|
+
* Name of the tool.
|
|
850
|
+
*
|
|
851
|
+
* This is how the tool will be called by the model and in `tool_use` blocks.
|
|
852
|
+
*/
|
|
853
|
+
name: 'memory';
|
|
854
|
+
|
|
855
|
+
type: 'memory_20250818';
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* Create a cache control breakpoint at this content block.
|
|
859
|
+
*/
|
|
860
|
+
cache_control?: BetaCacheControlEphemeral | null;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
export type BetaMemoryTool20250818Command =
|
|
864
|
+
| BetaMemoryTool20250818ViewCommand
|
|
865
|
+
| BetaMemoryTool20250818CreateCommand
|
|
866
|
+
| BetaMemoryTool20250818StrReplaceCommand
|
|
867
|
+
| BetaMemoryTool20250818InsertCommand
|
|
868
|
+
| BetaMemoryTool20250818DeleteCommand
|
|
869
|
+
| BetaMemoryTool20250818RenameCommand;
|
|
870
|
+
|
|
871
|
+
export interface BetaMemoryTool20250818CreateCommand {
|
|
872
|
+
/**
|
|
873
|
+
* Command type identifier
|
|
874
|
+
*/
|
|
875
|
+
command: 'create';
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* Content to write to the file
|
|
879
|
+
*/
|
|
880
|
+
file_text: string;
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* Path where the file should be created
|
|
884
|
+
*/
|
|
885
|
+
path: string;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
export interface BetaMemoryTool20250818DeleteCommand {
|
|
889
|
+
/**
|
|
890
|
+
* Command type identifier
|
|
891
|
+
*/
|
|
892
|
+
command: 'delete';
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* Path to the file or directory to delete
|
|
896
|
+
*/
|
|
897
|
+
path: string;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
export interface BetaMemoryTool20250818InsertCommand {
|
|
901
|
+
/**
|
|
902
|
+
* Command type identifier
|
|
903
|
+
*/
|
|
904
|
+
command: 'insert';
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* Line number where text should be inserted
|
|
908
|
+
*/
|
|
909
|
+
insert_line: number;
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* Text to insert at the specified line
|
|
913
|
+
*/
|
|
914
|
+
insert_text: string;
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* Path to the file where text should be inserted
|
|
918
|
+
*/
|
|
919
|
+
path: string;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
export interface BetaMemoryTool20250818RenameCommand {
|
|
923
|
+
/**
|
|
924
|
+
* Command type identifier
|
|
925
|
+
*/
|
|
926
|
+
command: 'rename';
|
|
927
|
+
|
|
928
|
+
/**
|
|
929
|
+
* New path for the file or directory
|
|
930
|
+
*/
|
|
931
|
+
new_path: string;
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Current path of the file or directory
|
|
935
|
+
*/
|
|
936
|
+
old_path: string;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
export interface BetaMemoryTool20250818StrReplaceCommand {
|
|
940
|
+
/**
|
|
941
|
+
* Command type identifier
|
|
942
|
+
*/
|
|
943
|
+
command: 'str_replace';
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* Text to replace with
|
|
947
|
+
*/
|
|
948
|
+
new_str: string;
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* Text to search for and replace
|
|
952
|
+
*/
|
|
953
|
+
old_str: string;
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Path to the file where text should be replaced
|
|
957
|
+
*/
|
|
958
|
+
path: string;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
export interface BetaMemoryTool20250818ViewCommand {
|
|
962
|
+
/**
|
|
963
|
+
* Command type identifier
|
|
964
|
+
*/
|
|
965
|
+
command: 'view';
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* Path to directory or file to view
|
|
969
|
+
*/
|
|
970
|
+
path: string;
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* Optional line range for viewing specific lines
|
|
974
|
+
*/
|
|
975
|
+
view_range?: Array<number>;
|
|
976
|
+
}
|
|
977
|
+
|
|
758
978
|
export interface BetaMessage {
|
|
759
979
|
/**
|
|
760
980
|
* Unique object identifier.
|
|
@@ -805,6 +1025,11 @@ export interface BetaMessage {
|
|
|
805
1025
|
*/
|
|
806
1026
|
content: Array<BetaContentBlock>;
|
|
807
1027
|
|
|
1028
|
+
/**
|
|
1029
|
+
* Information about context management operations applied during the request.
|
|
1030
|
+
*/
|
|
1031
|
+
context_management: BetaContextManagementResponse | null;
|
|
1032
|
+
|
|
808
1033
|
/**
|
|
809
1034
|
* The model that will complete your prompt.\n\nSee
|
|
810
1035
|
* [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
@@ -907,6 +1132,11 @@ export interface BetaMessageParam {
|
|
|
907
1132
|
}
|
|
908
1133
|
|
|
909
1134
|
export interface BetaMessageTokensCount {
|
|
1135
|
+
/**
|
|
1136
|
+
* Information about context management applied to the message.
|
|
1137
|
+
*/
|
|
1138
|
+
context_management: BetaCountTokensContextManagementResponse | null;
|
|
1139
|
+
|
|
910
1140
|
/**
|
|
911
1141
|
* The total number of tokens across the provided list of messages, system prompt,
|
|
912
1142
|
* and tools.
|
|
@@ -979,6 +1209,11 @@ export interface BetaRawContentBlockStopEvent {
|
|
|
979
1209
|
}
|
|
980
1210
|
|
|
981
1211
|
export interface BetaRawMessageDeltaEvent {
|
|
1212
|
+
/**
|
|
1213
|
+
* Information about context management operations applied during the request.
|
|
1214
|
+
*/
|
|
1215
|
+
context_management: BetaContextManagementResponse | null;
|
|
1216
|
+
|
|
982
1217
|
delta: BetaRawMessageDeltaEvent.Delta;
|
|
983
1218
|
|
|
984
1219
|
type: 'message_delta';
|
|
@@ -1168,7 +1403,8 @@ export type BetaStopReason =
|
|
|
1168
1403
|
| 'stop_sequence'
|
|
1169
1404
|
| 'tool_use'
|
|
1170
1405
|
| 'pause_turn'
|
|
1171
|
-
| 'refusal'
|
|
1406
|
+
| 'refusal'
|
|
1407
|
+
| 'model_context_window_exceeded';
|
|
1172
1408
|
|
|
1173
1409
|
export interface BetaTextBlock {
|
|
1174
1410
|
/**
|
|
@@ -1702,6 +1938,7 @@ export type BetaToolUnion =
|
|
|
1702
1938
|
| BetaCodeExecutionTool20250522
|
|
1703
1939
|
| BetaCodeExecutionTool20250825
|
|
1704
1940
|
| BetaToolComputerUse20241022
|
|
1941
|
+
| BetaMemoryTool20250818
|
|
1705
1942
|
| BetaToolComputerUse20250124
|
|
1706
1943
|
| BetaToolTextEditor20241022
|
|
1707
1944
|
| BetaToolTextEditor20250124
|
|
@@ -1735,6 +1972,18 @@ export interface BetaToolUseBlockParam {
|
|
|
1735
1972
|
cache_control?: BetaCacheControlEphemeral | null;
|
|
1736
1973
|
}
|
|
1737
1974
|
|
|
1975
|
+
export interface BetaToolUsesKeep {
|
|
1976
|
+
type: 'tool_uses';
|
|
1977
|
+
|
|
1978
|
+
value: number;
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
export interface BetaToolUsesTrigger {
|
|
1982
|
+
type: 'tool_uses';
|
|
1983
|
+
|
|
1984
|
+
value: number;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1738
1987
|
export interface BetaURLImageSource {
|
|
1739
1988
|
type: 'url';
|
|
1740
1989
|
|
|
@@ -2145,6 +2394,11 @@ export interface MessageCreateParamsBase {
|
|
|
2145
2394
|
*/
|
|
2146
2395
|
container?: string | null;
|
|
2147
2396
|
|
|
2397
|
+
/**
|
|
2398
|
+
* Body param: Configuration for context management operations.
|
|
2399
|
+
*/
|
|
2400
|
+
context_management?: BetaContextManagementConfig | null;
|
|
2401
|
+
|
|
2148
2402
|
/**
|
|
2149
2403
|
* Body param: MCP servers to be utilized in this request
|
|
2150
2404
|
*/
|
|
@@ -2439,6 +2693,11 @@ export interface MessageCountTokensParams {
|
|
|
2439
2693
|
*/
|
|
2440
2694
|
model: MessagesAPI.Model;
|
|
2441
2695
|
|
|
2696
|
+
/**
|
|
2697
|
+
* Body param: Configuration for context management operations.
|
|
2698
|
+
*/
|
|
2699
|
+
context_management?: BetaContextManagementConfig | null;
|
|
2700
|
+
|
|
2442
2701
|
/**
|
|
2443
2702
|
* Body param: MCP servers to be utilized in this request
|
|
2444
2703
|
*/
|
|
@@ -2556,6 +2815,7 @@ export interface MessageCountTokensParams {
|
|
|
2556
2815
|
| BetaCodeExecutionTool20250522
|
|
2557
2816
|
| BetaCodeExecutionTool20250825
|
|
2558
2817
|
| BetaToolComputerUse20241022
|
|
2818
|
+
| BetaMemoryTool20250818
|
|
2559
2819
|
| BetaToolComputerUse20250124
|
|
2560
2820
|
| BetaToolTextEditor20241022
|
|
2561
2821
|
| BetaToolTextEditor20250124
|
|
@@ -2604,6 +2864,8 @@ export declare namespace Messages {
|
|
|
2604
2864
|
type BetaCitationsConfigParam as BetaCitationsConfigParam,
|
|
2605
2865
|
type BetaCitationsDelta as BetaCitationsDelta,
|
|
2606
2866
|
type BetaCitationsWebSearchResultLocation as BetaCitationsWebSearchResultLocation,
|
|
2867
|
+
type BetaClearToolUses20250919Edit as BetaClearToolUses20250919Edit,
|
|
2868
|
+
type BetaClearToolUses20250919EditResponse as BetaClearToolUses20250919EditResponse,
|
|
2607
2869
|
type BetaCodeExecutionOutputBlock as BetaCodeExecutionOutputBlock,
|
|
2608
2870
|
type BetaCodeExecutionOutputBlockParam as BetaCodeExecutionOutputBlockParam,
|
|
2609
2871
|
type BetaCodeExecutionResultBlock as BetaCodeExecutionResultBlock,
|
|
@@ -2624,14 +2886,27 @@ export declare namespace Messages {
|
|
|
2624
2886
|
type BetaContentBlockParam as BetaContentBlockParam,
|
|
2625
2887
|
type BetaContentBlockSource as BetaContentBlockSource,
|
|
2626
2888
|
type BetaContentBlockSourceContent as BetaContentBlockSourceContent,
|
|
2889
|
+
type BetaContextManagementConfig as BetaContextManagementConfig,
|
|
2890
|
+
type BetaContextManagementResponse as BetaContextManagementResponse,
|
|
2891
|
+
type BetaCountTokensContextManagementResponse as BetaCountTokensContextManagementResponse,
|
|
2627
2892
|
type BetaDocumentBlock as BetaDocumentBlock,
|
|
2628
2893
|
type BetaFileDocumentSource as BetaFileDocumentSource,
|
|
2629
2894
|
type BetaFileImageSource as BetaFileImageSource,
|
|
2630
2895
|
type BetaImageBlockParam as BetaImageBlockParam,
|
|
2631
2896
|
type BetaInputJSONDelta as BetaInputJSONDelta,
|
|
2897
|
+
type BetaInputTokensClearAtLeast as BetaInputTokensClearAtLeast,
|
|
2898
|
+
type BetaInputTokensTrigger as BetaInputTokensTrigger,
|
|
2632
2899
|
type BetaMCPToolResultBlock as BetaMCPToolResultBlock,
|
|
2633
2900
|
type BetaMCPToolUseBlock as BetaMCPToolUseBlock,
|
|
2634
2901
|
type BetaMCPToolUseBlockParam as BetaMCPToolUseBlockParam,
|
|
2902
|
+
type BetaMemoryTool20250818 as BetaMemoryTool20250818,
|
|
2903
|
+
type BetaMemoryTool20250818Command as BetaMemoryTool20250818Command,
|
|
2904
|
+
type BetaMemoryTool20250818CreateCommand as BetaMemoryTool20250818CreateCommand,
|
|
2905
|
+
type BetaMemoryTool20250818DeleteCommand as BetaMemoryTool20250818DeleteCommand,
|
|
2906
|
+
type BetaMemoryTool20250818InsertCommand as BetaMemoryTool20250818InsertCommand,
|
|
2907
|
+
type BetaMemoryTool20250818RenameCommand as BetaMemoryTool20250818RenameCommand,
|
|
2908
|
+
type BetaMemoryTool20250818StrReplaceCommand as BetaMemoryTool20250818StrReplaceCommand,
|
|
2909
|
+
type BetaMemoryTool20250818ViewCommand as BetaMemoryTool20250818ViewCommand,
|
|
2635
2910
|
type BetaMessage as BetaMessage,
|
|
2636
2911
|
type BetaMessageDeltaUsage as BetaMessageDeltaUsage,
|
|
2637
2912
|
type BetaMessageParam as BetaMessageParam,
|
|
@@ -2698,6 +2973,8 @@ export declare namespace Messages {
|
|
|
2698
2973
|
type BetaToolUnion as BetaToolUnion,
|
|
2699
2974
|
type BetaToolUseBlock as BetaToolUseBlock,
|
|
2700
2975
|
type BetaToolUseBlockParam as BetaToolUseBlockParam,
|
|
2976
|
+
type BetaToolUsesKeep as BetaToolUsesKeep,
|
|
2977
|
+
type BetaToolUsesTrigger as BetaToolUsesTrigger,
|
|
2701
2978
|
type BetaURLImageSource as BetaURLImageSource,
|
|
2702
2979
|
type BetaURLPDFSource as BetaURLPDFSource,
|
|
2703
2980
|
type BetaUsage as BetaUsage,
|
|
@@ -42,7 +42,7 @@ export class Messages extends APIResource {
|
|
|
42
42
|
* const message = await client.messages.create({
|
|
43
43
|
* max_tokens: 1024,
|
|
44
44
|
* messages: [{ content: 'Hello, world', role: 'user' }],
|
|
45
|
-
* model: 'claude-sonnet-4-
|
|
45
|
+
* model: 'claude-sonnet-4-5-20250929',
|
|
46
46
|
* });
|
|
47
47
|
* ```
|
|
48
48
|
*/
|
|
@@ -564,6 +564,8 @@ export type Model =
|
|
|
564
564
|
| 'claude-sonnet-4-20250514'
|
|
565
565
|
| 'claude-sonnet-4-0'
|
|
566
566
|
| 'claude-4-sonnet-20250514'
|
|
567
|
+
| 'claude-sonnet-4-5'
|
|
568
|
+
| 'claude-sonnet-4-5-20250929'
|
|
567
569
|
| 'claude-3-5-sonnet-latest'
|
|
568
570
|
| 'claude-3-5-sonnet-20241022'
|
|
569
571
|
| 'claude-3-5-sonnet-20240620'
|
|
@@ -753,7 +755,14 @@ export interface SignatureDelta {
|
|
|
753
755
|
type: 'signature_delta';
|
|
754
756
|
}
|
|
755
757
|
|
|
756
|
-
export type StopReason =
|
|
758
|
+
export type StopReason =
|
|
759
|
+
| 'end_turn'
|
|
760
|
+
| 'max_tokens'
|
|
761
|
+
| 'stop_sequence'
|
|
762
|
+
| 'tool_use'
|
|
763
|
+
| 'pause_turn'
|
|
764
|
+
| 'refusal'
|
|
765
|
+
| 'model_context_window_exceeded';
|
|
757
766
|
|
|
758
767
|
export interface TextBlock {
|
|
759
768
|
/**
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.65.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.65.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.65.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.65.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|