Module: Legion::Extensions::Llm::Fleet::Protocol

Defined in:
lib/legion/extensions/llm/fleet/protocol.rb

Constant Summary collapse

VERSION =

Fleet protocol v3 — the contract cut (06 P1). v2 envelopes are rejected by design; there is no dual-protocol coexistence.

3
REQUEST_TYPE =
'llm.fleet.request'
RESPONSE_TYPE =
'llm.fleet.response'
ERROR_TYPE =
'llm.fleet.error'
LEGACY_FIELDS =

P4: v1 legacy options rejected at both edges (one list).

%i[schema_version request_type fleet_correlation_id].freeze
EXACT_EXECUTION_CONTRACT =

Every request is exact-execution (06 P2): the marker is REQUIRED and must equal this value (it names the contract semantics, not the protocol version). Marker absence is rejected.

'exact_offering_v1'
EXACT_REQUIRED_FIELDS =
%i[
  execution_contract offering_id provider provider_instance model operation
].freeze
EXACT_SIGNED_SCALAR_CLAIMS =
%i[
  execution_contract offering_id
].freeze
REQUIRED_FIELDS =

The complete required envelope field set (06 E2) — the 16 protocol fields plus the two exact fields. Both edges (FleetRequest and ProviderResponder) consume this one list.

%i[
  request_id correlation_id idempotency_key operation provider provider_instance model params reply_to
  message_context caller trace_context signed_token timeout_seconds expires_at protocol_version
  execution_contract offering_id
].freeze