Skip to content

feat: Add support for @aws-sdk/client-bedrock-runtime#2145

Open
Luca Forstner (lforst) wants to merge 5 commits into
mainfrom
lforst/bedrock-instrumentation
Open

feat: Add support for @aws-sdk/client-bedrock-runtime#2145
Luca Forstner (lforst) wants to merge 5 commits into
mainfrom
lforst/bedrock-instrumentation

Conversation

@lforst

Copy link
Copy Markdown
Member

Fixes #1741


const output: Record<string, unknown> = {};
for (const [key, nested] of Object.entries(value)) {
output[key] = sanitizeBedrockValue(nested, depth + 1);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prototype pollution? I guess the values from a bedrock response is safer, but we should still be careful just copying every value here.

Comment on lines +211 to +212
"cacheReadInputTokenCount": 0,
"cacheWriteInputTokenCount": 0,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should these cache tokens become braintrust metrics?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bot] AWS Bedrock Runtime SDK (@aws-sdk/client-bedrock-runtime) not instrumented — no tracing for direct Converse or InvokeModel calls

2 participants