Repository navigation
feat(attributes): Add Vercel AI runtime and tool context attributes #756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
26 changes: 26 additions & 0 deletions
26
model/attributes/vercel/vercel__ai__settings__context__[key].json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "key": "vercel.ai.settings.context.<key>", | ||
| "brief": "A runtime context property of a Vercel AI SDK call that the app included in telemetry through `telemetry.includeRuntimeContext`, with <key> being the top-level context property name.", | ||
| "has_dynamic_suffix": true, | ||
| "type": "string", | ||
| "apply_scrubbing": { | ||
| "key": "auto", | ||
| "reason": "Runtime context is user-defined and can contain user data" | ||
| }, | ||
| "additional_context": [ | ||
| "Set on `gen_ai` spans for `invoke_agent`, `generate_content`, `execute_tool`, `embeddings`, `rerank` and `decide` operations. Spans for model calls and tool calls inside an operation copy the attributes of that operation.", | ||
| "SDKs MUST only record the properties that the app included through `telemetry.includeRuntimeContext`. Some Vercel AI SDK versions expose the full runtime context to instrumentation. If an SDK cannot confirm that the Vercel AI SDK filtered the runtime context, it MUST NOT record it.", | ||
| "The Vercel AI SDK's own OpenTelemetry integration (`@ai-sdk/otel`) emits the same data as `ai.settings.context.<key>`.", | ||
| "Runtime context values can have any type. SDKs MUST convert them to strings, and SHOULD serialize objects and arrays as JSON.", | ||
| "This attribute is open-ended on purpose. The Vercel AI SDK does not define the runtime context keys." | ||
| ], | ||
| "is_in_otel": false, | ||
| "visibility": "public", | ||
| "examples": ["vercel.ai.settings.context.tenantId='acme'"], | ||
| "changelog": [ | ||
| { | ||
| "version": "next", | ||
| "description": "Added vercel.ai.settings.context.<key> attribute" | ||
| } | ||
| ] | ||
| } | ||
26 changes: 26 additions & 0 deletions
26
model/attributes/vercel/vercel__ai__tool_call__context__[key].json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "key": "vercel.ai.tool_call.context.<key>", | ||
| "brief": "A tool context property of a Vercel AI SDK tool call that the app included in telemetry through `telemetry.includeToolsContext`, with <key> being the top-level context property name.", | ||
| "has_dynamic_suffix": true, | ||
| "type": "string", | ||
| "apply_scrubbing": { | ||
| "key": "auto", | ||
| "reason": "Tool context is user-defined and can contain user data" | ||
| }, | ||
| "additional_context": [ | ||
| "Set on `gen_ai` spans for `execute_tool` operations.", | ||
| "SDKs MUST only record the properties that the app included for the tool through `telemetry.includeToolsContext`. Some Vercel AI SDK versions expose the full tool context to instrumentation. If an SDK cannot confirm that the Vercel AI SDK filtered the tool context, it MUST NOT record it.", | ||
| "The Vercel AI SDK's own OpenTelemetry integration (`@ai-sdk/otel`) does not record tool context.", | ||
| "Tool context values can have any type. SDKs MUST convert them to strings, and SHOULD serialize objects and arrays as JSON.", | ||
| "This attribute is open-ended on purpose. The Vercel AI SDK does not define the tool context keys." | ||
| ], | ||
| "is_in_otel": false, | ||
| "visibility": "public", | ||
| "examples": ["vercel.ai.tool_call.context.units='metric'"], | ||
| "changelog": [ | ||
| { | ||
| "version": "next", | ||
| "description": "Added vercel.ai.tool_call.context.<key> attribute" | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.