anthropic 1.16.1 → 1.16.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: edcd251a5f61f932cc5a80385a7bca29b541d9b4764b3c153eae0bed0cfe0d0a
4
- data.tar.gz: addb61cef3603cd07d80bc7386dc0d18efd440b2ffd39c70b6a0f3ee561141de
3
+ metadata.gz: ed35d862c36fcf182d10e3564e1e8b3033d28d50cc41722cecad9f5cefe04485
4
+ data.tar.gz: ecd043c34b77294b695b30a6c4b18ea202ab0a395ee71f60c19bbfefe1c2e820
5
5
  SHA512:
6
- metadata.gz: 11c6c2753ee93394183093d19165ddc4bab31c10cecf0557be56731e12b4db99473f68013e76af1cb14050bdf503db38bc12ee075783cb731da0e81257121da2
7
- data.tar.gz: a97a725f84deeb63c1e6481a13680cf6489b624652085501f98634810c242ff7b2fc00a2e404eb93072fceea4d3b5b9821b64255547190a3f0b73721951fb1b3
6
+ metadata.gz: 4d1d6c091b2c84079ff5ef5eb101aec169b3c39ca85a451d1ec0825bed474d8cdc7a2910f9244311e49c2064917969c3fae3e03d75f825fc8831a64d0a849ed4
7
+ data.tar.gz: 51e4e737cc87f636e52394ff615cbf563cd225031840add3fe05e01855a942735de1f51ed488ba25d2ff9a532e23b0c267972abe91021ab53aa2666ec3eb1600
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.16.3 (2026-01-05)
4
+
5
+ Full Changelog: [v1.16.2...v1.16.3](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.16.2...v1.16.3)
6
+
7
+ ### Bug Fixes
8
+
9
+ * Use proper module name for structured output parsing ([#769](https://github.com/anthropics/anthropic-sdk-ruby/issues/769)) ([fdbe433](https://github.com/anthropics/anthropic-sdk-ruby/commit/fdbe433cbcbe5a8611410338f7e0d47a727575be))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **ci:** Add Claude Code GitHub Workflow ([#772](https://github.com/anthropics/anthropic-sdk-ruby/issues/772)) ([6ebfa59](https://github.com/anthropics/anthropic-sdk-ruby/commit/6ebfa59913de26aece1d946a0cfaad168cd5f632))
15
+
16
+ ## 1.16.2 (2025-12-18)
17
+
18
+ Full Changelog: [v1.16.1...v1.16.2](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.16.1...v1.16.2)
19
+
20
+ ### Bug Fixes
21
+
22
+ * issue where json.parse errors when receiving HTTP 204 with nobody ([b453645](https://github.com/anthropics/anthropic-sdk-ruby/commit/b453645abf738e713303f53f904936a49942a86d))
23
+
3
24
  ## 1.16.1 (2025-12-16)
4
25
 
5
26
  Full Changelog: [v1.16.0...v1.16.1](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.16.0...v1.16.1)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "anthropic", "~> 1.16.1"
18
+ gem "anthropic", "~> 1.16.3"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -60,7 +60,7 @@ module Anthropic
60
60
  schema = model.to_json_schema
61
61
  Anthropic::Helpers::InputSchema::SupportedSchemas.transform_schema!(schema)
62
62
  data.update(output_format: {type: :json_schema, schema: schema})
63
- in {output_format: {schema: Anthropic::Helpers::StructuredOutput::JsonSchemaConverter => model} => output_format}
63
+ in {output_format: {schema: Anthropic::Helpers::InputSchema::JsonSchemaConverter => model} => output_format}
64
64
  name = model_name(model.name)
65
65
  models.store(name, model)
66
66
  schema = model.to_json_schema
@@ -657,7 +657,8 @@ module Anthropic
657
657
  def decode_content(headers, stream:, suppress_error: false)
658
658
  case (content_type = headers["content-type"])
659
659
  in Anthropic::Internal::Util::JSON_CONTENT
660
- json = stream.to_a.join
660
+ return nil if (json = stream.to_a.join).empty?
661
+
661
662
  begin
662
663
  JSON.parse(json, symbolize_names: true)
663
664
  rescue JSON::ParserError => e
@@ -667,7 +668,11 @@ module Anthropic
667
668
  in Anthropic::Internal::Util::JSONL_CONTENT
668
669
  lines = decode_lines(stream)
669
670
  chain_fused(lines) do |y|
670
- lines.each { y << JSON.parse(_1, symbolize_names: true) }
671
+ lines.each do
672
+ next if _1.empty?
673
+
674
+ y << JSON.parse(_1, symbolize_names: true)
675
+ end
671
676
  end
672
677
  in %r{^text/event-stream}
673
678
  lines = decode_lines(stream)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Anthropic
4
- VERSION = "1.16.1"
4
+ VERSION = "1.16.3"
5
5
  end
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.16.1
4
+ version: 1.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthropic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-17 00:00:00.000000000 Z
11
+ date: 2026-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool