legion-llm 0.9.9 → 0.9.10

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: 6a7ea4bbe972c340ca3ccaa0cf2478724c90bb8385f1d8129a21fc74981a4380
4
- data.tar.gz: a7a8250e8c84835b3bf2ffefe9cdc25494b9be7deae4cb16375bd8bfa2d8dcf2
3
+ metadata.gz: a3155d38fd745698ea1445e6d1d8b1824c4ce57c001f107ab2fc0036ee88c48a
4
+ data.tar.gz: 0baebdd6be604ae292502adda2168e5eb599cf4fa00e30e5f82b414ad271d016
5
5
  SHA512:
6
- metadata.gz: be0a896d160b6824760d0361bb82e8e320f312fc23e8e9156cf9dfd924f3d264a48ff71bce0531b29f13913bf367c7eeca732cff477adc1c54310a4f4cbcce38
7
- data.tar.gz: 210706b370e355606f342e506108b4ac13cb0e663c8203fe7b09afdeb643dba4e1ade3e5cb8e13b0efe4238b33656a73f7f57e74687413a6b0914821a31b0039
6
+ metadata.gz: 7e3112d5a47dddcfe969867afe3e2cccc2d45029628a6b64c3098b7d8be2ba35908823bd9decd062eface61b2b9fded8e29710f8fcca094b00c19311a82eb211
7
+ data.tar.gz: 59f1a067e96bb527f46ed5b68f5e03c50aceeb8141ff91c06e89fdedfb17496359a6d50898a6fb2a8c9fd268b596ea23db858f4ee64f7e86ce22e04aefa0c56d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Legion LLM Changelog
2
2
 
3
+ ## [0.9.10] - 2026-05-07
4
+
5
+ ### Fixed
6
+ - `normalize_model_for_rules` now passes the `tier` field from each discovered model entry through to `RuleGenerator`, so per-instance tier configuration is no longer silently dropped.
7
+ - `RuleGenerator#generate` now prefers a per-model `tier` value from discovery data over the hardcoded `TIER_MAP` provider default, allowing directly-reachable vLLM (and other HTTP-based) instances to route via `:direct` instead of always being assigned `:fleet`.
8
+
3
9
  ## [0.9.9] - 2026-05-07
4
10
 
5
11
  ### Fixed
@@ -46,10 +46,13 @@ module Legion
46
46
  model_name = (model_data[:name] || model_data['name']).to_s
47
47
  next if model_name.empty?
48
48
 
49
+ model_tier = extract_field(model_data, :tier)&.to_sym ||
50
+ extract_field(model_data, 'tier')&.to_sym ||
51
+ tier
49
52
  capability = embedding_model?(model_data) ? :embed : :chat
50
- priority = (TIER_WEIGHT[tier] || 80) - order
51
- rules << build_rule(provider, instance_id, model_data, capability, tier, priority)
52
- rules << build_rule(provider, instance_id, model_data, :stream, tier, priority) if capability == :chat
53
+ priority = (TIER_WEIGHT[model_tier] || 80) - order
54
+ rules << build_rule(provider, instance_id, model_data, capability, model_tier, priority)
55
+ rules << build_rule(provider, instance_id, model_data, :stream, model_tier, priority) if capability == :chat
53
56
  order += 1
54
57
  end
55
58
  end
@@ -212,6 +212,7 @@ module Legion
212
212
  # Normalize a discovered model entry into a hash compatible with RuleGenerator
213
213
  def normalize_model_for_rules(model_entry)
214
214
  h = { 'name' => model_entry[:model] }
215
+ h['tier'] = model_entry[:tier] if model_entry[:tier]
215
216
  h['capabilities'] = model_entry[:capabilities] if model_entry[:capabilities]&.any?
216
217
  h['context_length'] = model_entry[:context_length] if model_entry[:context_length]
217
218
  h['parameter_count'] = model_entry[:parameter_count] if model_entry[:parameter_count]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module LLM
5
- VERSION = '0.9.9'
5
+ VERSION = '0.9.10'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-llm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9
4
+ version: 0.9.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity