lex-llm-azure-foundry 0.2.17 → 0.3.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: 433a2650edf79d39694f77ff2ebdabe3e97aa4e6c4ed5aa23935290748789e04
4
- data.tar.gz: d1953642f8ea39987493f634488dc8480be56642e60369c6696ac2c0213ac7c3
3
+ metadata.gz: 49e5d8dc9a03ec7e353324aaf22050bf23a28ff085da22a8f779c7b01b28ffe0
4
+ data.tar.gz: 3c8c342a9bc24b2133a2060f9cc9dc9a9743d4d69bda1205e26db02f6d5a4f59
5
5
  SHA512:
6
- metadata.gz: ddf30f8e148302d3fc8c897dbc2b55c7df6b93b507860cc20ff4f6a8f4bd47a30df502e5aa9ae95832e4755e3331ebc54673085c2ba44dd3e0ca124d091315f2
7
- data.tar.gz: 3187ac2e0b1e0fbddcd9fa31ba85fbc55219bc275a14220861e488940657fa8111a03df0ee773520110bd2bb6a18626a8125a98334c3746e0258fd868e3fc879
6
+ metadata.gz: ba398b8cdb7dcd17fa6138c9edccc482b66abb201c8ce198d4373d83ced0de5f8c1c756be4b55ec3b3a64921278db4d3b6673d146a77ed2121d6e7317622be79
7
+ data.tar.gz: d1c2877ae02270b74dba8be1daa23c9c676070c4d705194fa35933d31206d3c9bd5eccb0d2837c80ffe2fe278153766f0865d1e53d077cd4b9e84ce67c5fdef0
data/.rubocop.yml CHANGED
@@ -16,3 +16,11 @@ Metrics/MethodLength:
16
16
  Enabled: false
17
17
  RSpec/MultipleExpectations:
18
18
  Enabled: false
