lex-llm-azure-foundry 0.2.16 → 0.3.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: 575cf651026b97a907767f5f47df08130daa68e9b1277b669d952807ece48a78
4
- data.tar.gz: c3a10172c1a1ce5a2c11231a5662f700796d1ccfcf8d35362a037d1ce0a35144
3
+ metadata.gz: 4bd55b677c93605664cd0865b329ecb256da01604c0d4e518f0fc4f60aa881b1
4
+ data.tar.gz: 59b84b52669fcb74740f563acc88e05b12e24e93765354f0b0f306d21ce9c4d9
5
5
  SHA512:
6
- metadata.gz: 5310fb910f2f324aaee5be51b3ae62512d86bfcd7fdef8f54626fe78b5dd46cb6d39e87ef668edb85ecbb52778e9623347e6ff2f6b212b4745a1a4ad8bcec4e7
7
- data.tar.gz: 10025496484a5d892730c21391601133005f1ac4c0723cb60bc26547c8bb8f6883e7eab94ac13c30b9942653925f00478749ca3bfc6118209866afe2827a2d90
6
+ metadata.gz: c5171449f55eb43c93f88ece8a3e2db532a51be1176d29c0769d926b10add693296ca78002360f5525ee5412b7ec4b43b40e96a24a5255aca256a9cca511567e
7
+ data.tar.gz: e804a59536425ff887d8b0d6787c801ed78280e239634c7be0749a513d366b17db5a9be12f58a548b3760e6f67148ba577da345ee99864089f0902da498d03fe
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,80 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.4] - 2026-08-18
4
+
5
+ ### Fixed
6
+ - **Default instance labels** — Accept `default` as an ordinary operator
7
+ `InstanceKey` label, matching the shared `lex-llm` identity contract.
8
+
9
+ ## [0.3.3] - 2026-08-16
10
+
11
+ ### Changed
12
+ - **Instance identity is the operator's config name** — the discovery actor now
13
+ publishes `InstanceKey.instance_id` as the config NAME (the key the router
14
+ resolves `instances.<name>` settings — per-instance tuning, `enable_*`
15
+ overrides — by), restoring the baseline semantics. The previously-derived
16
+ `host:port[/ak:fingerprint]` id is kept as the **secondary** `InstanceKey`
17
+ `physical_id` field (dedup/diagnostics only; it never participates in
18
+ equality, hashing, or registry-scope identity). Two config names pointing at
19
+ the same endpoint stay distinct instances; the credential fingerprint still
20
+ distinguishes same-name configs in diagnostics. `physical_id` is threaded
21
+ through every `Inventory::Publisher` lifecycle call and onto offering
22
+ metadata.
23
+ - **Authoritative operation evidence for embedding deployments** — an embedding
24
+ deployment now publishes `chat: :unsupported` and `stream_chat: :unsupported`
25
+ (with `embed: :supported`), matching how bedrock authoritatively excludes
26
+ embedding models, so a plain chat request can no longer misroute to an
27
+ embedding-only deployment.
28
+ - **Dependency floor** — `lex-llm` raised to `>= 0.7.1` (the
29
+ `InstanceKey#physical_id` secondary field).
30
+
31
+ ### Fixed
32
+ - **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.
33
+
34
+ ## [0.3.2] - 2026-08-13
35
+
36
+ ### Fixed
37
+ - **§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`).
38
+ - **§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.
39
+ - **§1 — swallowed rescue** — `extract_host_port` in `InstanceIdentityHelpers` now calls `handle_exception` and re-raises on `URI::InvalidURIError` instead of silently returning `'unknown:0'`.
40
+ - **§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).
41
+ - **§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.
42
+ - **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`.
43
+ - **INSTANCE_DEFAULTS constant** — Extracted default instance settings hash to `AzureFoundry::INSTANCE_DEFAULTS` to reduce `default_settings` line count below the `Metrics/ModuleLength` limit.
44
+
45
+ ## [0.3.1] - 2026-08-13
46
+
47
+ ### Fixed
48
+ - **§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.
49
+ - **§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.
50
+ - **§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][...]`).
51
+ - **§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.
52
+ - Vision capability evidence in `OfferingBuilderHelpers` now emits `:unknown` / `:default_false` instead of inferring support from model name regex (which is not authoritative proof).
53
+ - Discovery interval default overridden to 3600 s via `provider_settings(discovery: { interval_seconds: 3600 })` to match the previous actor behaviour.
54
+
55
+ ## [0.3.0] - 2026-08-13
56
+
57
+ ### Changed
58
+ - **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`.
59
+ - Added `AzureFoundryCallable` class implementing `disconnect`, `disconnected?`, `normalize_dispatch_error(error:)`, and dispatch operations (`chat`, `stream_chat`, `embed`, `count_tokens`).
60
+ - Fleet worker now passes `registry: Legion::Extensions::Llm::Inventory::Registry` for exact fleet execution.
61
+ - Instance identity derived from normalized endpoint host:port plus API key fingerprint (first 6 hex of SHA256).
62
+ - Offerings publish deployment-scoped quota domains (`azure:deployment:<name>`).
63
+ - Operation evidence covers all `Taxonomies::OPERATIONS`: chat/stream_chat supported, embed conditional on deployment type, count_tokens/image/transcribe/translate/speak/moderate unsupported.
64
+ - Bumped `lex-llm` dependency floor to `>= 0.7.0`.
65
+
66
+ ### Removed
67
+ - Removed `ScopedRefresher` include and all references to `Legion::LLM::Call::Registry`.
68
+ - Removed legacy `compute_lanes_for_scope`, `scope_key`, `credential_hash` methods.
69
+
70
+ ## [0.2.17] - 2026-08-07
71
+
72
+ ### Fixed
73
+ - Remove dead legacy discovery calls from `#manual` actor method (closes #154).
74
+
75
+ ### Removed
76
+ - Deleted `populate_auto_rules`, `refresh_discovered_models!`, and `invalidate_offerings_cache!` invocations that targeted APIs removed from the SSOT router.
77
+
3
78
  ## [0.2.16] - 2026-08-04
4
79
 
5
80
  ### 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.1'
31
31
  end