Class: Legion::Extensions::Llm::Routing::QuotaDomainKey

Inherits:
Data
  • Object
show all
Defined in:
lib/legion/extensions/llm/routing/records.rb

Overview

A non-secret, provider-scoped quota domain. Equality never crosses provider family. See section 15.2.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(provider_family:, opaque_id:) ⇒ QuotaDomainKey

Returns a new instance of QuotaDomainKey.



36
37
38
39
40
41
42
43
# File 'lib/legion/extensions/llm/routing/records.rb', line 36

def initialize(provider_family:, opaque_id:)
  super(
    provider_family: Legion::Extensions::Llm::Inventory::RecordSupport.normalize_provider_family(
      value: provider_family
    ),
    opaque_id: Legion::Extensions::Llm::Inventory::Identity.normalize_text(value: opaque_id, field: :opaque_id)
  )
end

Instance Attribute Details

#opaque_idObject (readonly)

Returns the value of attribute opaque_id

Returns:

  • (Object)

    the current value of opaque_id



35
36
37
# File 'lib/legion/extensions/llm/routing/records.rb', line 35

def opaque_id
  @opaque_id
end

#provider_familyObject (readonly)

Returns the value of attribute provider_family

Returns:

  • (Object)

    the current value of provider_family



35
36
37
# File 'lib/legion/extensions/llm/routing/records.rb', line 35

def provider_family
  @provider_family
end