Skip to content

Add initial support for bedrock #26

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 1 commit into from
Apr 9, 2025
Merged

Add initial support for bedrock #26

merged 1 commit into from
Apr 9, 2025

Conversation

kujtimiihoxha
Copy link
Collaborator

To use claude bedrock 3.7 use the model

{
  "model": {
    "coder": "bedrock.claude-3.7-sonnet",
    "coderMaxTokens": 20000
  },
  "lsp": {
    "gopls": {
      "command": "gopls"
    }
  }
}

@kujtimiihoxha
Copy link
Collaborator Author

@adamdottv this adds initial support for bedrock.

It uses the AWS_REGION or DEFAULT_AWS_REGION to prefix the model name (bedrock is weird)

Also termai does not do anything to setup your aws credentials so it assumes you are authenticated.

Also currently the bedrock provider does not use caching.

@kujtimiihoxha kujtimiihoxha merged commit 193d243 into main Apr 9, 2025
@adamdottv
Copy link
Contributor

@kujtimiihoxha i pulled latest and did a go build, but i'm not able to get it to send anything, when i type a new message and hit enter it just sits there (no debug log messages either)

@kujtimiihoxha
Copy link
Collaborator Author

kujtimiihoxha commented Apr 9, 2025

@adamdottv pull latest now and see what logs you see when you click 'L' I added some better logging support (to go back just click backspace/delete). If you still don't see anything I can help debug.

@adamdottv
Copy link
Contributor

Screenshot 2025-04-09 at 12 39 09 PM

cc @kujtimiihoxha

@kujtimiihoxha
Copy link
Collaborator Author

@adamdottv ok so I was able to reproduce this, the issue is the AWS session what I had to do to make it work is

aws sso login --profile MY_PROFILE
export AWS_REGION=us-east-1
export AWS_PROFILE=MY_PROFILE

go run main.go

This works. Also pull the latest stuff I added the default region so the region env is not needed and also fixed some small things.

@kujtimiihoxha
Copy link
Collaborator Author

@adamdottv make sure to also get the latest changes, I fixed a couple of things and made logs better, i also added the ability to cancel the message when you are focused on the editor just click control+x (if you have a better shortcut let me know 😂 )

kujtimiihoxha added a commit that referenced this pull request Apr 17, 2025
Add initial support for bedrock
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.

2 participants