class Riffer::Providers::AmazonBedrock
Amazon Bedrock provider for Claude and other foundation models. Requires the aws-sdk-bedrockruntime gem.
Constants
- ANTHROPIC_MODEL_PATTERN
-
Matches Anthropic models on Bedrock β bare (
anthropic.claude-...) and cross-region (us.anthropic.claude-...) ids. - FINISH_REASONS
Public Class Methods
Source
# File lib/riffer/providers/amazon_bedrock.rb, line 41 def initialize super depends_on "aws-sdk-bedrockruntime" end
Calls superclass method
Source
# File lib/riffer/providers/amazon_bedrock.rb, line 35 def self.semconv_provider_name "aws.bedrock" end
The GenAI semconv well-known provider name.
Source
# File lib/riffer/providers/amazon_bedrock.rb, line 26 def self.skills_adapter(model = nil) return Riffer::Skills::XmlAdapter if model && ANTHROPIC_MODEL_PATTERN.match?(model) Riffer::Skills::MarkdownAdapter end
Returns the skill adapter for the Bedrock model β XML for Anthropic models (which Bedrock hosts alongside other vendorsβ), else Markdown.