legion-llm 0.7.3 → 0.7.4

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: 8452e740fea9cdaa91e9a0b6e0b6931dbe201eb06876ff5819711d48d088db75
4
- data.tar.gz: fef9de5c16d24e1674c7e531c855de8424afaec577216adb63891ee28d46be15
3
+ metadata.gz: 43cc1358dabaa66c319b8e8c12810ed4c9b9dd344d74fe608c7607d745369618
4
+ data.tar.gz: 9388386688c739d59e69779ef950563f10259aa69ea4833dd2a5ef1f29caeda0
5
5
  SHA512:
6
- metadata.gz: 898fa78f04660595cb1c95c77c1822829b70f2834bb5a12333fbe77d6fe35625af02ad65605d350433f2e18ab00f8f688f2610e40c8cb8dea8d97b68ab1c81e0
7
- data.tar.gz: 7f36e64fa032cd43b5504fd502e58efd45ca84aa2b8643e23e661a15fe50e1eb5a531a91ea02aab91e368f04f818491ccb7e663395cafd167ecbcbb9b05fde74
6
+ metadata.gz: 25b3734d86e86107226fea78aa686132c9030ae3cb191388d88e962b9c5b66327524528e91af7ebb27d8df9b8d8057684cf10e030d37992b5d44e6ae5cf885cf
7
+ data.tar.gz: 8bdbbdd6cb270a40cf47de6391b36cab005f305a1b2a39628849c9c1747968b8eebea765bb745ecc4d7f5d36afa876510972c28a61a804770a62bd631e2cca55
@@ -36,10 +36,11 @@ module Legion
36
36
  mapping = find_role_mapping(caller)
37
37
  return mapping if mapping
38
38
 
39
- # 3. Classification-driven
40
- if classification && (classification[:contains_phi] || classification[:contains_pii])
41
- log.info('[llm][routing] tier_assigned source=classification tier=cloud')
42
- return { tier: :cloud, intent: { capability: :reasoning }, source: :classification }
39
+ # 3. Classification-driven: PHI/PII/restricted -> local only (fail closed)
40
+ if classification && (classification[:contains_phi] || classification[:contains_pii] ||
41
+ classification[:level]&.to_sym == :restricted)
42
+ log.info('[llm][routing] tier_assigned source=classification tier=local (phi/pii/restricted)')
43
+ return { tier: :local, intent: { privacy: :strict }, source: :classification }
43
44
  end
44
45
 
45
46
  # 4. Priority-driven
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module LLM
5
- VERSION = '0.7.3'
5
+ VERSION = '0.7.4'
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.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity