Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

(WIP) feat: aws bedrock adapter#116

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
chunterb wants to merge9 commits intoTanStack:main
base:main
Choose a base branch
Loading
fromchunterb:feat/bedrock-adapter

Conversation

@chunterb
Copy link

🎯 Changes

✅ Checklist

  • I have followed the steps in theContributing guide.
  • I have tested this code locally withpnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated achangeset.
  • This change is docs/CI/dev-only (no release).

JohannesKonings reacted with thumbs up emojiJohannesKonings reacted with eyes emoji
@chunterbchunterb marked this pull request as draftDecember 7, 2025 17:12
interface ModelMeta<TProviderOptions = unknown> {
name: string
id: string
supports: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

@AlemTuzlak I've added this, but curious if this adapter should diverge from how we determine the modalities that a model has, when compared to other adapters (type map)?

I've left the type map for now.

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry, we didn't understand each other, yes what you added is what I wanted to see, but I meant in addition to input/output. For example in some model-meta i've done supports.capabilities.[all of the capabilities] and then you can do supports.input as well


const US_LLAMA_4_SCOUT = {
name: 'Llama 4 Scout 17B Instruct (US)',
id: 'us.meta.llama4-scout-17b-instruct-v1:0',
Copy link
Contributor

Choose a reason for hiding this comment

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

the id here seems tied to the region?

Copy link
Author

@chunterbchunterbDec 8, 2025
edited
Loading

Choose a reason for hiding this comment

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

Yes some of the newer models have inference profiles, including Anthropic ones.https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html

Maybe should have something typed for regions since it's consistent across all models that require it. I have not added any of the EU models, etc yet.

Copy link
Author

Choose a reason for hiding this comment

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

To simplify, I've left only the ones where the inference profile is required for now.

@chunterb
Copy link
Author

chunterb commentedDec 8, 2025
edited
Loading

The Bedrock SDK has been implemented for types only. Problem using it for runtime is that it will not work on Cloudflare due to aFileReader dependency.

For this reason, it is usingaws4fetch directly.

* 2. `AWS_DEFAULT_REGION` environment variable
* 3. `'us-east-1'` as final fallback
*/
region?: string
Copy link
Contributor

Choose a reason for hiding this comment

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

can we extract the model region from here? so for example if it's eu/us/jp/sa and the model supports eu we can tell the user the model and the region don't match at runtime by throwing or default to a regionless model if it's supported?
eg:
model is anthropic, supported regions are eu and us, user specifies ca, it throws
model is anthropic, supported regions are eu and us, user specifices us, we append it to the model id before sending the request
model is anthropic, regionless, we send the request whatever region user specifies

Copy link
Author

@chunterbchunterbDec 9, 2025
edited
Loading

Choose a reason for hiding this comment

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

d6d66fb

How's this? Added to the model config and check against that at runtime.

inferenceProfile: { regions: ['us', 'eu', 'apac'], required: true },

Whererequired is optional because some models require the inference profile and others do not.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@AlemTuzlakAlemTuzlakAlemTuzlak left review comments

At least 0 approving reviews are required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@chunterb@AlemTuzlak

[8]ページ先頭

©2009-2025 Movatter.jp