Class: ActiveHarness::Providers::Bedrock

Inherits:
Base
  • Object
show all
Defined in:
lib/active_harness/providers/bedrock.rb

Overview

AWS Bedrock — stub provider.

Bedrock requires AWS Signature V4 request signing, which is non-trivial to implement and carries AWS SDK dependencies. This stub raises a clear error so that the agent falls through to the next model in its fallback chain.

To use Bedrock in production, please look for a dedicated gem, for example:

gem "active_harness-bedrock"  (not yet released — contributions welcome)

Example agent config (will fall through to the next fallback):

model do
  use      provider: :bedrock, model: "anthropic.claude-3-5-sonnet-20241022-v2:0"
  fallback provider: :anthropic, model: "claude-3-5-sonnet-20241022"
end

Constant Summary collapse

STUB_MESSAGE =
<<~MSG.strip
  ActiveHarness: AWS Bedrock provider is not built-in.
  Bedrock requires AWS Signature V4 signing — please use a dedicated gem.
  Falling through to the next model in the fallback chain.
MSG

Constants inherited from Base

ActiveHarness::Providers::Base::HTTP, ActiveHarness::Providers::Base::STREAMING_HTTP

Instance Method Summary collapse

Instance Method Details

#call(model:, messages:, temperature: 0.7) ⇒ Object

rubocop:disable Lint/UnusedMethodArgument



24
25
26
# File 'lib/active_harness/providers/bedrock.rb', line 24

def call(model:, messages:, temperature: 0.7) # rubocop:disable Lint/UnusedMethodArgument
  raise Errors::ProviderUnavailableError, STUB_MESSAGE
end