8000 Add support for Anthropic Model from AWS Bedrock by subhamX · Pull Request #23 · askui/vision-agent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support for Anthropic Model from AWS Bedrock #23

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 8000 account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

subhamX
Copy link
@subhamX subhamX commented Jan 30, 2025

Closes #18

The following pull request add support for AWS bedrock provider. Clients can now either set ANTHROPIC_BEDROCK_PROFILE or ANTHROPIC_API_KEY.

Copy link
Contributor
@adi-wan-askui adi-wan-askui left a comment

Choose a reason for hiding this comment

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

Hey @subhamX, sorry for the time it took to get to your PR.

Thanks for the awesome contribution! Solid work :)

Just some minor remarks before we are able to merge it.

There were some changes to main in the meantime, so we need to resolve some conflicts first. I think easiest would be to rebase. Let me know if you need help or I should take this over.

@@ -11,6 +11,7 @@ dependencies = [
"pillow>=11.0.0",
"pydantic>=2.9.2",
"anthropic>=0.37.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Rm as the new anthropic[bedrock] takes precedence

Comment on lines +41 to +42
else:
raise ValueError("ANTHROPIC_API_KEY or ANTHROPIC_BEDROCK_PROFILE must be set")
Copy link
Contributor

Choose a reason for hiding this comment

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

It is fine if they are not set as there might be other models available. So either a debug or info log is fine from my perspective.

Comment on lines -16 to -18
self.authenticated = True
if os.getenv("ANTHROPIC_API_KEY") is None:
self.authenticated = False
Copy link
Contributor

Choose a reason for hiding this comment

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

authenticated property cannot be removed as the ModelRouter logic depends on it. Instead would extend it to account for the new env variable to "authenticate" (maybe you can use a property or method exposed by api client to check if it is really authenticated but also fine to just check the env variable but would also encapsulate that in the provider similar to client and model name)

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.

Support for Anthropic Model from AWS Bedrock
2 participants
0