fast-embeddings 0.1.0 → 0.1.1

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: 447574fabdcf463f9eea4094be52e55064f18030c4f058a27a211f04ddb2f11f
4
- data.tar.gz: 4ba8cb1f013e2a238dd98460cceac7ea628e0b0edfa9ce15f7f083e649f18bca
3
+ metadata.gz: 66b6f9f33713b72bf773498931e548ab09411d577c0d9664c0fbf1f25c8fc2e6
4
+ data.tar.gz: 6948b2261f41cd506b4cf42ee32af500f4e9a39c707b3ce7fc84938a3486bffa
5
5
  SHA512:
6
- metadata.gz: 8068b234b562dade5991fd4aa65caf68c437e7a973b24340f863fed8287b7d63e3837500243f1a596d4ac10fe81b0d9aa1d90d7cdcec6d84cbef998bc906d188
7
- data.tar.gz: 6a7065e5c87ef0d3035ba4fd21e4fb531623bcdad2dbf33c938d6252ccade9229cd0e8d800ea9bf8bec5cd72cbbbb8fe3a0d5774b2f0ab2633bcd68160e7df88
6
+ metadata.gz: 7a0c71513fc9223ba258732c8cad778d030b6c380d6b1933c823f64d3e432eb52fd075c4e853ced318774d45ff0c73725e87cc2ec6ca59b2fa819fb4779e65d2
7
+ data.tar.gz: 441a76b1d9d30b94f1d6afc51382383f46090a49a90ff2d160efec4071dcf110a1d3bcba2dbf6b7071c5cd199b8f1a2bb8a7614b776aede5c7c459b4786452aa
data/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  Notable changes to the fast-embeddings gem. The format is prose-first,
4
4
  one section per released version, newest first.
5
5
 
6
+ ## 0.1.1 (2026-11-24)
7
+
8
+ - Fixed a live-transport read defect: replies are now read to EOF with
9
+ `body.join` instead of a single `body.read`. Live transports deliver
10
+ large replies FRAMED — a one-chunk 1024-dim bge-m3 reply is ~22KB in
11
+ ~8KB frames, and `Body#read` returns one frame, so 0.1.0 parsed
12
+ mid-float and raised `ResponseError` on real wires while hermetic
13
+ single-write mocks stayed green. The error path reads the same way
14
+ (a framed error body would otherwise truncate into the taxonomy's
15
+ raw-body fallback). The mock server gained a `frames:` delivery mode
16
+ and the suite a framed-reply regression spec.
17
+
6
18
  ## 0.1.0 (2026-11-24)
7
19
 
8
20
  - Initial release: the pure OpenAI embeddings wire as a gem.
@@ -84,7 +84,11 @@ module Fast
84
84
  watchdog.arm
85
85
  response = @client.post(@path, headers: headers_for(api_key), body: body)
86
86
  raise_api_error(response) unless (200...300).cover?(response.status)
87
- result = parse_result(response.body.read)
87
+ # join, never a single read: live transports deliver large replies
88
+ # FRAMED (one 1024-dim bge-m3 reply is ~22KB in ~8KB frames) and
89
+ # Body#read returns ONE frame — 0.1.0 parsed mid-float and failed
90
+ # live while hermetic mocks (single TCP write) stayed green.
91
+ result = parse_result(response.body.join)
88
92
  rescue Async::Cancel
89
93
  raise(TimeoutError, "no data within #{@timeout}s") if watchdog.fired
90
94
 
@@ -130,9 +134,11 @@ module Fast
130
134
  raise ArgumentError, "input must be a non-empty Array of Strings"
131
135
  end
132
136
 
133
- # Non-2xx: read the body, map to the frozen taxonomy.
137
+ # Non-2xx: read the body, map to the frozen taxonomy. join for the
138
+ # same framing reason as the success path — a framed error body
139
+ # would otherwise truncate into the taxonomy's raw-body fallback.
134
140
  def raise_api_error(response)
135
- body = response.body.read
141
+ body = response.body.join
136
142
  raise Errors.class_for_status(response.status, body).new(status: response.status, body: body)
137
143
  end
138
144
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Fast
4
4
  module Embeddings
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fast-embeddings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Jacobs