active_harness_pricing 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: ac53afc65a92dfd05822664fcb797fb9d785eba4be2148295e5ee898f1e2236b
4
- data.tar.gz: fa65d9618561a7f6d346713b7ec2000688e504cf6aa120db7b9282f54e5c79a4
3
+ metadata.gz: 053d38400e387ca3f0600d59f3fb8c6ce2f12aa2a173932584da6cebf0d25730
4
+ data.tar.gz: 7d5074e44f84d5d55d3d65c1440193c5b0b4fa83020018b6cef1b8e7761b4d65
5
5
  SHA512:
6
- metadata.gz: b1fd5891bee21ca2c575b7046b0dee73ce90791d58fb231ebc68633f96b2d7efac48bfb1ae6db1b0c5668e699cff36cf31cba592de4bf7a6ddd402a5baefd711
7
- data.tar.gz: 963a2238509aa0c4acf2017ed871e23a02aa5187c62275b787732e9141977b8606c11430f7202da87d9c0725b51ee6e4e4e66df8ba932c959bb269aaa19c6cc1
6
+ metadata.gz: ef0291f5bf9a832cb9423420684c2fabea5714476150e477963ab7bda5143296dc53a9d2c129adba8ef40b96d18de9748fdf82f88e6e82c57b56be242e937f21
7
+ data.tar.gz: 8b9b0db82d20051fef355da98f134a2e4d810f6a77762f68424303498246e8a361d7b23b551c9307c2c2fb4529f790bcc67443f76678a0d34c8366e9eb17ceaf
@@ -164,8 +164,8 @@ module ActiveHarness
164
164
  next [] unless ah_provider && allowed.include?(ah_provider)
165
165
 
166
166
  models_hash = provider_data.is_a?(Hash) ? (provider_data[:models] || {}) : {}
167
- models_hash.values.filter_map do |m|
168
- next unless m.is_a?(Hash) && m[:id]
167
+ models_hash.values.map do |m|
168
+ next nil unless m.is_a?(Hash) && m[:id]
169
169
 
170
170
  cost = m[:cost] || {}
171
171
  standard = {
@@ -186,7 +186,7 @@ module ActiveHarness
186
186
  output_modalities: Array(mods[:output]),
187
187
  pricing: standard.any? ? { text_tokens: { standard: standard } } : {}
188
188
  }
189
- end
189
+ end.compact
190
190
  end
191
191
  end
192
192
 
@@ -48,7 +48,7 @@ module ActiveHarness
48
48
 
49
49
  def all
50
50
  ensure_fresh_registry
51
- registry.filter_map { |raw| build_price(raw) }
51
+ registry.map { |raw| build_price(raw) }.compact
52
52
  end
53
53
 
54
54
  def preload!
@@ -3,5 +3,5 @@ require_relative "active_harness/pricing/models_dev"
3
3
  require_relative "active_harness/pricing/openrouter"
4
4
 
5
5
  module ActiveHarnessPricing
6
- VERSION = "0.1.0"
6
+ VERSION = "0.1.1"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_harness_pricing
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
  - the-teacher