anthropic 1.16.1 → 1.16.2

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: 9f79aa8143b09a8650a0e0a6c0a779ac5e172b68e495f3891f670a5c4fb5f47d
4
+ data.tar.gz: 80176ee66b3a15cd52163e81537501e024f2dd4afb9584ae0718bfb48b64514d
5
5
  SHA512:
6
- metadata.gz: 11c6c2753ee93394183093d19165ddc4bab31c10cecf0557be56731e12b4db99473f68013e76af1cb14050bdf503db38bc12ee075783cb731da0e81257121da2
7
- data.tar.gz: a97a725f84deeb63c1e6481a13680cf6489b624652085501f98634810c242ff7b2fc00a2e404eb93072fceea4d3b5b9821b64255547190a3f0b73721951fb1b3
6
+ metadata.gz: 26965b0ee08e4d4438b51fb2c94bebb9197aaa8c84717c4640eddf30f768ba26e1ef35ae426bda9d60779907699adb284b51086eecc8a8af8f58a738fa6a9f25
7
+ data.tar.gz: 6e7d9d37889bd28c4f75b0c3de756dde2de61764857a74022206620484b2296484483d23fbe1d4d13956c1bf2d2e6f67d7d73719254180adc1943e15532b1aed
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.16.2 (2025-12-18)
4
+
5
+ Full Changelog: [v1.16.1...v1.16.2](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.16.1...v1.16.2)
6
+
7
+ ### Bug Fixes
8
+
9
+ * issue where json.parse errors when receiving HTTP 204 with nobody ([b453645](https://github.com/anthropics/anthropic-sdk-ruby/commit/b453645abf738e713303f53f904936a49942a86d))
10
+
3
11
  ## 1.16.1 (2025-12-16)
4
12
 
5
13
  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.2"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -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.2"
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.2
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: 2025-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool