lex-llm-gemini 0.3.13 → 0.4.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: d81052fa4455e1c73b7567864422ae494442f0fce0d9206fb0634bc238c939eb
4
- data.tar.gz: 9f56e59676cc93aa0b55e4d8958975ce3e0a2c02308daaaeecb40c46c8535564
3
+ metadata.gz: b3524657be64163617964f55cfeb0f375536587ebb79f1d118d8b7b53032b59d
4
+ data.tar.gz: f80938bffd0e0f8794a0de0cc7857064cf1db3c19c948042acdfb423da63d9ec
5
5
  SHA512:
6
- metadata.gz: 0fe88e33de1fa4575867f35ffe717528a3759aa1b0e3c15fe42a9cfe99ff8e00826b0a8069f1d4788091b17448c307cf8e4ad694684c166249b9a57360c8dccc
7
- data.tar.gz: 999f873f14e211211232b72ba3f5d5dd6dd31560de9e44081a1e2355c6574baa7a4a169701492a00803fcb9fb1bc6b9d73de37f399cb2439505a7c3c970717a7
6
+ metadata.gz: 42f5f91e84ca2b380f983dbe04d4f4ff1171cf06c4aa14cf4b884e219700869c19e85b57c39f90e57bbca81f9b9b490a9e11dab2bff5641d55b0e03bfc02ea3b
7
+ data.tar.gz: a70c14d20367d1e7b2dfe57647cfa1a56f235396087707a84759732e408b6b37aa366cde5e2ee5957fdcce7e252ac9f3ec45d8c255d95de821a53c8447a99ba2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,142 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.4] - 2026-08-18
4
+
5
+ ### Fixed
6
+ - Remove synthetic-default discovery filtering and its once-per-boot warning; configured discovery now passes every instance entry through the normal claimability checks.
7
+
8
+ ## [0.4.3] - 2026-08-17
9
+
10
+ ### Changed
11
+ - **SSOT v3 fail-forward instance identity** - Instance identity is now the operator's config
12
+ name (the key under `settings[:instances]`), published as `InstanceKey.instance_id`. The derived
13
+ `host:port/ak:<8-char-SHA256-fingerprint>` id is demoted to the secondary `InstanceKey.physical_id`
14
+ (dedup and diagnostics only; it never participates in identity). Two config names pointing at the
15
+ same endpoint are now distinct instances.
16
+ - Every inventory publisher call threads the secondary `physical_id:` alongside `instance_id:`
17
+ (`claim_instance`, `readiness_probe_started`, `readiness_succeeded`, `readiness_failed`,
18
+ `activate_instance_snapshot`, `replace_instance_snapshot`, `remove_instance`).
19
+ - An instance config entry literally named `default` is never claimed: `default` is a reserved SSOT
20
+ v3 instance identity that `Identity::InstanceKey` rejects, so the always-present synthetic
21
+ provider_settings template can never be published under name-based identity. The skip is
22
+ unconditional (every tick) and warns once per actor lifetime.
23
+ - Embedding-only models (whose `supportedGenerationMethods` contain only `embedContent`) publish
24
+ `chat: :unsupported` and `stream_chat: :unsupported` alongside `embed: :supported`, so they are
25
+ never routed to chat/completion traffic.
26
+
27
+ ### Fixed
28
+ - **Single actor registration** - The provider module no longer extends `Core` at file level, so the
29
+ boot-time submodule walk skips it and the gem's own top-level extension load is the sole actor
30
+ registration (eliminates the double-claim / `FencedPublisherError`).
31
+
32
+ ### Dependencies
33
+ - Raise `lex-llm` floor from `>= 0.7.0` to `>= 0.7.1` (SSOT v3 fail-forward `InstanceKey` with
34
+ secondary `physical_id`).
35
+
36
+ ## [0.4.2] - 2026-08-13
37
+
38
+ ### Fixed
39
+ - **§1 rubocop disables — second remediation pass**: Removed all remaining inline
40
+ `# rubocop:disable` directives from `provider.rb`, `gemini.rb`, and spec files.
41
+ Resolved `Metrics/ClassLength` by extracting `MessageFormatter`, `ResponseParser`, and
42
+ `OfferingBuilder` as sibling modules outside the `Provider` class body; resolved
43
+ `Metrics/ParameterLists`/`Lint/UnusedMethodArgument` on `render_payload` by switching to
44
+ `**opts` with explicit `fetch`/`[]` extraction and splitting assembly into `build_request_payload`;
45
+ resolved `Metrics/AbcSize` on `normalize_instance_config` by extracting `symbolize_config_keys`,
46
+ `promote_api_key`, and `promote_api_base` helpers.
47
+ - **§1 spec file path format**: Moved `capability_policy_spec.rb` to
48
+ `provider_capability_policy_spec.rb` and `actors/fleet_worker_spec.rb` to
49
+ `actor/fleet_worker_spec.rb` so paths satisfy `RSpec/SpecFilePathFormat`.
50
+ - **§provider-plan blanket chat support**: `Capabilities#supported?` no longer returns `true`
51
+ for all non-embedding actions when `supportedGenerationMethods` is empty; an absent method
52
+ list is now treated as unknown/unsupported for all actions except the embedding name heuristic.
53
+ - **§2 second publication engine removed**: Deleted `registry_publisher` class method and
54
+ `attr_writer :registry_publisher` from `Provider`; removed all associated spec assertions.
55
+ - **§1 settings guards**: Removed chained `||` fallback in `api_base`; removed `defined?`
56
+ guard in `provider_capability_config`; removed `respond_to?` guards in
57
+ `instance_capability_config`, `model_capability_config`, and `resolve_models_config`.
58
+ - **§1 swallowed rescues**: All `rescue` blocks in `provider.rb` and `discovery_refresh.rb`
59
+ now call `handle_exception`; removed silent `rescue StandardError; nil` in
60
+ `resolve_models_config`; `extract_host_port` and `check_health` rescue blocks now log via
61
+ `handle_exception` before returning degraded values.
62
+ - **§1 stdlib warn**: Replaced `warn(e.message) if $VERBOSE` in `LoadError` rescue blocks
63
+ with silent rescues (the error is not actionable at file-load time and the defined-guard
64
+ below provides the correct gating behavior).
65
+
66
+ ## [0.4.1] - 2026-08-13
67
+
68
+ ### Fixed
69
+ - **§8 health firewall**: `GeminiCallable#normalize_dispatch_error` now maps only an explicit
70
+ Gemini `"status":"UNAVAILABLE"` response body to `:instance_unavailable`. Connection failures,
71
+ timeouts, generic 5xx, 429, auth, and all other transient errors remain request-local and never
72
+ mutate global instance availability.
73
+ - **§2 single publication engine**: Removed legacy `RegistryPublisher#publish_models_async` call
74
+ from `Provider#list_models`. Discovery actor via `Inventory::Publisher` is now the sole
75
+ publication path.
76
+ - **§1 settings guards**: Replaced `settings[:discovery_interval] || self.class.every_seconds`,
77
+ `settings.dig(:credentials, :api_key)`, `settings[:endpoint] || ...`, and `settings[:tier] || ...`
78
+ with direct registered-default access (`settings[:key]`).
79
+ - **§1 rubocop disables**: Removed all inline rubocop:disable annotations; resolved underlying
80
+ `Metrics/ClassLength` by extracting private methods into helper modules
81
+ (`EvidenceBuilder`, `ValueEvidenceBuilder`, `ModelDiscovery`, `ConfigResolver`, `HttpClient`,
82
+ `ProbeRunner`, `HealthChecker`, `InstanceLifecycle`); resolved `Metrics/AbcSize` on
83
+ `claim_and_activate_instance` by splitting into focused helpers; resolved swallowed
84
+ `rescue nil` patterns in `run_cadence_probe` and `handle_reactive_probe` with proper
85
+ `begin/rescue/handle_exception` blocks.
86
+ - **§11 conformance spec**: Replaced tautological `empty generation methods` test with a real
87
+ assertion that calls the actor's `build_operation_evidence` method directly.
88
+
89
+ ## [0.4.0] - 2026-08-13
90
+
91
+ ### Changed
92
+ - **SSOT v3 provider migration** - Complete rewrite of the discovery actor to use the
93
+ Inventory::Publisher/Registry contract. Replaces the old ScopedRefresher/Legion::LLM::Call::Registry
94
+ discovery mechanism with exact-instance publication via InstanceKey, OfferingDraft snapshots,
95
+ non-billable readiness probes, and normalized ProviderOutcome error classification.
96
+ - Introduce GeminiCallable wrapper implementing `disconnect` and `normalize_dispatch_error(error:)`
97
+ contracts required by the SSOT v3 routing layer.
98
+ - Derive instance identity as `host:port/ak:<8-char-SHA256-fingerprint>` for API-key-based isolation.
99
+ - Operation evidence derived from Gemini `supportedGenerationMethods` array (`:provider_catalog` source).
100
+ - Readiness probing via `GET models?pageSize=1` (non-billable, no inference).
101
+ - Support coalesced reactive probes after dispatch-triggered `instance_unavailable` transitions.
102
+
103
+ ### Removed
104
+ - `default_model: 'gemini-2.0-flash'` fallback from provider settings (SSOT v3 requires explicit
105
+ model selection; no default model or provider inference).
106
+
107
+ ### Dependencies
108
+ - Raise `lex-llm` floor from `>= 0.6.0` to `>= 0.7.0`.
109
+
110
+ ## [0.3.18] - 2026-08-04
111
+
112
+ ### Changed
113
+ - Prepare the Gemini provider standardization baseline for a patch release.
114
+
115
+ ## [0.3.17] - 2026-07-02
116
+
117
+ ### Fixed
118
+ - Emit canonical capability vocabulary (`:embedding`, `:tools`) from `Capabilities.critical_capabilities_for`. `lex-llm` 0.6.1+ retains both the raw and canonical forms on `Model::Info`, so the pre-canonical aliases (`embeddings`, `function_calling`) leaked duplicate tokens (e.g. `[:embeddings, :embedding]`) into discovered model capabilities.
119
+
120
+ ## [0.3.16] - 2026-06-20
121
+
122
+ ### Fixed
123
+ - Stub shared registry publishing through `RegistryPublisher#schedule` in specs so async availability-event coverage stays stable after the shared publisher moved off raw `Thread.new`.
124
+
125
+ ## [0.3.15] - 2026-06-20
126
+
127
+ ### Changed
128
+ - Align Gemini instance discovery with the shared `lex-llm` contract by preserving explicit tier overrides while defaulting unconfigured instances to `:cloud`.
129
+ - Expand instance-level capability override passthrough to the shared `enable_*` vocabulary, including `structured_output`.
130
+ - Normalize Gemini contract coverage around canonical `:tools` and `:embedding` capabilities.
131
+
132
+ ## [0.3.14] - 2026-06-19
133
+
134
+ ### Changed
135
+ - Adopt `Legion::Extensions::Llm::Inventory::ScopedRefresher` mixin (lex-llm 0.6.0). Discovery
136
+ refresh actors now write directly to the live `Inventory` catalog via `Inventory.write_lane`.
137
+ - Pin `lex-llm >= 0.6.0` and `legion-llm >= 0.14.0` in gemspec.
138
+ - Standard `weight: 100` default added to provider instance settings schema.
139
+
3
140
  ## 0.3.13 - 2026-06-16
4
141
 
5
142
  - Dependency updates, code quality improvements.
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.5.0'
30
+ spec.add_dependency 'lex-llm', '>= 0.7.1'
31
31
  end