Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add support for AWS_PROFILE in Bedrock model requirements #400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 6, 2025

Conversation

lightme16
Copy link
Contributor

Update code to support AWS Bedrock, so we could just pass profile name instead of hardcoding AWS credentials each time. Currently it returns error:

│ /holmesgpt/holmes/core/llm.py:73 in │
│ __init__                                                                     │
│                                                                              │
│    70 │   │   self.args = args                                               │
│    71 │   │                                                                  │
│    72 │   │   if not args:                                                   │
│ ❱  73 │   │   │   self.check_llm(self.model, self.api_key)                   │
│    74 │                                                                      │
│    75 │   def check_llm(self, model: str, api_key: Optional[str]):           │
│    76 │   │   logging.debug(f"Checking LiteLLM model {model}")               │
│                                                                              │
│ /holmesgpt/holmes/core/llm.py:125   │
│ in check_llm                                                                 │
│                                                                              │
│   122 │   │   │   model_requirements = litellm.validate_environment(model=mo │
│   123 │   │                                                                  │
│   124 │   │   if not model_requirements["keys_in_environment"]:              │
│ ❱ 125 │   │   │   raise Exception(                                           │
│   126 │   │   │   │   f"model {model} requires the following environment var │
│   127 │   │   │   )                                                          │
│   128                                                                        │
╰──────────────────────────────────────────────────────────────────────────────╯
Exception: model bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0 requires 
the following environment variables: ['AWS_ACCESS_KEY_ID', 
'AWS_SECRET_ACCESS_KEY']


@CLAassistant
Copy link

CLAassistant commented May 6, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@arikalon1 arikalon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @lightme16

nice work

@arikalon1 arikalon1 merged commit 177e6ab into robusta-dev:master May 6, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants