feat: add optional AI observability - #24
Merged
Merged
Conversation
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.
Summary
nestm/ai-observabilityat source commit9cde1e1@nestm/ai-sdk/observability,/core,/http, and/testingentrypointsAiSdkObservabilityModule, separately registered AI SDK telemetry bridge, strict v1 events/snapshots, bounded aggregation, read-only HTTP projection, and deterministic testing utilitiesArchitecture and boundaries
Observability remains an optional capability of
@nestm/ai-sdk: it is never enabled automatically, and the root import stays lean and side-effect free.The core entrypoint remains framework-neutral, the HTTP layer remains platform-neutral, and OpenAI, Anthropic, and Google SDKs remain private workspace dependencies rather than published package dependencies.
The dashboard and playground are private workspace apps excluded from package exports,
dist, and published files. No Sites integration, deployment configuration, credentials, or real.env.localfiles are included.Privacy and private apps
The strict contracts reject and never snapshot prompts, outputs, reasoning, tool content, headers, provider metadata, raw errors, user IDs, or tenant IDs. Aggregation, replay tracking, active entities, dimensions, and late corrections are bounded.
The private dashboard validates snapshot schemas and preserves the last valid snapshot. The loopback-only playground configures
AiSdkModuleand runs model comparisons throughAiSdkService.generateText, with isolated partial provider failures and sanitized error categories.Validation
pnpm run verifypassedRelease
Includes a minor Changesets entry and remains on the configured alpha prerelease channel.