lex-llm-anthropic 0.2.28 → 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: c435b967347c36e1eefaad9266a0d819f1862f5f7ab0a0ca8606c25352191657
4
- data.tar.gz: 9f1a21331ee5108e1ed5082a0fb9d91866240d6e4d90fb69b9fb8c19ea6e58c4
3
+ metadata.gz: 37a7bf28c47d62711e925d75c0717bf45c952d4b899a5c84794f7544a395ad21
4
+ data.tar.gz: caad53642cf6b4123b41a30a0941dae91c587b7c79e89f16c49d737fb76aae13
5
5
  SHA512:
6
- metadata.gz: eed3b29603fb58b3b5869d04c0b49239e2039e4b6ba8841da9faa587dda374d44f60ec5535a894b0eada2634211b790cab079a6723f3b9c516c4ee812e068b4e
7
- data.tar.gz: 1d73e364e5773b9c763d6bb433768ddf7bbfc6b3003e347caf9920259ed711009da7fc7369149d2a0d4856ee7a256a2041ee7e1894925a766dc0c757a9e6e402
6
+ metadata.gz: 217cbbf2136c44b3a362c78a8d787c646ac6a93746a3bd967a279301023cc5050e39fef902c38e624c1f7080806785784c1df93432c469c96221dbfb059c66b9
7
+ data.tar.gz: d6677021c2251c507705c6ada10d5378f54d97e20ea7176b0b00099ca62269063d593fce722c3d051dae53294eca1a8797769b7bf4edb18fb519fea485ef8b5b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,115 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.5] - 2026-08-19
4
+
5
+ ### Changed
6
+ - **Write-time SSOT lane weights** — Anthropic discovery now computes the validated four-axis weight pair for every offering and reconciles weight-only changes on the existing periodic discovery cadence. Initial and recovery activation rebuild from current settings, and publication, sequence, and cache mutation share the actor's existing serialization boundary.
7
+ - **Dependency floor** — Requires `lex-llm >= 0.7.6` for the shared weight schema, immutable record pair, dormant-weight tracker, and atomic reconciler. The existing `legion-settings` floor and lifecycle remain unchanged.
8
+
9
+ ### Fixed
10
+ - **Complete discovery change detection** — Ordinary discovery cadence now compares the full stable `OfferingDraft` contract, excluding only telemetry-only evidence timestamps. Provider-native identity, evidence authority and metadata, scalar limits, quota domains, offering metadata, publication source, and weights all trigger one atomic replacement when changed; catalog reordering remains stable without collapsing duplicate offerings.
11
+ - **Two-phase publication races** — Offering and weight validation now completes before allocating a callable, probe coordinator, publisher token, registry scope, or local state; malformed weight configuration cannot strand an untracked claim or activate a healthy zero-lane instance. Claimed instances are tracked as unpublished before readiness I/O; removal wins a late-readiness race, and publisher failures leave cached state retryable without sequence drift.
12
+ - **Callable-path system conformance** — The provider formatter now accepts folded canonical messages as well as the legacy message shape. An end-to-end canonical fixture proves a folded leading system message reaches Anthropic's rendered native `system` field.
13
+
14
+ ## [0.3.4] - 2026-08-18
15
+
16
+ ### Fixed
17
+ - **Synthetic default is claimable** — Removed the discovery skip branch and once-per-boot warning for the synthetic `instances.default` configuration; normal credential validation now decides whether it can be activated.
18
+
19
+ ## [0.3.3] - 2026-08-17
20
+
21
+ ### Changed
22
+ - **SSOT v3 fail-forward instance identity** — `DiscoveryRefresh` now publishes the operator's
23
+ config NAME as the `InstanceKey` `instance_id` (the key the router resolves `instances.<name>`
24
+ settings by); the derived `host:port` / `host:port/ak:<8-char credential digest>` rides along as
25
+ the secondary `physical_id` for dedup and diagnostics only (excluded from InstanceKey
26
+ equality/hash). Two config names on the same endpoint + credential stay distinct instances
27
+ (no collapse). Reserved config names (`default` — the synthetic settings bucket) are skipped at
28
+ the claim boundary with a log instead of raising `ValidationError` every tick.
29
+ - **Embedding models publish authoritative operation evidence** — Models served as the embedding
30
+ class (catalog `type: 'embedding'` or `embed` in the model id) publish `chat: :unsupported`
31
+ (all chat operations unsupported) and `embed: :supported` with `:provider_catalog` source, so a
32
+ plain chat request can never misroute to them; their capability evidence is
33
+ `embedding: :supported` and nothing else (no completion/tools/etc.). Non-embedding models are
34
+ unchanged.
35
+ - **lex-llm floor raised to 0.7.1** — Requires the SSOT v3 inventory foundation with config-name
36
+ `instance_id` + secondary `physical_id` support on `InstanceKey` and the publisher API.
37
+
38
+ ### Fixed
39
+ - **Single actor registration** — The provider module no longer extends Core at file level, so the
40
+ boot-time submodule walk skips it and the gem's own top-level extension load is the sole actor
41
+ registration (eliminates the double-claim / `FencedPublisherError`).
42
+ - **Synthetic-default skip warn now fires once per boot** — The `synthetic_default` skip warning
43
+ (unmodified `instances.default` template) is throttled to once per actor lifetime instead of
44
+ every discovery tick (was permanent WARN noise — an unconfigured provider is the normal state).
45
+
46
+ ## [0.3.2] - 2026-08-13
47
+
48
+ ### Fixed
49
+ - **§1 settings guards removed (R2 pass)** — Eliminated remaining `||` fallbacks on registered
50
+ settings in `Provider#render_payload` (`|| 4096` on `settings[:default_max_tokens]`) and
51
+ `Translator#settings_default_max_tokens` / `#default_thinking_budget` / `#prompt_caching_settings`.
52
+ Registered `default_thinking_budget: 1024` as a canonical default in `Anthropic.default_settings`.
53
+ Replaced `Legion::Settings.dig(...)` + `|| {}` in `Translator#prompt_caching_settings` with direct
54
+ access via the registered default — `Translator#initialize` now seeds `@config` from the
55
+ registered instance defaults so all settings keys are always present without a Settings fallback.
56
+ - **§2 dead second publication engine removed** — Deleted `attr_writer :registry_publisher` and the
57
+ `registry_publisher` class method from `Provider`. The artifact was non-functional (no callers)
58
+ but violated the single-publication-path invariant by keeping the old `RegistryPublisher`
59
+ reachable from the class interface.
60
+
61
+ ## [0.3.1] - 2026-08-13
62
+
63
+ ### Fixed
64
+ - **§8 health firewall** — Removed the connection_failure → :instance_unavailable promotion from
65
+ `AnthropicSsotHarness#apply_anthropic_escalation`. Connection failures, timeouts, 529
66
+ `overloaded_error`, and generic 5xx are all request-local and must never mutate global instance
67
+ availability. Added `AnthropicExplicitUnavailableError` as the explicit service-unavailable signal
68
+ for conformance harness testing; rewrote the firewall assertion to prove `Faraday::ConnectionFailed`
69
+ stays `:connection_failure`, never `:instance_unavailable`.
70
+ - **§9 default model injection removed** — `Translator#render_request` no longer injects
71
+ `'claude-sonnet-4'` when the canonical request carries no model. An omitted model is an empty
72
+ constraint, never a default; the Anthropic API will reject the request if required fields are absent.
73
+ - **§2/§5 second publication engine removed** — `Provider#discover_offerings` no longer calls
74
+ `registry_publisher.publish_models_async`. The SSOT v3 `DiscoveryRefresh` actor is now the only
75
+ publication path. Removed the now-unused `discovery_registry_readiness` private method.
76
+ - **§1 swallowed rescue removed** — Replaced `coordinator&.finish_probe rescue nil` with
77
+ explicit `begin/rescue` that calls `handle_exception` so finish_probe errors are logged and never
78
+ silently swallowed. Removed `# rubocop:disable Style/RescueModifier` inline annotations.
79
+ - **§1 settings guards removed** — Eliminated `||` fallbacks and `.dig` guards on registered
80
+ settings in `DiscoveryRefresh`. Added `discovery_interval: 3600` as a registered default in
81
+ `Anthropic.default_settings`; all settings are now read through the standards-defined access path.
82
+
83
+ ## [0.3.0] - 2026-08-13
84
+
85
+ ### Changed
86
+ - **SSOT v3 provider migration** — Replaced the ScopedRefresher-based `DiscoveryRefresh` actor with a
87
+ full SSOT v3 actor backed by `Legion::Extensions::Llm::Inventory::Publisher`. The actor claims instances,
88
+ discovers models via safe `GET /v1/models` (no inference), runs readiness probing, and publishes complete
89
+ `OfferingDraft` snapshots atomically. Supports tick-based refresh and coalesced reactive probes via
90
+ `ProbeCoordinator` after dispatch-triggered `instance_unavailable` transitions.
91
+ - **`AnthropicCallable`** — New callable wrapper implementing `disconnect` and
92
+ `normalize_dispatch_error(error:)`. Anthropic 529 `overloaded_error` is always `:overloaded`, never
93
+ `:instance_unavailable`. Only transport-layer `ConnectionFailed` maps to `:connection_failure` (which
94
+ the actor harness may escalate). 429 → `:rate_limited`, timeouts → `:timeout`.
95
+ - **Instance identity** — Derived from normalized endpoint host:port + SHA256 8-char credential fingerprint
96
+ (`host:port/ak:XXXXXXXX`). Stable across restarts; deterministic from inputs.
97
+ - **Operations** — chat/stream_chat: supported; embed/image/transcribe/translate/speak/moderate: unsupported;
98
+ count_tokens: unknown. Source evidence: `:provider_implementation` for supported/unsupported,
99
+ `:default_false` for unknown.
100
+ - **Capabilities** — completion/streaming/tools/vision: supported (`:provider_implementation`); thinking:
101
+ unknown (`:default_false` unless model metadata indicates reasoning); embedding: unsupported.
102
+ - **Removed** `DEFAULT_MODEL` constant, `resolve_default_model` method, and `default_model` injection
103
+ from `discover_instances`. No default model or provider in SSOT v3.
104
+ - **Removed** `RegistryEventBuilder` — replaced by the common `Inventory::Publisher`.
105
+ - **Fleet worker** — Added `registry: Legion::Extensions::Llm::Inventory::Registry` kwarg to
106
+ `ProviderResponder.call`.
107
+ - **Gemspec** — Raised `lex-llm` floor to `>= 0.7.0`.
108
+ - **Conformance spec** — Added `spec/legion/extensions/llm/anthropic_ssot_v3_conformance_spec.rb` with
109
+ `AnthropicSsotHarness` and `it_behaves_like 'an SSOT v3 provider adapter'` plus provider-specific
110
+ assertions (identity, 529-always-overloaded, two-instance lane isolation, ProbeCoordinator coalescing,
111
+ no DEFAULT_MODEL, no Legion::LLM reverse dependency).
112
+
3
113
  ## [0.2.28] - 2026-08-04
4
114
 
5
115
  ### 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