aws icon indicating copy to clipboard operation
aws copied to clipboard

Adding Converse method to BedrockRuntime client

Open victor-upmeet opened this issue 9 months ago • 4 comments

Hi there

This PR implements the Converse method to the BedrockRuntime client. However, I am facing some issues with the generated code that makes the tests to fail.

In the static analysis, tests fail because constructors are not implemented on some classes, but these same classes are instanciated with arguments. There are also some failures due to wrong documentation types.

In the CI tests, I have a "Undefined index: role" error originating inside the ConverseResponse class in the generated code.

If I can do anything to help let met know, but as far as I understand, the issue seems to be cause by the code generator.

victor-upmeet avatar Mar 20 '25 11:03 victor-upmeet

Looks like the CodeGenerator has an inconsistency in its handling of objects without properties. However, having such object in the response does not make sense to me. Either the API definition of AWS is wrong, or we don't handle it properly.

stof avatar Apr 18 '25 08:04 stof

The shape description uses document: true in https://github.com/aws/aws-sdk-php/blob/33f6d393834053b11a5fc10573a211d92e61c2db/src/data/bedrock-runtime/2023-09-30/api-2.json#L970-L974 this is probably not handled by the code generator

stof avatar Apr 18 '25 09:04 stof

I discovered that DocumentSource uses union: true as well: https://github.com/aws/aws-sdk-php/blob/33f6d393834053b11a5fc10573a211d92e61c2db/src/data/bedrock-runtime/2023-09-30/api-2.json#L1013-L1021

This also seems something new in those API declarations.

stof avatar Apr 18 '25 09:04 stof

I opened https://github.com/async-aws/aws/issues/1882 to track the support for document shapes in the code generator

stof avatar Apr 18 '25 10:04 stof