Module: RubyLLM::Providers::Bedrock::Mantle

Included in:
Anthropic, ChatCompletions, Responses
Defined in:
lib/ruby_llm/providers/bedrock/mantle.rb,
lib/ruby_llm/providers/bedrock/mantle/voxtral.rb,
lib/ruby_llm/providers/bedrock/mantle/anthropic.rb,
lib/ruby_llm/providers/bedrock/mantle/responses.rb,
lib/ruby_llm/providers/bedrock/mantle/chat_completions.rb

Overview

Shared plumbing for protocols served by the bedrock-mantle endpoint. Mantle speaks the vendors' own wire formats rather than Converse, so each protocol subclasses its family and mixes this in to borrow the provider's mantle connection and SigV4-sign every request for the bedrock-mantle service.

Defined Under Namespace

Classes: Anthropic, ChatCompletions, Responses, Voxtral

Constant Summary collapse

SIGNING_SERVICE =
'bedrock-mantle'
RESPONSES_MODELS =

Mantle serves Claude on the Anthropic Messages API and everything else on one of the two OpenAI surfaces. Only these models answer on v1/responses; the rest of the non-Claude catalog answers on v1/chat/completions and rejects v1/responses outright.

%w[
  google.gemma-4-26b-a4b
  google.gemma-4-31b
  google.gemma-4-e2b
  openai.gpt-oss-20b
  openai.gpt-oss-120b
].freeze

Instance Method Summary collapse

Instance Method Details

#initialize(provider, model = nil) ⇒ Object



26
27
28
29
# File 'lib/ruby_llm/providers/bedrock/mantle.rb', line 26

def initialize(provider, model = nil)
  super
  @connection = provider.mantle_connection
end