Skip to content

Expose tag probabilities in SDK responses#7950

Open
manuel-alvarez-alvarez wants to merge 5 commits intomasterfrom
malvarez/ai-guard-tag-probs
Open

Expose tag probabilities in SDK responses#7950
manuel-alvarez-alvarez wants to merge 5 commits intomasterfrom
malvarez/ai-guard-tag-probs

Conversation

@manuel-alvarez-alvarez
Copy link
Copy Markdown
Member

@manuel-alvarez-alvarez manuel-alvarez-alvarez commented Apr 8, 2026

What does this PR do?

Attach tag probabilities dictionary to the AI Guard SDK responses.

Motivation

Additional Notes

APPSEC-61899

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Overall package size

Self size: 5.48 MB
Deduped: 6.32 MB
No deduping: 6.32 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@manuel-alvarez-alvarez manuel-alvarez-alvarez force-pushed the malvarez/ai-guard-tag-probs branch from 66b93e4 to 7d099f5 Compare April 8, 2026 13:20
@datadog-prod-us1-6
Copy link
Copy Markdown

datadog-prod-us1-6 bot commented Apr 8, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 94.44%
Overall Coverage: 68.24% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4113159 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.82%. Comparing base (abc727b) to head (4113159).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7950   +/-   ##
=======================================
  Coverage   73.82%   73.82%           
=======================================
  Files         773      773           
  Lines       35972    35974    +2     
=======================================
+ Hits        26556    26558    +2     
  Misses       9416     9416           
Flag Coverage Δ
aiguard-macos 36.44% <100.00%> (-0.08%) ⬇️
aiguard-ubuntu 36.54% <100.00%> (-0.08%) ⬇️
aiguard-windows 36.34% <100.00%> (-0.08%) ⬇️
apm-capabilities-tracing-macos 48.37% <0.00%> (-0.01%) ⬇️
apm-capabilities-tracing-ubuntu 48.45% <0.00%> (-0.01%) ⬇️
apm-capabilities-tracing-windows 48.23% <0.00%> (+<0.01%) ⬆️
apm-integrations-child-process 36.06% <ø> (-0.10%) ⬇️
apm-integrations-couchbase-18 35.01% <ø> (-0.07%) ⬇️
apm-integrations-couchbase-eol 35.03% <ø> (-0.12%) ⬇️
apm-integrations-oracledb 35.03% <ø> (-0.09%) ⬇️
appsec-express 52.80% <ø> (-0.06%) ⬇️
appsec-fastify 49.27% <ø> (-0.07%) ⬇️
appsec-graphql 49.53% <ø> (-0.07%) ⬇️
appsec-kafka 42.09% <ø> (-0.09%) ⬇️
appsec-ldapjs 41.39% <ø> (-0.08%) ⬇️
appsec-lodash 41.42% <ø> (-0.08%) ⬇️
appsec-macos 56.74% <ø> (-0.07%) ⬇️
appsec-mongodb-core 46.03% <ø> (-0.07%) ⬇️
appsec-mongoose 46.59% <ø> (-0.08%) ⬇️
appsec-mysql 48.73% <ø> (-0.07%) ⬇️
appsec-node-serialize 40.59% <ø> (-0.08%) ⬇️
appsec-passport 44.55% <ø> (-0.08%) ⬇️
appsec-postgres 48.31% <ø> (-0.17%) ⬇️
appsec-sourcing 40.05% <ø> (-0.08%) ⬇️
appsec-stripe 42.31% <ø> (-0.08%) ⬇️
appsec-template 40.75% <ø> (-0.08%) ⬇️
appsec-ubuntu 56.82% <ø> (-0.07%) ⬇️
appsec-windows 56.63% <ø> (-0.05%) ⬇️
instrumentations-instrumentation-bluebird 29.79% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-body-parser 37.64% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-child_process 35.44% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-cookie-parser 31.73% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express 31.95% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 31.85% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-express-session 37.27% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-fs 29.46% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-generic-pool 31.12% <ø> (ø)
instrumentations-instrumentation-http 36.88% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-knex 29.76% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-mongoose 30.88% <ø> (-0.16%) ⬇️
instrumentations-instrumentation-multer 37.42% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-mysql2 35.38% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-passport 41.17% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-passport-http 40.86% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-passport-local 41.36% <ø> (-0.08%) ⬇️
instrumentations-instrumentation-pg 34.90% <ø> (-0.09%) ⬇️
instrumentations-instrumentation-promise 29.72% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-promise-js 29.73% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-q 29.76% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-url 29.72% <ø> (-0.10%) ⬇️
instrumentations-instrumentation-when 29.74% <ø> (-0.10%) ⬇️
llmobs-ai 38.38% <ø> (-0.09%) ⬇️
llmobs-anthropic 37.84% <ø> (-0.09%) ⬇️
llmobs-bedrock 37.11% <ø> (-0.08%) ⬇️
llmobs-google-genai 37.53% <ø> (-0.08%) ⬇️
llmobs-langchain 37.10% <ø> (-0.07%) ⬇️
llmobs-openai 41.22% <ø> (-0.08%) ⬇️
llmobs-vertex-ai 37.70% <ø> (-0.09%) ⬇️
platform-core 31.10% <ø> (ø)
platform-esbuild 33.97% <ø> (ø)
platform-instrumentations-misc 40.97% <ø> (ø)
platform-shimmer 37.00% <ø> (ø)
platform-unit-guardrails 32.49% <ø> (ø)
platform-webpack 20.82% <ø> (ø)
plugins-azure-durable-functions 25.87% <ø> (ø)
plugins-azure-event-hubs 26.03% <ø> (ø)
plugins-azure-service-bus 25.40% <ø> (ø)
plugins-bullmq 40.71% <ø> (-0.10%) ⬇️
plugins-cassandra 35.17% <ø> (-0.09%) ⬇️
plugins-cookie 27.06% <ø> (ø)
plugins-cookie-parser 26.85% <ø> (ø)
plugins-crypto 26.55% <ø> (ø)
plugins-dd-trace-api 35.42% <ø> (-0.10%) ⬇️
plugins-express-mongo-sanitize 26.99% <ø> (ø)
plugins-express-session 26.81% <ø> (ø)
plugins-fastify 39.35% <ø> (-0.09%) ⬇️
plugins-fetch 35.71% <ø> (-0.09%) ⬇️
plugins-fs 35.67% <ø> (-0.10%) ⬇️
plugins-generic-pool 25.92% <ø> (ø)
plugins-google-cloud-pubsub 43.02% <ø> (-0.08%) ⬇️
plugins-grpc 38.02% <ø> (-0.09%) ⬇️
plugins-handlebars 27.03% <ø> (ø)
plugins-hapi 37.23% <ø> (-0.09%) ⬇️
plugins-hono 37.50% <ø> (-0.09%) ⬇️
plugins-ioredis 35.61% <ø> (-0.09%) ⬇️
plugins-knex 26.67% <ø> (ø)
plugins-langgraph 35.05% <ø> (-0.09%) ⬇️
plugins-ldapjs 24.45% <ø> (ø)
plugins-light-my-request 26.41% <ø> (ø)
plugins-limitd-client 30.00% <ø> (-0.10%) ⬇️
plugins-lodash 26.00% <ø> (ø)
plugins-mariadb 36.48% <ø> (-0.09%) ⬇️
plugins-memcached 35.26% <ø> (-0.09%) ⬇️
plugins-microgateway-core 36.31% <ø> (-0.09%) ⬇️
plugins-moleculer 38.03% <ø> (-0.09%) ⬇️
plugins-mongodb 36.37% <ø> (-0.09%) ⬇️
plugins-mongodb-core 36.07% <ø> (-0.09%) ⬇️
plugins-mongoose 36.01% <ø> (-0.09%) ⬇️
plugins-multer 26.81% <ø> (ø)
plugins-mysql 36.35% <ø> (-0.09%) ⬇️
plugins-mysql2 36.33% <ø> (-0.09%) ⬇️
plugins-node-serialize 27.10% <ø> (ø)
plugins-opensearch 34.93% <ø> (-0.09%) ⬇️
plugins-passport-http 26.85% <ø> (ø)
plugins-postgres 34.31% <ø> (-0.11%) ⬇️
plugins-process 26.55% <ø> (ø)
plugins-pug 27.06% <ø> (ø)
plugins-redis 35.82% <ø> (-0.09%) ⬇️
plugins-router 39.98% <ø> (-0.09%) ⬇️
plugins-sequelize 25.68% <ø> (ø)
plugins-test-and-upstream-amqp10 35.63% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-amqplib 40.83% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-apollo 36.50% <ø> (-0.08%) ⬇️
plugins-test-and-upstream-avsc 35.52% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-bunyan 31.16% <ø> (-0.10%) ⬇️
plugins-test-and-upstream-connect 37.83% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-graphql 37.17% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-koa 37.44% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-protobufjs 35.73% <ø> (-0.09%) ⬇️
plugins-test-and-upstream-rhea 40.91% <ø> (-0.12%) ⬇️
plugins-undici 36.52% <ø> (-0.09%) ⬇️
plugins-url 26.55% <ø> (ø)
plugins-valkey 35.29% <ø> (-0.09%) ⬇️
plugins-vm 26.55% <ø> (ø)
plugins-winston 31.47% <ø> (-0.22%) ⬇️
plugins-ws 38.92% <ø> (-0.09%) ⬇️
profiling-macos 37.94% <ø> (-0.55%) ⬇️
profiling-ubuntu 38.10% <ø> (-0.09%) ⬇️
profiling-windows 39.47% <ø> (-0.09%) ⬇️
serverless-azure-functions-client 25.75% <ø> (ø)
serverless-azure-functions-eventhubs 25.75% <ø> (ø)
serverless-azure-functions-servicebus 25.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Apr 8, 2026

Benchmarks

Benchmark execution time: 2026-04-10 07:55:16

Comparing candidate commit 4113159 in PR branch malvarez/ai-guard-tag-probs with baseline commit abc727b in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 228 metrics, 32 unstable metrics.

@manuel-alvarez-alvarez manuel-alvarez-alvarez changed the title feat(ai-guard): add tag probabilities to SDK responses Expose tag probabilities in SDK responses Apr 9, 2026
@manuel-alvarez-alvarez manuel-alvarez-alvarez force-pushed the malvarez/ai-guard-tag-probs branch from 7d099f5 to bfd7d47 Compare April 9, 2026 07:51
@manuel-alvarez-alvarez manuel-alvarez-alvarez marked this pull request as ready for review April 9, 2026 08:03
@manuel-alvarez-alvarez manuel-alvarez-alvarez requested review from a team as code owners April 9, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants