anthropic 1.8.0 → 1.10.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +42 -0
- data/README.md +12 -12
- data/lib/anthropic/errors.rb +25 -11
- data/lib/anthropic/internal/page.rb +1 -1
- data/lib/anthropic/internal/stream.rb +1 -0
- data/lib/anthropic/internal/transport/base_client.rb +11 -7
- data/lib/anthropic/internal/type/base_page.rb +1 -1
- data/lib/anthropic/internal/type/base_stream.rb +9 -1
- data/lib/anthropic/internal/util.rb +3 -2
- data/lib/anthropic/models/beta/beta_citation_config.rb +19 -0
- data/lib/anthropic/models/beta/beta_clear_tool_uses_20250919_edit.rb +98 -0
- data/lib/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rb +38 -0
- data/lib/anthropic/models/beta/beta_content_block.rb +3 -1
- data/lib/anthropic/models/beta/beta_content_block_param.rb +3 -1
- data/lib/anthropic/models/beta/beta_context_management_config.rb +22 -0
- data/lib/anthropic/models/beta/beta_context_management_response.rb +23 -0
- data/lib/anthropic/models/beta/beta_count_tokens_context_management_response.rb +20 -0
- data/lib/anthropic/models/beta/beta_document_block.rb +56 -0
- data/lib/anthropic/models/beta/beta_input_tokens_clear_at_least.rb +25 -0
- data/lib/anthropic/models/beta/beta_input_tokens_trigger.rb +25 -0
- data/lib/anthropic/models/beta/beta_memory_tool_20250818.rb +40 -0
- data/lib/anthropic/models/beta/beta_memory_tool_20250818_command.rb +30 -0
- data/lib/anthropic/models/beta/beta_memory_tool_20250818_create_command.rb +36 -0
- data/lib/anthropic/models/beta/beta_memory_tool_20250818_delete_command.rb +28 -0
- data/lib/anthropic/models/beta/beta_memory_tool_20250818_insert_command.rb +44 -0
- data/lib/anthropic/models/beta/beta_memory_tool_20250818_rename_command.rb +36 -0
- data/lib/anthropic/models/beta/beta_memory_tool_20250818_str_replace_command.rb +44 -0
- data/lib/anthropic/models/beta/beta_memory_tool_20250818_view_command.rb +36 -0
- data/lib/anthropic/models/beta/beta_message.rb +11 -3
- data/lib/anthropic/models/beta/beta_message_param.rb +3 -3
- data/lib/anthropic/models/beta/beta_message_tokens_count.rb +13 -1
- data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +5 -3
- data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +9 -1
- data/lib/anthropic/models/beta/beta_request_document_block.rb +2 -2
- data/lib/anthropic/models/beta/beta_server_tool_usage.rb +9 -1
- data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +1 -0
- data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +1 -0
- data/lib/anthropic/models/beta/beta_stop_reason.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_result_block_param.rb +6 -4
- data/lib/anthropic/models/beta/beta_tool_union.rb +5 -1
- data/lib/anthropic/models/beta/beta_tool_uses_keep.rb +25 -0
- data/lib/anthropic/models/beta/beta_tool_uses_trigger.rb +25 -0
- data/lib/anthropic/models/beta/beta_web_fetch_block.rb +42 -0
- data/lib/anthropic/models/beta/beta_web_fetch_block_param.rb +42 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb +82 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block.rb +43 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rb +53 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rb +25 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rb +25 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rb +25 -0
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +16 -4
- data/lib/anthropic/models/beta/message_create_params.rb +11 -3
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +11 -3
- data/lib/anthropic/models/document_block_param.rb +2 -2
- data/lib/anthropic/models/model.rb +10 -0
- data/lib/anthropic/models/stop_reason.rb +1 -0
- data/lib/anthropic/models/tool_result_block_param.rb +6 -4
- data/lib/anthropic/resources/beta/messages.rb +12 -6
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +27 -0
- data/rbi/anthropic/errors.rbi +29 -2
- data/rbi/anthropic/internal/transport/base_client.rbi +4 -5
- data/rbi/anthropic/internal/type/base_page.rbi +1 -1
- data/rbi/anthropic/internal/type/base_stream.rbi +16 -1
- data/rbi/anthropic/internal/util.rbi +1 -1
- data/rbi/anthropic/models/beta/beta_citation_config.rbi +30 -0
- data/rbi/anthropic/models/beta/beta_clear_tool_uses_20250919_edit.rbi +183 -0
- data/rbi/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rbi +62 -0
- data/rbi/anthropic/models/beta/beta_content_block.rbi +1 -0
- data/rbi/anthropic/models/beta/beta_content_block_param.rbi +1 -0
- data/rbi/anthropic/models/beta/beta_context_management_config.rbi +56 -0
- data/rbi/anthropic/models/beta/beta_context_management_response.rbi +53 -0
- data/rbi/anthropic/models/beta/beta_count_tokens_context_management_response.rbi +35 -0
- data/rbi/anthropic/models/beta/beta_document_block.rbi +95 -0
- data/rbi/anthropic/models/beta/beta_input_tokens_clear_at_least.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_input_tokens_trigger.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_memory_tool_20250818.rbi +72 -0
- data/rbi/anthropic/models/beta/beta_memory_tool_20250818_command.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_memory_tool_20250818_create_command.rbi +53 -0
- data/rbi/anthropic/models/beta/beta_memory_tool_20250818_delete_command.rbi +41 -0
- data/rbi/anthropic/models/beta/beta_memory_tool_20250818_insert_command.rbi +69 -0
- data/rbi/anthropic/models/beta/beta_memory_tool_20250818_rename_command.rbi +55 -0
- data/rbi/anthropic/models/beta/beta_memory_tool_20250818_str_replace_command.rbi +64 -0
- data/rbi/anthropic/models/beta/beta_memory_tool_20250818_view_command.rbi +59 -0
- data/rbi/anthropic/models/beta/beta_message.rbi +21 -0
- data/rbi/anthropic/models/beta/beta_message_tokens_count.rbi +40 -2
- data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +2 -0
- data/rbi/anthropic/models/beta/beta_raw_message_delta_event.rbi +20 -0
- data/rbi/anthropic/models/beta/beta_request_document_block.rbi +5 -3
- data/rbi/anthropic/models/beta/beta_server_tool_usage.rbi +17 -2
- data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_stop_reason.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_result_block_param.rbi +2 -1
- data/rbi/anthropic/models/beta/beta_tool_union.rbi +3 -1
- data/rbi/anthropic/models/beta/beta_tool_uses_keep.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_tool_uses_trigger.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_block.rbi +67 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_block_param.rbi +71 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi +125 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block.rbi +81 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbi +109 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rbi +51 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rbi +50 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rbi +70 -0
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +33 -5
- data/rbi/anthropic/models/beta/message_create_params.rbi +30 -4
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +36 -4
- data/rbi/anthropic/models/document_block_param.rbi +7 -3
- data/rbi/anthropic/models/model.rbi +8 -0
- data/rbi/anthropic/models/stop_reason.rbi +5 -0
- data/rbi/anthropic/models/tool_result_block_param.rbi +2 -1
- data/rbi/anthropic/resources/beta/messages.rbi +21 -3
- data/sig/anthropic/errors.rbs +7 -0
- data/sig/anthropic/internal/type/base_stream.rbs +5 -0
- data/sig/anthropic/models/beta/beta_citation_config.rbs +17 -0
- data/sig/anthropic/models/beta/beta_clear_tool_uses_20250919_edit.rbs +77 -0
- data/sig/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rbs +34 -0
- data/sig/anthropic/models/beta/beta_content_block.rbs +1 -0
- data/sig/anthropic/models/beta/beta_content_block_param.rbs +1 -0
- data/sig/anthropic/models/beta/beta_context_management_config.rbs +26 -0
- data/sig/anthropic/models/beta/beta_context_management_response.rbs +24 -0
- data/sig/anthropic/models/beta/beta_count_tokens_context_management_response.rbs +18 -0
- data/sig/anthropic/models/beta/beta_document_block.rbs +49 -0
- data/sig/anthropic/models/beta/beta_input_tokens_clear_at_least.rbs +20 -0
- data/sig/anthropic/models/beta/beta_input_tokens_trigger.rbs +19 -0
- data/sig/anthropic/models/beta/beta_memory_tool_20250818.rbs +34 -0
- data/sig/anthropic/models/beta/beta_memory_tool_20250818_command.rbs +21 -0
- data/sig/anthropic/models/beta/beta_memory_tool_20250818_create_command.rbs +26 -0
- data/sig/anthropic/models/beta/beta_memory_tool_20250818_delete_command.rbs +20 -0
- data/sig/anthropic/models/beta/beta_memory_tool_20250818_insert_command.rbs +39 -0
- data/sig/anthropic/models/beta/beta_memory_tool_20250818_rename_command.rbs +26 -0
- data/sig/anthropic/models/beta/beta_memory_tool_20250818_str_replace_command.rbs +39 -0
- data/sig/anthropic/models/beta/beta_memory_tool_20250818_view_command.rbs +32 -0
- data/sig/anthropic/models/beta/beta_message.rbs +5 -0
- data/sig/anthropic/models/beta/beta_message_tokens_count.rbs +15 -3
- data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +1 -0
- data/sig/anthropic/models/beta/beta_raw_message_delta_event.rbs +5 -0
- data/sig/anthropic/models/beta/beta_request_document_block.rbs +4 -8
- data/sig/anthropic/models/beta/beta_server_tool_usage.rbs +12 -3
- data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +2 -0
- data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +2 -0
- data/sig/anthropic/models/beta/beta_stop_reason.rbs +2 -0
- data/sig/anthropic/models/beta/beta_tool_result_block_param.rbs +1 -0
- data/sig/anthropic/models/beta/beta_tool_union.rbs +2 -0
- data/sig/anthropic/models/beta/beta_tool_uses_keep.rbs +19 -0
- data/sig/anthropic/models/beta/beta_tool_uses_trigger.rbs +19 -0
- data/sig/anthropic/models/beta/beta_web_fetch_block.rbs +39 -0
- data/sig/anthropic/models/beta/beta_web_fetch_block_param.rbs +39 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs +59 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_result_block.rbs +44 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbs +49 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rbs +29 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rbs +29 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rbs +32 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +7 -0
- data/sig/anthropic/models/beta/message_create_params.rbs +5 -0
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +5 -0
- data/sig/anthropic/models/document_block_param.rbs +4 -8
- data/sig/anthropic/models/model.rbs +8 -0
- data/sig/anthropic/models/stop_reason.rbs +2 -0
- data/sig/anthropic/models/tool_result_block_param.rbs +1 -0
- data/sig/anthropic/resources/beta/messages.rbs +3 -0
- metadata +83 -2
|
@@ -89,6 +89,18 @@ module Anthropic
|
|
|
89
89
|
sig { returns(T.any(Anthropic::Model::OrSymbol, String)) }
|
|
90
90
|
attr_accessor :model
|
|
91
91
|
|
|
92
|
+
# Configuration for context management operations.
|
|
93
|
+
sig { returns(T.nilable(Anthropic::Beta::BetaContextManagementConfig)) }
|
|
94
|
+
attr_reader :context_management
|
|
95
|
+
|
|
96
|
+
sig do
|
|
97
|
+
params(
|
|
98
|
+
context_management:
|
|
99
|
+
T.nilable(Anthropic::Beta::BetaContextManagementConfig::OrHash)
|
|
100
|
+
).void
|
|
101
|
+
end
|
|
102
|
+
attr_writer :context_management
|
|
103
|
+
|
|
92
104
|
# MCP servers to be utilized in this request
|
|
93
105
|
sig do
|
|
94
106
|
returns(
|
|
@@ -277,12 +289,14 @@ module Anthropic
|
|
|
277
289
|
Anthropic::Beta::BetaCodeExecutionTool20250522,
|
|
278
290
|
Anthropic::Beta::BetaCodeExecutionTool20250825,
|
|
279
291
|
Anthropic::Beta::BetaToolComputerUse20241022,
|
|
292
|
+
Anthropic::Beta::BetaMemoryTool20250818,
|
|
280
293
|
Anthropic::Beta::BetaToolComputerUse20250124,
|
|
281
294
|
Anthropic::Beta::BetaToolTextEditor20241022,
|
|
282
295
|
Anthropic::Beta::BetaToolTextEditor20250124,
|
|
283
296
|
Anthropic::Beta::BetaToolTextEditor20250429,
|
|
284
297
|
Anthropic::Beta::BetaToolTextEditor20250728,
|
|
285
|
-
Anthropic::Beta::BetaWebSearchTool20250305
|
|
298
|
+
Anthropic::Beta::BetaWebSearchTool20250305,
|
|
299
|
+
Anthropic::Beta::BetaWebFetchTool20250910
|
|
286
300
|
)
|
|
287
301
|
]
|
|
288
302
|
)
|
|
@@ -301,12 +315,14 @@ module Anthropic
|
|
|
301
315
|
Anthropic::Beta::BetaCodeExecutionTool20250522::OrHash,
|
|
302
316
|
Anthropic::Beta::BetaCodeExecutionTool20250825::OrHash,
|
|
303
317
|
Anthropic::Beta::BetaToolComputerUse20241022::OrHash,
|
|
318
|
+
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
304
319
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
305
320
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
306
321
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
307
322
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
308
323
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
309
|
-
Anthropic::Beta::BetaWebSearchTool20250305::OrHash
|
|
324
|
+
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
325
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
310
326
|
)
|
|
311
327
|
]
|
|
312
328
|
).void
|
|
@@ -334,6 +350,8 @@ module Anthropic
|
|
|
334
350
|
params(
|
|
335
351
|
messages: T::Array[Anthropic::Beta::BetaMessageParam::OrHash],
|
|
336
352
|
model: T.any(Anthropic::Model::OrSymbol, String),
|
|
353
|
+
context_management:
|
|
354
|
+
T.nilable(Anthropic::Beta::BetaContextManagementConfig::OrHash),
|
|
337
355
|
mcp_servers:
|
|
338
356
|
T::Array[
|
|
339
357
|
Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
|
|
@@ -361,12 +379,14 @@ module Anthropic
|
|
|
361
379
|
Anthropic::Beta::BetaCodeExecutionTool20250522::OrHash,
|
|
362
380
|
Anthropic::Beta::BetaCodeExecutionTool20250825::OrHash,
|
|
363
381
|
Anthropic::Beta::BetaToolComputerUse20241022::OrHash,
|
|
382
|
+
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
364
383
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
365
384
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
366
385
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
367
386
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
368
387
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
369
|
-
Anthropic::Beta::BetaWebSearchTool20250305::OrHash
|
|
388
|
+
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
389
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
370
390
|
)
|
|
371
391
|
],
|
|
372
392
|
betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
|
|
@@ -444,6 +464,8 @@ module Anthropic
|
|
|
444
464
|
# [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
445
465
|
# details and options.
|
|
446
466
|
model:,
|
|
467
|
+
# Configuration for context management operations.
|
|
468
|
+
context_management: nil,
|
|
447
469
|
# MCP servers to be utilized in this request
|
|
448
470
|
mcp_servers: nil,
|
|
449
471
|
# System prompt.
|
|
@@ -552,6 +574,8 @@ module Anthropic
|
|
|
552
574
|
{
|
|
553
575
|
messages: T::Array[Anthropic::Beta::BetaMessageParam],
|
|
554
576
|
model: T.any(Anthropic::Model::OrSymbol, String),
|
|
577
|
+
context_management:
|
|
578
|
+
T.nilable(Anthropic::Beta::BetaContextManagementConfig),
|
|
555
579
|
mcp_servers:
|
|
556
580
|
T::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
557
581
|
system_:
|
|
@@ -577,12 +601,14 @@ module Anthropic
|
|
|
577
601
|
Anthropic::Beta::BetaCodeExecutionTool20250522,
|
|
578
602
|
Anthropic::Beta::BetaCodeExecutionTool20250825,
|
|
579
603
|
Anthropic::Beta::BetaToolComputerUse20241022,
|
|
604
|
+
Anthropic::Beta::BetaMemoryTool20250818,
|
|
580
605
|
Anthropic::Beta::BetaToolComputerUse20250124,
|
|
581
606
|
Anthropic::Beta::BetaToolTextEditor20241022,
|
|
582
607
|
Anthropic::Beta::BetaToolTextEditor20250124,
|
|
583
608
|
Anthropic::Beta::BetaToolTextEditor20250429,
|
|
584
609
|
Anthropic::Beta::BetaToolTextEditor20250728,
|
|
585
|
-
Anthropic::Beta::BetaWebSearchTool20250305
|
|
610
|
+
Anthropic::Beta::BetaWebSearchTool20250305,
|
|
611
|
+
Anthropic::Beta::BetaWebFetchTool20250910
|
|
586
612
|
)
|
|
587
613
|
],
|
|
588
614
|
betas:
|
|
@@ -638,12 +664,14 @@ module Anthropic
|
|
|
638
664
|
Anthropic::Beta::BetaCodeExecutionTool20250522,
|
|
639
665
|
Anthropic::Beta::BetaCodeExecutionTool20250825,
|
|
640
666
|
Anthropic::Beta::BetaToolComputerUse20241022,
|
|
667
|
+
Anthropic::Beta::BetaMemoryTool20250818,
|
|
641
668
|
Anthropic::Beta::BetaToolComputerUse20250124,
|
|
642
669
|
Anthropic::Beta::BetaToolTextEditor20241022,
|
|
643
670
|
Anthropic::Beta::BetaToolTextEditor20250124,
|
|
644
671
|
Anthropic::Beta::BetaToolTextEditor20250429,
|
|
645
672
|
Anthropic::Beta::BetaToolTextEditor20250728,
|
|
646
|
-
Anthropic::Beta::BetaWebSearchTool20250305
|
|
673
|
+
Anthropic::Beta::BetaWebSearchTool20250305,
|
|
674
|
+
Anthropic::Beta::BetaWebFetchTool20250910
|
|
647
675
|
)
|
|
648
676
|
end
|
|
649
677
|
|
|
@@ -103,6 +103,18 @@ module Anthropic
|
|
|
103
103
|
sig { returns(T.nilable(String)) }
|
|
104
104
|
attr_accessor :container
|
|
105
105
|
|
|
106
|
+
# Configuration for context management operations.
|
|
107
|
+
sig { returns(T.nilable(Anthropic::Beta::BetaContextManagementConfig)) }
|
|
108
|
+
attr_reader :context_management
|
|
109
|
+
|
|
110
|
+
sig do
|
|
111
|
+
params(
|
|
112
|
+
context_management:
|
|
113
|
+
T.nilable(Anthropic::Beta::BetaContextManagementConfig::OrHash)
|
|
114
|
+
).void
|
|
115
|
+
end
|
|
116
|
+
attr_writer :context_management
|
|
117
|
+
|
|
106
118
|
# MCP servers to be utilized in this request
|
|
107
119
|
sig do
|
|
108
120
|
returns(
|
|
@@ -347,12 +359,14 @@ module Anthropic
|
|
|
347
359
|
Anthropic::Beta::BetaCodeExecutionTool20250522,
|
|
348
360
|
Anthropic::Beta::BetaCodeExecutionTool20250825,
|
|
349
361
|
Anthropic::Beta::BetaToolComputerUse20241022,
|
|
362
|
+
Anthropic::Beta::BetaMemoryTool20250818,
|
|
350
363
|
Anthropic::Beta::BetaToolComputerUse20250124,
|
|
351
364
|
Anthropic::Beta::BetaToolTextEditor20241022,
|
|
352
365
|
Anthropic::Beta::BetaToolTextEditor20250124,
|
|
353
366
|
Anthropic::Beta::BetaToolTextEditor20250429,
|
|
354
367
|
Anthropic::Beta::BetaToolTextEditor20250728,
|
|
355
|
-
Anthropic::Beta::BetaWebSearchTool20250305
|
|
368
|
+
Anthropic::Beta::BetaWebSearchTool20250305,
|
|
369
|
+
Anthropic::Beta::BetaWebFetchTool20250910
|
|
356
370
|
)
|
|
357
371
|
]
|
|
358
372
|
)
|
|
@@ -371,12 +385,14 @@ module Anthropic
|
|
|
371
385
|
Anthropic::Beta::BetaCodeExecutionTool20250522::OrHash,
|
|
372
386
|
Anthropic::Beta::BetaCodeExecutionTool20250825::OrHash,
|
|
373
387
|
Anthropic::Beta::BetaToolComputerUse20241022::OrHash,
|
|
388
|
+
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
374
389
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
375
390
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
376
391
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
377
392
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
378
393
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
379
|
-
Anthropic::Beta::BetaWebSearchTool20250305::OrHash
|
|
394
|
+
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
395
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
380
396
|
)
|
|
381
397
|
]
|
|
382
398
|
).void
|
|
@@ -434,6 +450,8 @@ module Anthropic
|
|
|
434
450
|
messages: T::Array[Anthropic::Beta::BetaMessageParam::OrHash],
|
|
435
451
|
model: T.any(Anthropic::Model::OrSymbol, String),
|
|
436
452
|
container: T.nilable(String),
|
|
453
|
+
context_management:
|
|
454
|
+
T.nilable(Anthropic::Beta::BetaContextManagementConfig::OrHash),
|
|
437
455
|
mcp_servers:
|
|
438
456
|
T::Array[
|
|
439
457
|
Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
|
|
@@ -465,12 +483,14 @@ module Anthropic
|
|
|
465
483
|
Anthropic::Beta::BetaCodeExecutionTool20250522::OrHash,
|
|
466
484
|
Anthropic::Beta::BetaCodeExecutionTool20250825::OrHash,
|
|
467
485
|
Anthropic::Beta::BetaToolComputerUse20241022::OrHash,
|
|
486
|
+
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
468
487
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
469
488
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
470
489
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
471
490
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
472
491
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
473
|
-
Anthropic::Beta::BetaWebSearchTool20250305::OrHash
|
|
492
|
+
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
493
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
474
494
|
)
|
|
475
495
|
],
|
|
476
496
|
top_k: Integer,
|
|
@@ -560,6 +580,8 @@ module Anthropic
|
|
|
560
580
|
model:,
|
|
561
581
|
# Container identifier for reuse across requests.
|
|
562
582
|
container: nil,
|
|
583
|
+
# Configuration for context management operations.
|
|
584
|
+
context_management: nil,
|
|
563
585
|
# MCP servers to be utilized in this request
|
|
564
586
|
mcp_servers: nil,
|
|
565
587
|
# An object describing metadata about the request.
|
|
@@ -715,6 +737,8 @@ module Anthropic
|
|
|
715
737
|
messages: T::Array[Anthropic::Beta::BetaMessageParam],
|
|
716
738
|
model: T.any(Anthropic::Model::OrSymbol, String),
|
|
717
739
|
container: T.nilable(String),
|
|
740
|
+
context_management:
|
|
741
|
+
T.nilable(Anthropic::Beta::BetaContextManagementConfig),
|
|
718
742
|
mcp_servers:
|
|
719
743
|
T::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
720
744
|
metadata: Anthropic::Beta::BetaMetadata,
|
|
@@ -744,12 +768,14 @@ module Anthropic
|
|
|
744
768
|
Anthropic::Beta::BetaCodeExecutionTool20250522,
|
|
745
769
|
Anthropic::Beta::BetaCodeExecutionTool20250825,
|
|
746
770
|
Anthropic::Beta::BetaToolComputerUse20241022,
|
|
771
|
+
Anthropic::Beta::BetaMemoryTool20250818,
|
|
747
772
|
Anthropic::Beta::BetaToolComputerUse20250124,
|
|
748
773
|
Anthropic::Beta::BetaToolTextEditor20241022,
|
|
749
774
|
Anthropic::Beta::BetaToolTextEditor20250124,
|
|
750
775
|
Anthropic::Beta::BetaToolTextEditor20250429,
|
|
751
776
|
Anthropic::Beta::BetaToolTextEditor20250728,
|
|
752
|
-
Anthropic::Beta::BetaWebSearchTool20250305
|
|
777
|
+
Anthropic::Beta::BetaWebSearchTool20250305,
|
|
778
|
+
Anthropic::Beta::BetaWebFetchTool20250910
|
|
753
779
|
)
|
|
754
780
|
],
|
|
755
781
|
top_k: Integer,
|
|
@@ -244,6 +244,22 @@ module Anthropic
|
|
|
244
244
|
sig { returns(T.nilable(String)) }
|
|
245
245
|
attr_accessor :container
|
|
246
246
|
|
|
247
|
+
# Configuration for context management operations.
|
|
248
|
+
sig do
|
|
249
|
+
returns(T.nilable(Anthropic::Beta::BetaContextManagementConfig))
|
|
250
|
+
end
|
|
251
|
+
attr_reader :context_management
|
|
252
|
+
|
|
253
|
+
sig do
|
|
254
|
+
params(
|
|
255
|
+
context_management:
|
|
256
|
+
T.nilable(
|
|
257
|
+
Anthropic::Beta::BetaContextManagementConfig::OrHash
|
|
258
|
+
)
|
|
259
|
+
).void
|
|
260
|
+
end
|
|
261
|
+
attr_writer :context_management
|
|
262
|
+
|
|
247
263
|
# MCP servers to be utilized in this request
|
|
248
264
|
sig do
|
|
249
265
|
returns(
|
|
@@ -503,12 +519,14 @@ module Anthropic
|
|
|
503
519
|
Anthropic::Beta::BetaCodeExecutionTool20250522,
|
|
504
520
|
Anthropic::Beta::BetaCodeExecutionTool20250825,
|
|
505
521
|
Anthropic::Beta::BetaToolComputerUse20241022,
|
|
522
|
+
Anthropic::Beta::BetaMemoryTool20250818,
|
|
506
523
|
Anthropic::Beta::BetaToolComputerUse20250124,
|
|
507
524
|
Anthropic::Beta::BetaToolTextEditor20241022,
|
|
508
525
|
Anthropic::Beta::BetaToolTextEditor20250124,
|
|
509
526
|
Anthropic::Beta::BetaToolTextEditor20250429,
|
|
510
527
|
Anthropic::Beta::BetaToolTextEditor20250728,
|
|
511
|
-
Anthropic::Beta::BetaWebSearchTool20250305
|
|
528
|
+
Anthropic::Beta::BetaWebSearchTool20250305,
|
|
529
|
+
Anthropic::Beta::BetaWebFetchTool20250910
|
|
512
530
|
)
|
|
513
531
|
]
|
|
514
532
|
)
|
|
@@ -527,12 +545,14 @@ module Anthropic
|
|
|
527
545
|
Anthropic::Beta::BetaCodeExecutionTool20250522::OrHash,
|
|
528
546
|
Anthropic::Beta::BetaCodeExecutionTool20250825::OrHash,
|
|
529
547
|
Anthropic::Beta::BetaToolComputerUse20241022::OrHash,
|
|
548
|
+
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
530
549
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
531
550
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
532
551
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
533
552
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
534
553
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
535
|
-
Anthropic::Beta::BetaWebSearchTool20250305::OrHash
|
|
554
|
+
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
555
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
536
556
|
)
|
|
537
557
|
]
|
|
538
558
|
).void
|
|
@@ -577,6 +597,10 @@ module Anthropic
|
|
|
577
597
|
messages: T::Array[Anthropic::Beta::BetaMessageParam::OrHash],
|
|
578
598
|
model: T.any(Anthropic::Model::OrSymbol, String),
|
|
579
599
|
container: T.nilable(String),
|
|
600
|
+
context_management:
|
|
601
|
+
T.nilable(
|
|
602
|
+
Anthropic::Beta::BetaContextManagementConfig::OrHash
|
|
603
|
+
),
|
|
580
604
|
mcp_servers:
|
|
581
605
|
T::Array[
|
|
582
606
|
Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
|
|
@@ -610,12 +634,14 @@ module Anthropic
|
|
|
610
634
|
Anthropic::Beta::BetaCodeExecutionTool20250522::OrHash,
|
|
611
635
|
Anthropic::Beta::BetaCodeExecutionTool20250825::OrHash,
|
|
612
636
|
Anthropic::Beta::BetaToolComputerUse20241022::OrHash,
|
|
637
|
+
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
613
638
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
614
639
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
615
640
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
616
641
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
617
642
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
618
|
-
Anthropic::Beta::BetaWebSearchTool20250305::OrHash
|
|
643
|
+
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
644
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
619
645
|
)
|
|
620
646
|
],
|
|
621
647
|
top_k: Integer,
|
|
@@ -703,6 +729,8 @@ module Anthropic
|
|
|
703
729
|
model:,
|
|
704
730
|
# Container identifier for reuse across requests.
|
|
705
731
|
container: nil,
|
|
732
|
+
# Configuration for context management operations.
|
|
733
|
+
context_management: nil,
|
|
706
734
|
# MCP servers to be utilized in this request
|
|
707
735
|
mcp_servers: nil,
|
|
708
736
|
# An object describing metadata about the request.
|
|
@@ -860,6 +888,8 @@ module Anthropic
|
|
|
860
888
|
messages: T::Array[Anthropic::Beta::BetaMessageParam],
|
|
861
889
|
model: T.any(Anthropic::Model::OrSymbol, String),
|
|
862
890
|
container: T.nilable(String),
|
|
891
|
+
context_management:
|
|
892
|
+
T.nilable(Anthropic::Beta::BetaContextManagementConfig),
|
|
863
893
|
mcp_servers:
|
|
864
894
|
T::Array[
|
|
865
895
|
Anthropic::Beta::BetaRequestMCPServerURLDefinition
|
|
@@ -893,12 +923,14 @@ module Anthropic
|
|
|
893
923
|
Anthropic::Beta::BetaCodeExecutionTool20250522,
|
|
894
924
|
Anthropic::Beta::BetaCodeExecutionTool20250825,
|
|
895
925
|
Anthropic::Beta::BetaToolComputerUse20241022,
|
|
926
|
+
Anthropic::Beta::BetaMemoryTool20250818,
|
|
896
927
|
Anthropic::Beta::BetaToolComputerUse20250124,
|
|
897
928
|
Anthropic::Beta::BetaToolTextEditor20241022,
|
|
898
929
|
Anthropic::Beta::BetaToolTextEditor20250124,
|
|
899
930
|
Anthropic::Beta::BetaToolTextEditor20250429,
|
|
900
931
|
Anthropic::Beta::BetaToolTextEditor20250728,
|
|
901
|
-
Anthropic::Beta::BetaWebSearchTool20250305
|
|
932
|
+
Anthropic::Beta::BetaWebSearchTool20250305,
|
|
933
|
+
Anthropic::Beta::BetaWebFetchTool20250910
|
|
902
934
|
)
|
|
903
935
|
],
|
|
904
936
|
top_k: Integer,
|
|
@@ -37,7 +37,11 @@ module Anthropic
|
|
|
37
37
|
sig { returns(T.nilable(Anthropic::CitationsConfigParam)) }
|
|
38
38
|
attr_reader :citations
|
|
39
39
|
|
|
40
|
-
sig
|
|
40
|
+
sig do
|
|
41
|
+
params(
|
|
42
|
+
citations: T.nilable(Anthropic::CitationsConfigParam::OrHash)
|
|
43
|
+
).void
|
|
44
|
+
end
|
|
41
45
|
attr_writer :citations
|
|
42
46
|
|
|
43
47
|
sig { returns(T.nilable(String)) }
|
|
@@ -56,7 +60,7 @@ module Anthropic
|
|
|
56
60
|
Anthropic::URLPDFSource::OrHash
|
|
57
61
|
),
|
|
58
62
|
cache_control: T.nilable(Anthropic::CacheControlEphemeral::OrHash),
|
|
59
|
-
citations: Anthropic::CitationsConfigParam::OrHash,
|
|
63
|
+
citations: T.nilable(Anthropic::CitationsConfigParam::OrHash),
|
|
60
64
|
context: T.nilable(String),
|
|
61
65
|
title: T.nilable(String),
|
|
62
66
|
type: Symbol
|
|
@@ -85,7 +89,7 @@ module Anthropic
|
|
|
85
89
|
),
|
|
86
90
|
type: Symbol,
|
|
87
91
|
cache_control: T.nilable(Anthropic::CacheControlEphemeral),
|
|
88
|
-
citations: Anthropic::CitationsConfigParam,
|
|
92
|
+
citations: T.nilable(Anthropic::CitationsConfigParam),
|
|
89
93
|
context: T.nilable(String),
|
|
90
94
|
title: T.nilable(String)
|
|
91
95
|
}
|
|
@@ -45,6 +45,14 @@ module Anthropic
|
|
|
45
45
|
CLAUDE_4_SONNET_20250514 =
|
|
46
46
|
T.let(:"claude-4-sonnet-20250514", Anthropic::Model::TaggedSymbol)
|
|
47
47
|
|
|
48
|
+
# Our best model for real-world agents and coding
|
|
49
|
+
CLAUDE_SONNET_4_5 =
|
|
50
|
+
T.let(:"claude-sonnet-4-5", Anthropic::Model::TaggedSymbol)
|
|
51
|
+
|
|
52
|
+
# Our best model for real-world agents and coding
|
|
53
|
+
CLAUDE_SONNET_4_5_20250929 =
|
|
54
|
+
T.let(:"claude-sonnet-4-5-20250929", Anthropic::Model::TaggedSymbol)
|
|
55
|
+
|
|
48
56
|
# Our previous most intelligent model
|
|
49
57
|
CLAUDE_3_5_SONNET_LATEST =
|
|
50
58
|
T.let(:"claude-3-5-sonnet-latest", Anthropic::Model::TaggedSymbol)
|
|
@@ -14,6 +14,11 @@ module Anthropic
|
|
|
14
14
|
TOOL_USE = T.let(:tool_use, Anthropic::StopReason::TaggedSymbol)
|
|
15
15
|
PAUSE_TURN = T.let(:pause_turn, Anthropic::StopReason::TaggedSymbol)
|
|
16
16
|
REFUSAL = T.let(:refusal, Anthropic::StopReason::TaggedSymbol)
|
|
17
|
+
MODEL_CONTEXT_WINDOW_EXCEEDED =
|
|
18
|
+
T.let(
|
|
19
|
+
:model_context_window_exceeded,
|
|
20
|
+
Anthropic::StopReason::TaggedSymbol
|
|
21
|
+
)
|
|
17
22
|
|
|
18
23
|
sig { override.returns(T::Array[Anthropic::StopReason::TaggedSymbol]) }
|
|
19
24
|
def self.values
|
|
@@ -22,6 +22,8 @@ module Anthropic
|
|
|
22
22
|
messages: T::Array[Anthropic::Beta::BetaMessageParam::OrHash],
|
|
23
23
|
model: T.any(Anthropic::Model::OrSymbol, String),
|
|
24
24
|
container: T.nilable(String),
|
|
25
|
+
context_management:
|
|
26
|
+
T.nilable(Anthropic::Beta::BetaContextManagementConfig::OrHash),
|
|
25
27
|
mcp_servers:
|
|
26
28
|
T::Array[
|
|
27
29
|
Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
|
|
@@ -53,12 +55,14 @@ module Anthropic
|
|
|
53
55
|
Anthropic::Beta::BetaCodeExecutionTool20250522::OrHash,
|
|
54
56
|
Anthropic::Beta::BetaCodeExecutionTool20250825::OrHash,
|
|
55
57
|
Anthropic::Beta::BetaToolComputerUse20241022::OrHash,
|
|
58
|
+
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
56
59
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
57
60
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
58
61
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
59
62
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
60
63
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
61
|
-
Anthropic::Beta::BetaWebSearchTool20250305::OrHash
|
|
64
|
+
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
65
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
62
66
|
)
|
|
63
67
|
],
|
|
64
68
|
top_k: Integer,
|
|
@@ -149,6 +153,8 @@ module Anthropic
|
|
|
149
153
|
model:,
|
|
150
154
|
# Body param: Container identifier for reuse across requests.
|
|
151
155
|
container: nil,
|
|
156
|
+
# Body param: Configuration for context management operations.
|
|
157
|
+
context_management: nil,
|
|
152
158
|
# Body param: MCP servers to be utilized in this request
|
|
153
159
|
mcp_servers: nil,
|
|
154
160
|
# Body param: An object describing metadata about the request.
|
|
@@ -315,6 +321,8 @@ module Anthropic
|
|
|
315
321
|
messages: T::Array[Anthropic::Beta::BetaMessageParam::OrHash],
|
|
316
322
|
model: T.any(Anthropic::Model::OrSymbol, String),
|
|
317
323
|
container: T.nilable(String),
|
|
324
|
+
context_management:
|
|
325
|
+
T.nilable(Anthropic::Beta::BetaContextManagementConfig::OrHash),
|
|
318
326
|
mcp_servers:
|
|
319
327
|
T::Array[
|
|
320
328
|
Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
|
|
@@ -346,12 +354,14 @@ module Anthropic
|
|
|
346
354
|
Anthropic::Beta::BetaCodeExecutionTool20250522::OrHash,
|
|
347
355
|
Anthropic::Beta::BetaCodeExecutionTool20250825::OrHash,
|
|
348
356
|
Anthropic::Beta::BetaToolComputerUse20241022::OrHash,
|
|
357
|
+
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
349
358
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
350
359
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
351
360
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
352
361
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
353
362
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
354
|
-
Anthropic::Beta::BetaWebSearchTool20250305::OrHash
|
|
363
|
+
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
364
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
355
365
|
)
|
|
356
366
|
],
|
|
357
367
|
top_k: Integer,
|
|
@@ -446,6 +456,8 @@ module Anthropic
|
|
|
446
456
|
model:,
|
|
447
457
|
# Body param: Container identifier for reuse across requests.
|
|
448
458
|
container: nil,
|
|
459
|
+
# Body param: Configuration for context management operations.
|
|
460
|
+
context_management: nil,
|
|
449
461
|
# Body param: MCP servers to be utilized in this request
|
|
450
462
|
mcp_servers: nil,
|
|
451
463
|
# Body param: An object describing metadata about the request.
|
|
@@ -608,6 +620,8 @@ module Anthropic
|
|
|
608
620
|
params(
|
|
609
621
|
messages: T::Array[Anthropic::Beta::BetaMessageParam::OrHash],
|
|
610
622
|
model: T.any(Anthropic::Model::OrSymbol, String),
|
|
623
|
+
context_management:
|
|
624
|
+
T.nilable(Anthropic::Beta::BetaContextManagementConfig::OrHash),
|
|
611
625
|
mcp_servers:
|
|
612
626
|
T::Array[
|
|
613
627
|
Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
|
|
@@ -635,12 +649,14 @@ module Anthropic
|
|
|
635
649
|
Anthropic::Beta::BetaCodeExecutionTool20250522::OrHash,
|
|
636
650
|
Anthropic::Beta::BetaCodeExecutionTool20250825::OrHash,
|
|
637
651
|
Anthropic::Beta::BetaToolComputerUse20241022::OrHash,
|
|
652
|
+
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
638
653
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
639
654
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
640
655
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
641
656
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
642
657
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
643
|
-
Anthropic::Beta::BetaWebSearchTool20250305::OrHash
|
|
658
|
+
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
659
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
644
660
|
)
|
|
645
661
|
],
|
|
646
662
|
betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
|
|
@@ -718,6 +734,8 @@ module Anthropic
|
|
|
718
734
|
# [models](https://docs.anthropic.com/en/docs/models-overview) for additional
|
|
719
735
|
# details and options.
|
|
720
736
|
model:,
|
|
737
|
+
# Body param: Configuration for context management operations.
|
|
738
|
+
context_management: nil,
|
|
721
739
|
# Body param: MCP servers to be utilized in this request
|
|
722
740
|
mcp_servers: nil,
|
|
723
741
|
# Body param: System prompt.
|
data/sig/anthropic/errors.rbs
CHANGED
|
@@ -21,11 +21,14 @@ module Anthropic
|
|
|
21
21
|
|
|
22
22
|
attr_accessor status: Integer?
|
|
23
23
|
|
|
24
|
+
attr_accessor headers: ::Hash[String, String]?
|
|
25
|
+
|
|
24
26
|
attr_accessor body: top?
|
|
25
27
|
|
|
26
28
|
def initialize: (
|
|
27
29
|
url: URI::Generic,
|
|
28
30
|
?status: Integer?,
|
|
31
|
+
?headers: ::Hash[String, String]?,
|
|
29
32
|
?body: Object?,
|
|
30
33
|
?request: nil,
|
|
31
34
|
?response: nil,
|
|
@@ -37,6 +40,7 @@ module Anthropic
|
|
|
37
40
|
def initialize: (
|
|
38
41
|
url: URI::Generic,
|
|
39
42
|
?status: nil,
|
|
43
|
+
?headers: ::Hash[String, String]?,
|
|
40
44
|
?body: nil,
|
|
41
45
|
?request: nil,
|
|
42
46
|
?response: nil,
|
|
@@ -48,6 +52,7 @@ module Anthropic
|
|
|
48
52
|
def initialize: (
|
|
49
53
|
url: URI::Generic,
|
|
50
54
|
?status: nil,
|
|
55
|
+
?headers: ::Hash[String, String]?,
|
|
51
56
|
?body: nil,
|
|
52
57
|
?request: nil,
|
|
53
58
|
?response: nil,
|
|
@@ -59,6 +64,7 @@ module Anthropic
|
|
|
59
64
|
def self.for: (
|
|
60
65
|
url: URI::Generic,
|
|
61
66
|
status: Integer,
|
|
67
|
+
headers: ::Hash[String, String]?,
|
|
62
68
|
body: Object?,
|
|
63
69
|
request: nil,
|
|
64
70
|
response: nil,
|
|
@@ -68,6 +74,7 @@ module Anthropic
|
|
|
68
74
|
def initialize: (
|
|
69
75
|
url: URI::Generic,
|
|
70
76
|
status: Integer,
|
|
77
|
+
headers: ::Hash[String, String]?,
|
|
71
78
|
body: Object?,
|
|
72
79
|
request: nil,
|
|
73
80
|
response: nil,
|
|
@@ -8,6 +8,10 @@ module Anthropic
|
|
|
8
8
|
Enumerable[top] stream
|
|
9
9
|
) -> (^(Integer arg0) -> void)
|
|
10
10
|
|
|
11
|
+
attr_reader status: Integer
|
|
12
|
+
|
|
13
|
+
attr_reader headers: ::Hash[String, String]
|
|
14
|
+
|
|
11
15
|
def close: -> void
|
|
12
16
|
|
|
13
17
|
private def iterator: -> Enumerable[Elem]
|
|
@@ -22,6 +26,7 @@ module Anthropic
|
|
|
22
26
|
model: Class | Anthropic::Internal::Type::Converter,
|
|
23
27
|
url: URI::Generic,
|
|
24
28
|
status: Integer,
|
|
29
|
+
headers: ::Hash[String, String],
|
|
25
30
|
response: top,
|
|
26
31
|
unwrap: Symbol
|
|
27
32
|
| Integer
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
class BetaCitationConfig = Beta::BetaCitationConfig
|
|
4
|
+
|
|
5
|
+
module Beta
|
|
6
|
+
type beta_citation_config = { enabled: bool }
|
|
7
|
+
|
|
8
|
+
class BetaCitationConfig < Anthropic::Internal::Type::BaseModel
|
|
9
|
+
attr_accessor enabled: bool
|
|
10
|
+
|
|
11
|
+
def initialize: (enabled: bool) -> void
|
|
12
|
+
|
|
13
|
+
def to_hash: -> { enabled: bool }
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|