19
+ RSpec/ExampleLength:
20
+ Enabled: false
21
+ RSpec/MultipleMemoizedHelpers:
22
+ Enabled: false
23
+ RSpec/DescribeClass:
24
+ Exclude:
25
+ - spec/legion/extensions/llm/azure_foundry/capability_policy_spec.rb
26
+ - spec/legion/extensions/llm/azure_foundry/context_window_spec.rb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,100 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.5] - 2026-08-19
4
+
5
+ ### Changed
6
+ - **Write-time SSOT lane weights** — Build Azure deployment drafts with the shared
7
+ four-component weight pair using the deployment name as the provider-native
8
+ offering identity, and reconcile weight-only changes atomically on the existing
9
+ discovery cadence. Initial/recovery activation now rebuilds from current settings,
10
+ removal wins readiness races, and dormant configured weights log once per absence
11
+ period without any Settings lifecycle callback.
12
+ - **Callable-path system conformance** — Capture the rendered Azure/OpenAI-compatible
13
+ HTTP payload and verify a folded leading system message remains in the dialect-native
14
+ `role: system` message position.
15
+ - **Dependency floor** — Raise `lex-llm` to `>= 0.7.6` for `WeightSchema`,
16
+ `WeightReconciler`, and the immutable record weight pair. The `legion-settings`
17
+ dependency and provider/operator workflow are unchanged.
18
+
19
+ ### Fixed
20
+ - **Malformed-weight startup cleanup** — Validate and build weighted offering
21
+ drafts before constructing or claiming any callable scope, so invalid weight
22
+ values cannot leave an orphaned initializing Registry publication. A later
23
+ corrected discovery pass claims and activates the instance normally without
24
+ requiring a restart or operator cleanup.
25
+ - **Complete offering replacement comparison** — Ordinary discovery now compares
26
+ every authoritative `OfferingDraft` field while ignoring only evidence
27
+ observation timestamps. Deployment order does not churn, duplicate counts stay
28
+ significant, and native-key, evidence, quota, metadata, publication-source,
29
+ tier, or weight drift advances the Registry snapshot exactly once.
30
+
31
+ ## [0.3.4] - 2026-08-18
32
+
33
+ ### Fixed
34
+ - **Default instance labels** — Accept `default` as an ordinary operator
35
+ `InstanceKey` label, matching the shared `lex-llm` identity contract.
36
+
37
+ ## [0.3.3] - 2026-08-16
38
+
39
+ ### Changed
40
+ - **Instance identity is the operator's config name** — the discovery actor now
41
+ publishes `InstanceKey.instance_id` as the config NAME (the key the router
42
+ resolves `instances.<name>` settings — per-instance tuning, `enable_*`
43
+ overrides — by), restoring the baseline semantics. The previously-derived
44
+ `host:port[/ak:fingerprint]` id is kept as the **secondary** `InstanceKey`
45
+ `physical_id` field (dedup/diagnostics only; it never participates in
46
+ equality, hashing, or registry-scope identity). Two config names pointing at
47
+ the same endpoint stay distinct instances; the credential fingerprint still
48
+ distinguishes same-name configs in diagnostics. `physical_id` is threaded
49
+ through every `Inventory::Publisher` lifecycle call and onto offering
50
+ metadata.
51
+ - **Authoritative operation evidence for embedding deployments** — an embedding
52
+ deployment now publishes `chat: :unsupported` and `stream_chat: :unsupported`
53
+ (with `embed: :supported`), matching how bedrock authoritatively excludes
54
+ embedding models, so a plain chat request can no longer misroute to an
55
+ embedding-only deployment.
56
+ - **Dependency floor** — `lex-llm` raised to `>= 0.7.1` (the
57
+ `InstanceKey#physical_id` secondary field).
58
+
59
+ ### Fixed
60
+ - **Single actor registration** — the provider module no longer extends `::Legion::Extensions::Core` at file level, so the boot-time submodule walk skips it and the gem's own top-level extension load is the sole actor registration — eliminating the double-claim / `FencedPublisherError` twin.
61
+
62
+ ## [0.3.2] - 2026-08-13
63
+
64
+ ### Fixed
65
+ - **§1 — zero rubocop:disable** — Removed every `rubocop:disable` / `rubocop:enable` inline directive from `lib/` and `spec/`. Refactored `azure_foundry.rb`, `provider.rb`, and the fleet-worker spec to comply without suppression: extracted `ProviderClassMethods`, `ProviderDispatchMethods`, `ProviderOfferingHelpers`, `ProviderOfferingMetadata`, `ProviderCapabilityHelpers`, `Capabilities` modules and new private helpers (`extract_endpoint_from_cfg`, `extract_tier_from_cfg`, `promote_endpoint_aliases`, `promote_provider_aliases`, `resolve_usage_type`, `resolve_model_family`, `build_offering_record`, `build_offering_metadata`).
66
+ - **§9 — :default substitution removed** — Deleted `build_default_instance` and `default_instance_config` from `InstanceConfigHelpers`; `configured_instances` now reads `settings[:instances]` directly and skips entries with nil/empty endpoints. Removed `settings[:endpoint] || settings[:azure_foundry_endpoint]` `||` guard.
67
+ - **§1 — swallowed rescue** — `extract_host_port` in `InstanceIdentityHelpers` now calls `handle_exception` and re-raises on `URI::InvalidURIError` instead of silently returning `'unknown:0'`.
68
+ - **§1 — credentials .dig removed** — `apply_auth_headers` and `derive_instance_id` in the discovery actor now read only from `instance_cfg[:azure_foundry_api_key]`; the `instance_cfg.dig(:credentials, :api_key)` fallback was removed (all configs pass through `normalize_instance_config` which promotes this key).
69
+ - **§6 — circuit_state vocabulary** — Removed `circuit_state:` field from `Provider#health_baseline` and from all spec assertions; availability is probe-cleared only, not modelled as a circuit breaker.
70
+ - **spec path** — Renamed `spec/…/actors/fleet_worker_spec.rb` to `spec/…/actor/fleet_worker_spec.rb` to match the `Actor::FleetWorker` module path and satisfy `RSpec/SpecFilePathFormat`.
71
+ - **INSTANCE_DEFAULTS constant** — Extracted default instance settings hash to `AzureFoundry::INSTANCE_DEFAULTS` to reduce `default_settings` line count below the `Metrics/ModuleLength` limit.
72
+
73
+ ## [0.3.1] - 2026-08-13
74
+
75
+ ### Fixed
76
+ - **§1 / §8 compliance sweep** — Removed all `rubocop:disable` comments. Extracted helper modules (`HealthCheckHelpers`, `OfferingBuilderHelpers`, `InstanceConfigHelpers`, `InstanceIdentityHelpers`, `ProbeHelpers`, `ShutdownHelpers`) from `DiscoveryRefresh` to bring `Metrics/ClassLength` and `Metrics/AbcSize` into conformance.
77
+ - **§8 health firewall** — `AzureFoundryCallable#classify_server_error` now maps 503 to `:instance_unavailable` ONLY when the Azure `EndpointDeactivated` error code appears in the response body; all other 5xx (including plain 503 overload) remain `:overloaded` or `:provider_error`. `Faraday::ConnectionFailed` and `Faraday::TimeoutError` remain request-local and never promote the instance to unavailable.
78
+ - **§9 / settings guards** — Removed `def settings` override in `Provider` that called `.dig(:instances, :default)`. Removed `settings[:discovery_interval] || ...` and all `settings.dig(...)` patterns in `DiscoveryRefresh`; replaced with direct canonical path access (`settings[:discovery][:interval_seconds]`, `settings[:instances][:default][...]`).
79
+ - **§2 / single publication engine** — Removed `registry_publisher.publish_readiness_async` call from `Provider#readiness` and `registry_publisher.publish_models_async` call from `Provider#list_models`; publication is now exclusively through `Inventory::Publisher` in the discovery actor.
80
+ - Vision capability evidence in `OfferingBuilderHelpers` now emits `:unknown` / `:default_false` instead of inferring support from model name regex (which is not authoritative proof).
81
+ - Discovery interval default overridden to 3600 s via `provider_settings(discovery: { interval_seconds: 3600 })` to match the previous actor behaviour.
82
+
83
+ ## [0.3.0] - 2026-08-13
84
+
85
+ ### Changed
86
+ - **SSOT v3 migration** — Rewrote `DiscoveryRefresh` actor to use `Inventory::Publisher` for instance lifecycle (claim/activate/replace/remove) instead of the legacy `ScopedRefresher` mixin and `Legion::LLM::Call::Registry`.
87
+ - Added `AzureFoundryCallable` class implementing `disconnect`, `disconnected?`, `normalize_dispatch_error(error:)`, and dispatch operations (`chat`, `stream_chat`, `embed`, `count_tokens`).
88
+ - Fleet worker now passes `registry: Legion::Extensions::Llm::Inventory::Registry` for exact fleet execution.
89
+ - Instance identity derived from normalized endpoint host:port plus API key fingerprint (first 6 hex of SHA256).
90
+ - Offerings publish deployment-scoped quota domains (`azure:deployment:<name>`).
91
+ - Operation evidence covers all `Taxonomies::OPERATIONS`: chat/stream_chat supported, embed conditional on deployment type, count_tokens/image/transcribe/translate/speak/moderate unsupported.
92
+ - Bumped `lex-llm` dependency floor to `>= 0.7.0`.
93
+
94
+ ### Removed
95
+ - Removed `ScopedRefresher` include and all references to `Legion::LLM::Call::Registry`.
96
+ - Removed legacy `compute_lanes_for_scope`, `scope_key`, `credential_hash` methods.
97
+
3
98
  ## [0.2.17] - 2026-08-07
4
99
 
5
100
  ### Fixed
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