feat(server-utils): Port Bedrock aws-sdk extension and add integration tests#22166
Draft
andreiborza wants to merge 4 commits into
Draft
feat(server-utils): Port Bedrock aws-sdk extension and add integration tests#22166andreiborza wants to merge 4 commits into
andreiborza wants to merge 4 commits into
Conversation
bdc838e to
9297436
Compare
188ac82 to
ff165d4
Compare
9297436 to
31816fd
Compare
ff165d4 to
a4dd353
Compare
31816fd to
0b89e37
Compare
Contributor
size-limit report 📦
|
a4dd353 to
968db2f
Compare
0b89e37 to
a3978fa
Compare
968db2f to
5f2a15f
Compare
809da29 to
8907ff9
Compare
5f2a15f to
8f3599b
Compare
8907ff9 to
c0e10d6
Compare
8f3599b to
0a944ab
Compare
c0e10d6 to
561e41b
Compare
0a944ab to
5506257
Compare
561e41b to
8ffb46b
Compare
14699e8 to
a464258
Compare
556da6f to
9f3cab7
Compare
2849cfe to
8e57368
Compare
9f3cab7 to
ab2bf1b
Compare
8e57368 to
a265ce7
Compare
506ad88 to
8b3b56a
Compare
a265ce7 to
187e0a3
Compare
8b3b56a to
08dc65d
Compare
fe87011 to
2a870f9
Compare
08dc65d to
9d72288
Compare
2a870f9 to
f5a83fc
Compare
9d72288 to
783f36b
Compare
f5a83fc to
0d656fc
Compare
783f36b to
4a6b212
Compare
0d656fc to
334e8d0
Compare
334e8d0 to
777b8fa
Compare
4a6b212 to
540249c
Compare
777b8fa to
147d1ed
Compare
3f96053 to
c069617
Compare
147d1ed to
b68b1ab
Compare
c069617 to
96af43c
Compare
b68b1ab to
3a1517b
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3a1517b. Configure here.
…n tests Ports the BedrockRuntime gen_ai service extension from the OTel aws-sdk integration to the orchestrion channel integration: chat span name and request parameters for `Converse`/`ConverseStream`, per-model-family request body parsing for `InvokeModel`/`InvokeModelWithResponseStream` (titan, nova, claude, llama, cohere, mistral), token usage and finish reasons from responses, and deferred span end for the streaming commands (the span ends when the wrapped stream is consumed). Adds nock-mocked integration tests for the non-streaming `Converse` and `InvokeModel` commands, asserted against both the OTel and diagnostics-channel paths. The streaming commands use the AWS binary eventstream framing which nock cannot mock, so they stay untested here. This completes orchestrion parity with the OTel aws-sdk integration. Fixes #20946 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The model family is fixed for the whole stream, so resolve the recorder once and skip parsing entirely for unrecognized families; chunks are the highest frequency loop in the integration.
3a1517b to
e61c577
Compare
96af43c to
4294c76
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Ports the BedrockRuntime gen_ai service extension from the OTel aws-sdk integration to the orchestrion channel integration: chat span name and request parameters for
Converse/ConverseStream, per-model-family request body parsing forInvokeModel/InvokeModelWithResponseStream(titan, nova, claude, llama, cohere, mistral), token usage and finish reasons from responses, and deferred span end for the streaming commands (the span ends when the wrapped stream is consumed).Adds nock-mocked integration tests for the non-streaming
ConverseandInvokeModelcommands, asserted against both the OTel and diagnostics-channel paths. The streaming commands use the AWS binary eventstream framing which nock cannot mock, so they stay untested here.This completes orchestrion parity with the OTel aws-sdk integration.
User-facing differences to the vendored OTel instrumentation
ConverseStreamcallers receive the original response object with itsstreamwrapped in place, instead of a new object (a channel subscriber can't replace the resolved value); relevant only to identity-sensitive codeFixes #20946