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

[Feature Request] Query Bedrock model maxTokens limit #4206

Closed
2 tasks
austinmw opened this issue Jul 15, 2024 · 2 comments
Closed
2 tasks

[Feature Request] Query Bedrock model maxTokens limit #4206

austinmw opened this issue Jul 15, 2024 · 2 comments
Assignees
Labels
bedrock-runtime feature-request This issue requests a feature. service-api This issue is caused by the service API, not the SDK implementation.

Comments

@austinmw
Copy link

Describe the feature

Hi, I'd like to be able to query the maximum value for maxTokens for foundation models (especially ones using the Converse API)

Use Case

The documentation for the upper limit on maxTokens value for each model is not centrally located and is instead scattered across various documentation pages. For builders trying to support a wide range of models on Bedrock, being able to query this information is important.

For example, I might want to run something like:

model_id = 'sonnet 3.5'
max_tokens_limit = client.???(model_id)
client.converse(model_id, maxTokens = min(5000, max_tokens_limit)

Proposed Solution

Add boto3 capability for this

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

SDK version used

latest

Environment details (OS name and version, etc.)

latest

@austinmw austinmw added feature-request This issue requests a feature. needs-triage This issue or PR still needs to be triaged. labels Jul 15, 2024
@austinmw austinmw changed the title [Feature Request] Query Bedrock model maxTokens [Feature Request] Query Bedrock model maxTokens limit Jul 15, 2024
@tim-finnigan tim-finnigan self-assigned this Jul 15, 2024
@tim-finnigan
Copy link
Contributor

Thanks for reaching out. We'll have to reach out to the Bedrock team regarding this feature request, as they maintain the Converse API and token configurations. This documentation notes some limitations on token usage which may be helpful: https://docs.aws.amazon.com/bedrock/latest/userguide/quotas.html. There are also APIs for tracking service quotas, but I don't think specifically for what you're requesting.

Since APIs like Converse are used across AWS SDKs, I created aws/aws-sdk#780 in our cross-SDK repository to track this going forward. Please refer to that issue for updates.

@tim-finnigan tim-finnigan added investigating This issue is being investigated and/or work is in progress to resolve the issue. service-api This issue is caused by the service API, not the SDK implementation. bedrock-runtime and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. needs-triage This issue or PR still needs to be triaged. labels Jul 15, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bedrock-runtime feature-request This issue requests a feature. service-api This issue is caused by the service API, not the SDK implementation.
Projects
None yet
Development

No branches or pull requests

2 participants