mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
Fix(backend): correctly forward AWS Bedrock aws_access_key_id / aws_secret_access_key / aws_region_name to litellm (#9663)
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
This commit is contained in:
@@ -166,6 +166,17 @@ class LLM(RetryMixin, DebugMixin):
|
||||
elif 'gemini' in self.config.model.lower() and self.config.safety_settings:
|
||||
kwargs['safety_settings'] = self.config.safety_settings
|
||||
|
||||
# support AWS Bedrock provider
|
||||
kwargs['aws_region_name'] = self.config.aws_region_name
|
||||
if self.config.aws_access_key_id:
|
||||
kwargs['aws_access_key_id'] = (
|
||||
self.config.aws_access_key_id.get_secret_value()
|
||||
)
|
||||
if self.config.aws_secret_access_key:
|
||||
kwargs['aws_secret_access_key'] = (
|
||||
self.config.aws_secret_access_key.get_secret_value()
|
||||
)
|
||||
|
||||
# Explicitly disable Anthropic extended thinking for Opus 4.1 to avoid
|
||||
# requiring 'thinking' content blocks. See issue #10510.
|
||||
if 'claude-opus-4-1' in self.config.model.lower():
|
||||
|
||||
Reference in New Issue
Block a user