Skip to content
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

[Bug] Boto Session doesn't support Session Token #2230

Open
FelipeCCSacramento opened this issue Feb 25, 2025 · 0 comments
Open

[Bug] Boto Session doesn't support Session Token #2230

FelipeCCSacramento opened this issue Feb 25, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@FelipeCCSacramento
Copy link

Description

Boto Session doesn't support Session Token

Steps to Reproduce

~/.aws/credentials

[my_profile]
aws_access_key_id = XXXXXX
aws_secret_access_key = XXXXXX
aws_session_token = XXXXXXXXXXXXXXXXXXXXXXXX
aws_security_token = XXXXXXXXXXXXXXXXXXXXXXXX
x_security_token_expires = 2025-02-25T21:22:42+00:00
import boto3

from agno.agent import Agent
from agno.models.aws.claude import Claude

session = boto3.Session(profile_name="my_profile")

model_id = "us.anthropic.claude-3-5-haiku-20241022-v1:0"
model = Claude(id=model_id, session=session)

agent = Agent(
    model=model,
    instructions="You are a Claude model trained on haiku. Write a haiku about the current weather.",
    markdown=True,
    stream=True,
)

agent.print_response("The sun is shining", stream=True)

Agent Configuration (if applicable)

Provide relevant agent configuration.

Expected Behavior

Image

Actual Behavior

Image

Screenshots or Logs (if applicable)

Include any relevant screenshots or error logs that demonstrate the issue.

Environment

  • OS: macOS 15.3
  • Browser (if relevant): N/A
  • Agno Version: v1.1.6
  • External Dependency Versions:
    boto3==1.37.0
  • Additional Environment Details: Python 3.12

Possible Solutions (optional)

I have tested adding aws_session_token param to client_params and it worked, then I realized that Claude class doesn't support session token at all. I could find the problem but I don't have much with python to submit a pull request and make sure I'm not breaking anything.
Image

Additional Context

Add any other context or details about the problem here.

@FelipeCCSacramento FelipeCCSacramento added the bug Something isn't working label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant