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

Documentation specifies defaults but they are not actually used #1114

Open
Ten0 opened this issue Mar 25, 2024 · 1 comment
Open

Documentation specifies defaults but they are not actually used #1114

Ten0 opened this issue Mar 25, 2024 · 1 comment
Labels
bug This issue is a bug. documentation This is a problem with documentation p2 This is a standard priority issue

Comments

@Ten0
Copy link
Contributor

Ten0 commented Mar 25, 2024

Describe the bug

Documentation explicitly specifies that the following fields have defaults:
image

But they are actually not applied. If the builder doesn't explicitly specify them, they will instead be explicitly be set to None
image

This makes the request fail with error:

ValidationException: The provided Content Type is invalid or not supported for this model

Setting those explicitly on InvokeModelFluentBuilder avoids the error:

builder
    .accept("application/json")
    .content_type("application/json")

Links

https://docs.rs/aws-sdk-bedrockruntime/1.18.0/aws_sdk_bedrockruntime/operation/invoke_model/builders/struct.InvokeModelFluentBuilder.html
https://docs.rs/aws-sdk-bedrockruntime/1.18.0/aws_sdk_bedrockruntime/operation/invoke_model/struct.InvokeModelInput.html

Version

1.18.0
@Ten0 Ten0 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 25, 2024
@ysaito1001
Copy link
Collaborator

Hi @Ten0, thank you for reporting this! This is a bug in a Smithy model for bedrockruntime (from which aws_sdk_bedrockruntime is code generated), where the doc (which also comes from the model) mentions defaults but they are not actually used as fallback; the requests fail if nothing is specified for accept and content_type.

@jmklix Could you help bring this up with bedrockruntime so that the team is aware?

@ysaito1001 ysaito1001 removed the needs-triage This issue or PR still needs to be triaged. label Mar 26, 2024
@jmklix jmklix added documentation This is a problem with documentation p2 This is a standard priority issue labels Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. documentation This is a problem with documentation p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

3 participants