anthropic 1.8.0 → 1.9.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.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/internal/util.rb +1 -1
  5. data/lib/anthropic/models/beta/beta_citation_config.rb +19 -0
  6. data/lib/anthropic/models/beta/beta_content_block.rb +3 -1
  7. data/lib/anthropic/models/beta/beta_content_block_param.rb +3 -1
  8. data/lib/anthropic/models/beta/beta_document_block.rb +56 -0
  9. data/lib/anthropic/models/beta/beta_message.rb +2 -2
  10. data/lib/anthropic/models/beta/beta_message_param.rb +3 -3
  11. data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +5 -3
  12. data/lib/anthropic/models/beta/beta_request_document_block.rb +2 -2
  13. data/lib/anthropic/models/beta/beta_server_tool_usage.rb +9 -1
  14. data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +1 -0
  15. data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +1 -0
  16. data/lib/anthropic/models/beta/beta_tool_result_block_param.rb +6 -4
  17. data/lib/anthropic/models/beta/beta_tool_union.rb +3 -1
  18. data/lib/anthropic/models/beta/beta_web_fetch_block.rb +42 -0
  19. data/lib/anthropic/models/beta/beta_web_fetch_block_param.rb +42 -0
  20. data/lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb +82 -0
  21. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block.rb +43 -0
  22. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rb +53 -0
  23. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rb +25 -0
  24. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rb +25 -0
  25. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rb +25 -0
  26. data/lib/anthropic/models/beta/message_count_tokens_params.rb +5 -3
  27. data/lib/anthropic/models/beta/message_create_params.rb +2 -2
  28. data/lib/anthropic/models/beta/messages/batch_create_params.rb +2 -2
  29. data/lib/anthropic/models/document_block_param.rb +2 -2
  30. data/lib/anthropic/models/tool_result_block_param.rb +6 -4
  31. data/lib/anthropic/resources/beta/messages.rb +3 -3
  32. data/lib/anthropic/version.rb +1 -1
  33. data/lib/anthropic.rb +10 -0
  34. data/rbi/anthropic/models/beta/beta_citation_config.rbi +30 -0
  35. data/rbi/anthropic/models/beta/beta_content_block.rbi +1 -0
  36. data/rbi/anthropic/models/beta/beta_content_block_param.rbi +1 -0
  37. data/rbi/anthropic/models/beta/beta_document_block.rbi +95 -0
  38. data/rbi/anthropic/models/beta/beta_message.rbi +1 -0
  39. data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +2 -0
  40. data/rbi/anthropic/models/beta/beta_request_document_block.rbi +5 -3
  41. data/rbi/anthropic/models/beta/beta_server_tool_usage.rbi +17 -2
  42. data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +5 -0
  43. data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +5 -0
  44. data/rbi/anthropic/models/beta/beta_tool_result_block_param.rbi +2 -1
  45. data/rbi/anthropic/models/beta/beta_tool_union.rbi +2 -1
  46. data/rbi/anthropic/models/beta/beta_web_fetch_block.rbi +67 -0
  47. data/rbi/anthropic/models/beta/beta_web_fetch_block_param.rbi +71 -0
  48. data/rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi +125 -0
  49. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block.rbi +81 -0
  50. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbi +109 -0
  51. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rbi +51 -0
  52. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rbi +50 -0
  53. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rbi +70 -0
  54. data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +10 -5
  55. data/rbi/anthropic/models/beta/message_create_params.rbi +8 -4
  56. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +8 -4
  57. data/rbi/anthropic/models/document_block_param.rbi +7 -3
  58. data/rbi/anthropic/models/tool_result_block_param.rbi +2 -1
  59. data/rbi/anthropic/resources/beta/messages.rbi +6 -3
  60. data/sig/anthropic/models/beta/beta_citation_config.rbs +17 -0
  61. data/sig/anthropic/models/beta/beta_content_block.rbs +1 -0
  62. data/sig/anthropic/models/beta/beta_content_block_param.rbs +1 -0
  63. data/sig/anthropic/models/beta/beta_document_block.rbs +49 -0
  64. data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +1 -0
  65. data/sig/anthropic/models/beta/beta_request_document_block.rbs +4 -8
  66. data/sig/anthropic/models/beta/beta_server_tool_usage.rbs +12 -3
  67. data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +2 -0
  68. data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +2 -0
  69. data/sig/anthropic/models/beta/beta_tool_result_block_param.rbs +1 -0
  70. data/sig/anthropic/models/beta/beta_tool_union.rbs +1 -0
  71. data/sig/anthropic/models/beta/beta_web_fetch_block.rbs +39 -0
  72. data/sig/anthropic/models/beta/beta_web_fetch_block_param.rbs +39 -0
  73. data/sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs +59 -0
  74. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_block.rbs +44 -0
  75. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbs +49 -0
  76. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rbs +29 -0
  77. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rbs +29 -0
  78. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rbs +32 -0
  79. data/sig/anthropic/models/beta/message_count_tokens_params.rbs +1 -0
  80. data/sig/anthropic/models/document_block_param.rbs +4 -8
  81. data/sig/anthropic/models/tool_result_block_param.rbs +1 -0
  82. metadata +32 -2
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anthropic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthropic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-02 00:00:00.000000000 Z
11
+ date: 2025-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool
@@ -95,6 +95,7 @@ files:
95
95
  - lib/anthropic/models/beta/beta_cache_creation.rb
