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

Support for InvokeModelWithResponseStream param in invoke_model and InvokeModelWithResponseStream in Bedrock #3323

Closed
1 of 2 tasks
realyze opened this issue Dec 12, 2024 · 1 comment
Assignees
Labels
feature-request This issue requests a feature. service-api This issue is caused by the service API, not the SDK implementation.

Comments

@realyze
Copy link

realyze commented Dec 12, 2024

Describe the feature

AWS Bedrock now supports LLM prompt caching (as a beta feature) and it added a new explicitPromptCaching parameter to invoke_model and invoke_model_with_response_stream. But this param is not yet reflected in the boto request shape so trying to use the param fails validation. It would be great if we could add it!

Use Case

We'd love to use the new bedrock prompt caching feature to reduce time to first token.

Proposed Solution

Add explicitPromptCaching to InvokeModelRequest and InvokeModelWithResponseStream in botocore/data/bedrock-runtime/<date>/service-2.json.

Other Information

No response

Acknowledgements

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

SDK version used

1.35.*

Environment details (OS name and version, etc.)

Any environment

@realyze realyze added feature-request This issue requests a feature. needs-triage This issue or PR still needs to be triaged. labels Dec 12, 2024
@tim-finnigan tim-finnigan self-assigned this Dec 16, 2024
@tim-finnigan
Copy link
Contributor

Thanks for reaching out. Here are the Bedrock docs on prompt caching: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-caching.html, where it currently notes at the top:

Amazon Bedrock prompt caching is currently only available to a select number of customers. To learn more about participating in the preview, see Amazon Bedrock prompt caching.

For now you can request access to the prompt caching preview in order to try using this feature. Since the Bedrock team owns the upstream InvokeModel API that the Boto3 invoke_model command calls, new features must be supported by service APIs in order for SDKs like Boto3 to access them. Please stay tuned to the blog and CHANGELOG for updates.

@tim-finnigan tim-finnigan added service-api This issue is caused by the service API, not the SDK implementation. and removed needs-triage This issue or PR still needs to be triaged. labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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