lex-llm-gemini 0.3.18 → 0.4.5

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: 564af323ba9c521e6404595eb47f3c1470da8459aec2790c42f51d004e3c2394
4
- data.tar.gz: 4a7bce02b3c4399425ed0749ca5fb580e67d445af04c85480c7b1c0d33a01782
3
+ metadata.gz: 4fc6c5255eae71b411f35c57a052ac77bb3d9aecdb2855672472f8b1a4f4f514
4
+ data.tar.gz: af8645870657d5f743b398c88f96cb2a74cb849eb15afa3553b723c0d02c2f58
5
5
  SHA512:
6
- metadata.gz: 62157a365a6a265791ae7ec076332976241b3137076e5b8fa5f389625b035679ac38afa9ff16324b578f1ab2d9cd35e33b30564eb37a7870eda05dee66ae40cf
7
- data.tar.gz: 98c631924f43613cf28f034a972ef8b2326d88286364768094640080a68e5daf73bdd945ce60867cce6f58f75d6640fc65c0235738c3e7a3d7dd374602f0069f
6
+ metadata.gz: cbdc6a0ff9351f061590beedecfaeba3ccd78666aa97db675e9ff2a528834a22ba5542afd3b63bb143f8d34cd7756b0bc3719a48a84cc4423997d9dd0e07fb3e
7
+ data.tar.gz: 5cfcce92073c6e27a86e20b5200ae0b0babf5eec1061c20c43928c9dd34e63b0fce8311f57d7637ca4d70d49c6134d69b5b45950e415604ad3ee77e6597097c9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,127 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.5] - 2026-08-19
4
+
5
+ ### Changed
6
+ - Publish the validated four-axis lane weight pair on every Gemini offering and reconcile weight-only changes atomically on the existing discovery cadence.
7
+ - Track initializing instances before readiness, rebuild weights from current settings at activation, and serialize activation, replacement, removal, and cache mutation behind one writer mutex.
8
+
9
+ ### Fixed
10
+ - Report configured-but-unpublished Gemini weight keys once per dormant cycle without adding a settings callback or operator workflow.
11
+ - Render canonical system messages through the actual Gemini callable path as native `systemInstruction` payloads.
12
+ - Validate weighted offering drafts before constructing or claiming a callable scope, so malformed weights leave no orphaned Registry publication and a later corrected ordinary pass activates without restart or operator cleanup.
13
+ - Compare rebuilt catalogs as duplicate-preserving multisets of complete offering contracts, ignoring only evidence observation timestamps so catalog reordering cannot churn snapshots and authoritative metadata, quota, publication-source, or evidence-source changes cannot be missed.
14
+
15
+ ### Dependencies
16
+ - Raise the `lex-llm` floor from `>= 0.7.1` to `>= 0.7.6`; the `legion-settings` floor remains unchanged.
17
+
18
+ ## [0.4.4] - 2026-08-18
19
+
20
+ ### Fixed
21
+ - Remove synthetic-default discovery filtering and its once-per-boot warning; configured discovery now passes every instance entry through the normal claimability checks.
22
+
23
+ ## [0.4.3] - 2026-08-17
24
+
25
+ ### Changed
26
+ - **SSOT v3 fail-forward instance identity** - Instance identity is now the operator's config
27
+ name (the key under `settings[:instances]`), published as `InstanceKey.instance_id`. The derived
28
+ `host:port/ak:<8-char-SHA256-fingerprint>` id is demoted to the secondary `InstanceKey.physical_id`
29
+ (dedup and diagnostics only; it never participates in identity). Two config names pointing at the
30
+ same endpoint are now distinct instances.
31
+ - Every inventory publisher call threads the secondary `physical_id:` alongside `instance_id:`
32
+ (`claim_instance`, `readiness_probe_started`, `readiness_succeeded`, `readiness_failed`,
33
+ `activate_instance_snapshot`, `replace_instance_snapshot`, `remove_instance`).
34
+ - An instance config entry literally named `default` is never claimed: `default` is a reserved SSOT
35
+ v3 instance identity that `Identity::InstanceKey` rejects, so the always-present synthetic
36
+ provider_settings template can never be published under name-based identity. The skip is
37
+ unconditional (every tick) and warns once per actor lifetime.
38
+ - Embedding-only models (whose `supportedGenerationMethods` contain only `embedContent`) publish
39
+ `chat: :unsupported` and `stream_chat: :unsupported` alongside `embed: :supported`, so they are
40
+ never routed to chat/completion traffic.
41
+
42
+ ### Fixed
43
+ - **Single actor registration** - The provider module no longer extends `Core` at file level, so the
44
+ boot-time submodule walk skips it and the gem's own top-level extension load is the sole actor
45
+ registration (eliminates the double-claim / `FencedPublisherError`).
46
+
47
+ ### Dependencies
48
+ - Raise `lex-llm` floor from `>= 0.7.0` to `>= 0.7.1` (SSOT v3 fail-forward `InstanceKey` with
49
+ secondary `physical_id`).
50
+
51
+ ## [0.4.2] - 2026-08-13
52
+
53
+ ### Fixed
54
+ - **§1 rubocop disables — second remediation pass**: Removed all remaining inline
55
+ `# rubocop:disable` directives from `provider.rb`, `gemini.rb`, and spec files.
56
+ Resolved `Metrics/ClassLength` by extracting `MessageFormatter`, `ResponseParser`, and
57
+ `OfferingBuilder` as sibling modules outside the `Provider` class body; resolved
58
+ `Metrics/ParameterLists`/`Lint/UnusedMethodArgument` on `render_payload` by switching to
59
+ `**opts` with explicit `fetch`/`[]` extraction and splitting assembly into `build_request_payload`;
60
+ resolved `Metrics/AbcSize` on `normalize_instance_config` by extracting `symbolize_config_keys`,
61
+ `promote_api_key`, and `promote_api_base` helpers.
62
+ - **§1 spec file path format**: Moved `capability_policy_spec.rb` to
63
+ `provider_capability_policy_spec.rb` and `actors/fleet_worker_spec.rb` to
64
+ `actor/fleet_worker_spec.rb` so paths satisfy `RSpec/SpecFilePathFormat`.
65
+ - **§provider-plan blanket chat support**: `Capabilities#supported?` no longer returns `true`
66
+ for all non-embedding actions when `supportedGenerationMethods` is empty; an absent method
67
+ list is now treated as unknown/unsupported for all actions except the embedding name heuristic.
68
+ - **§2 second publication engine removed**: Deleted `registry_publisher` class method and
69
+ `attr_writer :registry_publisher` from `Provider`; removed all associated spec assertions.
70
+ - **§1 settings guards**: Removed chained `||` fallback in `api_base`; removed `defined?`
71
+ guard in `provider_capability_config`; removed `respond_to?` guards in
72
+ `instance_capability_config`, `model_capability_config`, and `resolve_models_config`.
73
+ - **§1 swallowed rescues**: All `rescue` blocks in `provider.rb` and `discovery_refresh.rb`
74
+ now call `handle_exception`; removed silent `rescue StandardError; nil` in
75
+ `resolve_models_config`; `extract_host_port` and `check_health` rescue blocks now log via
76
+ `handle_exception` before returning degraded values.
77
+ - **§1 stdlib warn**: Replaced `warn(e.message) if $VERBOSE` in `LoadError` rescue blocks
78
+ with silent rescues (the error is not actionable at file-load time and the defined-guard
79
+ below provides the correct gating behavior).
80
+
81
+ ## [0.4.1] - 2026-08-13
82
+
83
+ ### Fixed
84
+ - **§8 health firewall**: `GeminiCallable#normalize_dispatch_error` now maps only an explicit
85
+ Gemini `"status":"UNAVAILABLE"` response body to `:instance_unavailable`. Connection failures,
86
+ timeouts, generic 5xx, 429, auth, and all other transient errors remain request-local and never
87
+ mutate global instance availability.
88
+ - **§2 single publication engine**: Removed legacy `RegistryPublisher#publish_models_async` call
89
+ from `Provider#list_models`. Discovery actor via `Inventory::Publisher` is now the sole
90
+ publication path.
91
+ - **§1 settings guards**: Replaced `settings[:discovery_interval] || self.class.every_seconds`,
92
+ `settings.dig(:credentials, :api_key)`, `settings[:endpoint] || ...`, and `settings[:tier] || ...`
93
+ with direct registered-default access (`settings[:key]`).
94
+ - **§1 rubocop disables**: Removed all inline rubocop:disable annotations; resolved underlying
95
+ `Metrics/ClassLength` by extracting private methods into helper modules
96
+ (`EvidenceBuilder`, `ValueEvidenceBuilder`, `ModelDiscovery`, `ConfigResolver`, `HttpClient`,
97
+ `ProbeRunner`, `HealthChecker`, `InstanceLifecycle`); resolved `Metrics/AbcSize` on
98
+ `claim_and_activate_instance` by splitting into focused helpers; resolved swallowed
99
+ `rescue nil` patterns in `run_cadence_probe` and `handle_reactive_probe` with proper
100
+ `begin/rescue/handle_exception` blocks.
101
+ - **§11 conformance spec**: Replaced tautological `empty generation methods` test with a real
102
+ assertion that calls the actor's `build_operation_evidence` method directly.
103
+
104
+ ## [0.4.0] - 2026-08-13
105
+
106
+ ### Changed
107
+ - **SSOT v3 provider migration** - Complete rewrite of the discovery actor to use the
108
+ Inventory::Publisher/Registry contract. Replaces the old ScopedRefresher/Legion::LLM::Call::Registry
109
+ discovery mechanism with exact-instance publication via InstanceKey, OfferingDraft snapshots,
110
+ non-billable readiness probes, and normalized ProviderOutcome error classification.
111
+ - Introduce GeminiCallable wrapper implementing `disconnect` and `normalize_dispatch_error(error:)`
112
+ contracts required by the SSOT v3 routing layer.
113
+ - Derive instance identity as `host:port/ak:<8-char-SHA256-fingerprint>` for API-key-based isolation.
114
+ - Operation evidence derived from Gemini `supportedGenerationMethods` array (`:provider_catalog` source).
115
+ - Readiness probing via `GET models?pageSize=1` (non-billable, no inference).
116
+ - Support coalesced reactive probes after dispatch-triggered `instance_unavailable` transitions.
117
+
118
+ ### Removed
119
+ - `default_model: 'gemini-2.0-flash'` fallback from provider settings (SSOT v3 requires explicit
120
+ model selection; no default model or provider inference).
121
+
122
+ ### Dependencies
123
+ - Raise `lex-llm` floor from `>= 0.6.0` to `>= 0.7.0`.
124
+
3
125
  ## [0.3.18] - 2026-08-04
4
126
 
5
127
  ### Changed
data/Gemfile CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
+ gem 'lex-llm'
6
+
5
7
  gemspec
6
8
 
7
9
  group :development do
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
 
26
26
  spec.add_dependency 'legion-json', '>= 1.2.1'
27
27
  spec.add_dependency 'legion-logging', '>= 1.3.2'
28
- spec.add_dependency 'legion-settings', '>= 1.3.14'
28
+ spec.add_dependency 'legion-settings', '>= 1.4.2'
29
29
  spec.add_dependency 'legion-transport', '>= 1.4.14'
30
- spec.add_dependency 'lex-llm', '>= 0.6.0'
30
+ spec.add_dependency 'lex-llm', '>= 0.7.6'
31
31
  end