96
96
  - lib/anthropic/models/beta/beta_citation_char_location.rb
97
97
  - lib/anthropic/models/beta/beta_citation_char_location_param.rb
98
+ - lib/anthropic/models/beta/beta_citation_config.rb
98
99
  - lib/anthropic/models/beta/beta_citation_content_block_location.rb
99
100
  - lib/anthropic/models/beta/beta_citation_content_block_location_param.rb
100
101
  - lib/anthropic/models/beta/beta_citation_page_location.rb
@@ -125,6 +126,7 @@ files:
125
126
  - lib/anthropic/models/beta/beta_content_block_param.rb
126
127
  - lib/anthropic/models/beta/beta_content_block_source.rb
127
128
  - lib/anthropic/models/beta/beta_content_block_source_content.rb
129
+ - lib/anthropic/models/beta/beta_document_block.rb
128
130
  - lib/anthropic/models/beta/beta_file_document_source.rb
129
131
  - lib/anthropic/models/beta/beta_file_image_source.rb
130
132
  - lib/anthropic/models/beta/beta_image_block_param.rb
@@ -201,6 +203,14 @@ files:
201
203
  - lib/anthropic/models/beta/beta_url_image_source.rb
202
204
  - lib/anthropic/models/beta/beta_url_pdf_source.rb
203
205
  - lib/anthropic/models/beta/beta_usage.rb
206
+ - lib/anthropic/models/beta/beta_web_fetch_block.rb
207
+ - lib/anthropic/models/beta/beta_web_fetch_block_param.rb
208
+ - lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb
209
+ - lib/anthropic/models/beta/beta_web_fetch_tool_result_block.rb
210
+ - lib/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rb
211
+ - lib/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rb
212
+ - lib/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rb
213
+ - lib/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rb
204
214
  - lib/anthropic/models/beta/beta_web_search_result_block.rb
205
215
  - lib/anthropic/models/beta/beta_web_search_result_block_param.rb
206
216
  - lib/anthropic/models/beta/beta_web_search_tool_20250305.rb
@@ -431,6 +441,7 @@ files:
431
441
  - rbi/anthropic/models/beta/beta_cache_creation.rbi
432
442
  - rbi/anthropic/models/beta/beta_citation_char_location.rbi
433
443
  - rbi/anthropic/models/beta/beta_citation_char_location_param.rbi
444
+ - rbi/anthropic/models/beta/beta_citation_config.rbi
434
445
  - rbi/anthropic/models/beta/beta_citation_content_block_location.rbi
435
446
  - rbi/anthropic/models/beta/beta_citation_content_block_location_param.rbi
436
447
  - rbi/anthropic/models/beta/beta_citation_page_location.rbi
@@ -461,6 +472,7 @@ files:
461
472
  - rbi/anthropic/models/beta/beta_content_block_param.rbi
462
473
  - rbi/anthropic/models/beta/beta_content_block_source.rbi
463
474
  - rbi/anthropic/models/beta/beta_content_block_source_content.rbi
475
+ - rbi/anthropic/models/beta/beta_document_block.rbi
464
476
  - rbi/anthropic/models/beta/beta_file_document_source.rbi
465
477
  - rbi/anthropic/models/beta/beta_file_image_source.rbi
466
478
  - rbi/anthropic/models/beta/beta_image_block_param.rbi
@@ -537,6 +549,14 @@ files:
537
549
  - rbi/anthropic/models/beta/beta_url_image_source.rbi
538
550
  - rbi/anthropic/models/beta/beta_url_pdf_source.rbi
539
551
  - rbi/anthropic/models/beta/beta_usage.rbi
552
+ - rbi/anthropic/models/beta/beta_web_fetch_block.rbi
553
+ - rbi/anthropic/models/beta/beta_web_fetch_block_param.rbi
554
+ - rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi
555
+ - rbi/anthropic/models/beta/beta_web_fetch_tool_result_block.rbi
556
+ - rbi/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbi
557
+ - rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rbi
558
+ - rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rbi
559
+ - rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rbi
540
560
  - rbi/anthropic/models/beta/beta_web_search_result_block.rbi
541
561
  - rbi/anthropic/models/beta/beta_web_search_result_block_param.rbi
542
562
  - rbi/anthropic/models/beta/beta_web_search_tool_20250305.rbi
@@ -758,6 +778,7 @@ files:
758
778
  - sig/anthropic/models/beta/beta_cache_creation.rbs
759
779
  - sig/anthropic/models/beta/beta_citation_char_location.rbs
760
780
  - sig/anthropic/models/beta/beta_citation_char_location_param.rbs
781
+ - sig/anthropic/models/beta/beta_citation_config.rbs
761
782
  - sig/anthropic/models/beta/beta_citation_content_block_location.rbs
762
783
  - sig/anthropic/models/beta/beta_citation_content_block_location_param.rbs
763
784
  - sig/anthropic/models/beta/beta_citation_page_location.rbs
@@ -788,6 +809,7 @@ files:
788
809
  - sig/anthropic/models/beta/beta_content_block_param.rbs
789
810
  - sig/anthropic/models/beta/beta_content_block_source.rbs
790
811
  - sig/anthropic/models/beta/beta_content_block_source_content.rbs
812
+ - sig/anthropic/models/beta/beta_document_block.rbs
791
813
  - sig/anthropic/models/beta/beta_file_document_source.rbs
792
814
  - sig/anthropic/models/beta/beta_file_image_source.rbs
793
815
  - sig/anthropic/models/beta/beta_image_block_param.rbs
@@ -864,6 +886,14 @@ files:
864
886
  - sig/anthropic/models/beta/beta_url_image_source.rbs
865
887
  - sig/anthropic/models/beta/beta_url_pdf_source.rbs
866
888
  - sig/anthropic/models/beta/beta_usage.rbs
889
+ - sig/anthropic/models/beta/beta_web_fetch_block.rbs
890
+ - sig/anthropic/models/beta/beta_web_fetch_block_param.rbs
891
+ - sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs
892
+ - sig/anthropic/models/beta/beta_web_fetch_tool_result_block.rbs
893
+ - sig/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbs
894
+ - sig/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rbs
895
+ - sig/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rbs
896
+ - sig/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rbs
867
897
  - sig/anthropic/models/beta/beta_web_search_result_block.rbs
868
898
  - sig/anthropic/models/beta/beta_web_search_result_block_param.rbs
869
899
  - sig/anthropic/models/beta/beta_web_search_tool_20250305.rbs