Skip to content

[BUG] AWS Bedrock configuration documentation wrong #595

@AJDoubleW

Description

@AJDoubleW

Basic checks

  • I searched existing issues - this hasn't been reported
  • I can reproduce this consistently
  • This is a RubyLLM bug, not my application code

What's broken?

The RubyLLM Configuration documentation claims that the Standard AWS Credential chain is used if bedrock_api_key and bedrock_secret_key are not set.

However, this is not the case:

[1] pry(main)> RubyLLM.config
=> #<RubyLLM::Configuration:0x000000013cabca88
 @bedrock_region="us-east-1",
 @default_embedding_model="text-embedding-3-small",
 @default_image_model="gpt-image-1",
 @default_model="us.anthropic.claude-sonnet-4-20250514-v1:0",
 @http_proxy=nil,
 @log_file=#<IO:<STDOUT>>,
 @log_level=1,
 @log_stream_debug=false,
 @max_retries=3,
 @request_timeout=120,
 @retry_backoff_factor=2,
 @retry_interval=0.1,
 @retry_interval_randomness=0.5>
[2] pry(main)> RubyLLM.chat
RubyLLM::ConfigurationError: Missing configuration for Bedrock: bedrock_api_key, bedrock_secret_key (RubyLLM::ConfigurationError)
from /Users/awalterswilliams/.local/share/mise/installs/ruby/3.4.4/lib/ruby/gems/3.4.0/gems/ruby_llm-1.6.4/lib/ruby_llm/provider.rb:201:in 'RubyLLM::Provider#ensure_configured!'
[3] pry(main)> 

I was super pleased when reading the docs to find out that the bedrock provider uses the default AWS credential chain, rather than API keys as that would make deployments much easier, however disappointed to find that isn't the case: https://github.com/crmne/ruby_llm/blob/main/lib/ruby_llm/providers/bedrock.rb#L77

Do you plan to support AWS credential chain authentication for bedrock or not? I'm confused

How to reproduce

n/a - documentation issue

Expected behavior

n/a - documentation issue

What actually happened

n/a - documentation issue

Environment

n/a - documentation issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions