From 514e6929a088e6f41db5e423a72f3b5ecf09704b Mon Sep 17 00:00:00 2001 From: Aikins Laryea Date: Thu, 26 Nov 2026 14:48:45 +0000 Subject: [PATCH] docs: say tool descriptions and schemas follow input capture --- docs/integrations/(frameworks)/langchain-langgraph.mdx | 2 +- docs/integrations/(frameworks)/vercel-ai-sdk.mdx | 2 +- docs/integrations/(model-providers)/anthropic.mdx | 2 +- docs/integrations/(model-providers)/bedrock.mdx | 2 +- docs/integrations/(model-providers)/google-genai.mdx | 2 +- docs/integrations/(model-providers)/litellm.mdx | 2 +- docs/integrations/(model-providers)/openai.mdx | 2 +- docs/integrations/(model-providers)/openrouter.mdx | 2 +- docs/sdk/python.mdx | 3 +++ docs/sdk/typescript.mdx | 3 +++ 10 files changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/integrations/(frameworks)/langchain-langgraph.mdx b/docs/integrations/(frameworks)/langchain-langgraph.mdx index 093eaa8..92ffcfd 100644 --- a/docs/integrations/(frameworks)/langchain-langgraph.mdx +++ b/docs/integrations/(frameworks)/langchain-langgraph.mdx @@ -125,7 +125,7 @@ Model calls that stream, for example through `agent.stream(input, { streamMode: ### Control captured content -The `captureInput`, `captureOutput`, `mask`, and `maxAttributeLength` options of `init()` apply to the messages, inputs, and outputs that the handler records. With capture off, spans keep the span names, models, token usage, and errors. The run names, the tool names, the names of the bound tools, and the metadata of your app are still sent. +The `captureInput`, `captureOutput`, `mask`, and `maxAttributeLength` options of `init()` apply to the messages, inputs, and outputs that the handler records. With capture off, spans keep the span names, models, token usage, and errors. The run names, the tool names, the names of the bound tools, and the metadata of your app are still sent. An unreleased change also sends the descriptions and input schemas of the bound tools when input capture is on, after `mask`. ### Use it next to LangSmith diff --git a/docs/integrations/(frameworks)/vercel-ai-sdk.mdx b/docs/integrations/(frameworks)/vercel-ai-sdk.mdx index aa26d55..c9f1426 100644 --- a/docs/integrations/(frameworks)/vercel-ai-sdk.mdx +++ b/docs/integrations/(frameworks)/vercel-ai-sdk.mdx @@ -205,7 +205,7 @@ telemetry: { } ``` -These options leave out prompts, instructions, responses, tool arguments, tool results, and detailed error messages. Tool names, status, error types, token usage, and other metadata are still recorded. Model warning messages are replaced with a generic `Model warning` unless both options are on. +These options leave out prompts, instructions, responses, tool arguments, tool results, and detailed error messages. Tool names, status, error types, token usage, and other metadata are still recorded. An unreleased change also records the tools offered to each model call in `gen_ai.tool.definitions`: their names always, and their descriptions and input schemas only with `recordInputs` on. Model warning messages are replaced with a generic `Model warning` unless both options are on. AI SDK 6 ignores these options and always records content. diff --git a/docs/integrations/(model-providers)/anthropic.mdx b/docs/integrations/(model-providers)/anthropic.mdx index 6a992da..b524eff 100644 --- a/docs/integrations/(model-providers)/anthropic.mdx +++ b/docs/integrations/(model-providers)/anthropic.mdx @@ -200,7 +200,7 @@ The span's `gen_ai.provider.name` comes from the client class, including subclas ## Captured content -Prompts and responses follow the core SDK's `captureInput`, `captureOutput`, and `mask` settings (`capture_input`, `capture_output`, and `mask` in Python). Tools and `tool_choice` are part of the input, so turning input capture off removes them too. Each tool's type and name are still recorded in `gen_ai.tool.definitions`, which the trace view lists as **Tools offered**. `mask` does not apply to them; descriptions and input schemas are not. With output capture off, response IDs, models, stop reasons, usage, timing, and errors are still recorded. +Prompts and responses follow the core SDK's `captureInput`, `captureOutput`, and `mask` settings (`capture_input`, `capture_output`, and `mask` in Python). Tools and `tool_choice` are part of the input, so turning input capture off removes them too. Each tool's type and name are still recorded in `gen_ai.tool.definitions`, which the trace view lists as **Tools offered**. `mask` does not apply to them; descriptions and input schemas are not. An unreleased change also records each tool's description and input schema when input capture is on, after `mask`. With output capture off, response IDs, models, stop reasons, usage, timing, and errors are still recorded. The capture settings don't cover stop sequences, metadata and attributes you pass yourself, or exception messages and stack traces. Redact those separately if they can hold sensitive data. See [privacy](/platform/privacy) for server-side redaction. diff --git a/docs/integrations/(model-providers)/bedrock.mdx b/docs/integrations/(model-providers)/bedrock.mdx index 38d8a81..5377c3f 100644 --- a/docs/integrations/(model-providers)/bedrock.mdx +++ b/docs/integrations/(model-providers)/bedrock.mdx @@ -290,7 +290,7 @@ Calls through Anthropic's `AnthropicBedrock` client are traced by the [Anthropic ## Captured content -Prompts and responses follow the core SDK's `captureInput`, `captureOutput`, and `mask` settings (`capture_input`, `capture_output`, and `mask` in Python). With output capture off, request IDs, models, finish reasons, usage, timing, and errors are still recorded. AWS error messages are recorded on the span whatever the capture settings. For agent trace events, see the note under [Options](#options). +Prompts and responses follow the core SDK's `captureInput`, `captureOutput`, and `mask` settings (`capture_input`, `capture_output`, and `mask` in Python). With output capture off, request IDs, models, finish reasons, usage, timing, and errors are still recorded. An unreleased change records the tools offered to the model in Converse calls in `gen_ai.tool.definitions`, which the trace view lists as **Tools offered**: each tool's type and name whatever the settings, and its description and input schema only with input capture on, after `mask`. AWS error messages are recorded on the span whatever the capture settings. For agent trace events, see the note under [Options](#options). ## Send telemetry before exit diff --git a/docs/integrations/(model-providers)/google-genai.mdx b/docs/integrations/(model-providers)/google-genai.mdx index 0656c42..ed08a48 100644 --- a/docs/integrations/(model-providers)/google-genai.mdx +++ b/docs/integrations/(model-providers)/google-genai.mdx @@ -230,7 +230,7 @@ Prompts and responses follow the core SDK's `captureInput`, `captureOutput`, and Some data is stored outside those settings: -- Tool definitions (`gen_ai.tool.definitions`), including descriptions and parameter schemas, are request attributes. Turning off input capture or setting a mask doesn't remove them. +- In the current releases (TypeScript 0.1.9, Python 0.1.6), tool definitions (`gen_ai.tool.definitions`), including descriptions and parameter schemas, are request attributes. Turning off input capture or setting a mask doesn't remove them. An unreleased change keeps only each tool's type and name unless input capture is on, and passes descriptions and schemas through `mask`. - In the current releases (TypeScript 0.1.9, Python 0.1.6), the block reason message, safety ratings, grounding metadata, and URL-context metadata are stored as attributes even when output capture is off, and the mask doesn't see them. Grounding metadata can repeat the answer text and include retrieved document text, source titles and URIs, and search queries. An unreleased change keeps only their structure, such as categories, scores, and offsets, unless output is captured and no mask is set. - Stop sequences, metadata and attributes you pass yourself, and exception messages aren't covered by the capture settings. diff --git a/docs/integrations/(model-providers)/litellm.mdx b/docs/integrations/(model-providers)/litellm.mdx index 9def159..9061277 100644 --- a/docs/integrations/(model-providers)/litellm.mdx +++ b/docs/integrations/(model-providers)/litellm.mdx @@ -169,7 +169,7 @@ Any other provider keeps its LiteLLM name, such as `ollama`, `openrouter`, `toge ## Captured content -Prompts and responses follow the core SDK's `capture_input`, `capture_output`, and `mask` settings. With capture off, models, finish reasons, usage, cost, timing, and errors are still recorded. +Prompts and responses follow the core SDK's `capture_input`, `capture_output`, and `mask` settings. With capture off, models, finish reasons, usage, cost, timing, and errors are still recorded. An unreleased change records the tools offered to the model in `gen_ai.tool.definitions`, which the trace view lists as **Tools offered**: each tool's type and name whatever the settings, and its description and input schema only with `capture_input` on, after `mask`. Metadata is stored outside those settings. The integration exports each key of a call's `litellm_metadata` argument, or of `metadata` when `litellm_metadata` is absent or empty, as `td.metadata.`. The capture settings don't remove these values and the mask doesn't see them, so don't put credentials or personal data in metadata. For user and session IDs, use `propagate_attributes(user_id=..., session_id=...)` from the [Python SDK](/sdk/python) instead. diff --git a/docs/integrations/(model-providers)/openai.mdx b/docs/integrations/(model-providers)/openai.mdx index e0a5661..aac733a 100644 --- a/docs/integrations/(model-providers)/openai.mdx +++ b/docs/integrations/(model-providers)/openai.mdx @@ -270,7 +270,7 @@ The span's `gen_ai.provider.name` comes from the client: ## Captured content -Prompts and responses follow the core SDK's `captureInput`, `captureOutput`, and `mask` settings (`capture_input`, `capture_output`, and `mask` in Python). With output capture off, response IDs, models, finish reasons, usage, timing, and errors are still recorded. +Prompts and responses follow the core SDK's `captureInput`, `captureOutput`, and `mask` settings (`capture_input`, `capture_output`, and `mask` in Python). With output capture off, response IDs, models, finish reasons, usage, timing, and errors are still recorded. An unreleased change records the tools offered to the model in `gen_ai.tool.definitions`, which the trace view lists as **Tools offered**: each tool's type and name whatever the settings, and its description and input schema only with input capture on, after `mask`. The capture settings don't cover stop sequences, metadata and attributes you pass yourself, or exception messages and stack traces. Redact those separately if they can hold sensitive data. See [privacy](/platform/privacy) for server-side redaction. diff --git a/docs/integrations/(model-providers)/openrouter.mdx b/docs/integrations/(model-providers)/openrouter.mdx index f19ab7b..30f99b6 100644 --- a/docs/integrations/(model-providers)/openrouter.mdx +++ b/docs/integrations/(model-providers)/openrouter.mdx @@ -183,7 +183,7 @@ Each stream keeps up to 64 KiB and 1,024 items of output. Past that, the span ke ## Captured content -Prompts and responses follow the core SDK's `captureInput`, `captureOutput`, and `mask` settings (`capture_input`, `capture_output`, and `mask` in Python). With capture off, response IDs, models, finish reasons, usage, cost, timing, and errors are still recorded. See [privacy](/platform/privacy) for server-side redaction. +Prompts and responses follow the core SDK's `captureInput`, `captureOutput`, and `mask` settings (`capture_input`, `capture_output`, and `mask` in Python). With capture off, response IDs, models, finish reasons, usage, cost, timing, and errors are still recorded. An unreleased change records the tools offered to the model in `gen_ai.tool.definitions`, which the trace view lists as **Tools offered**: each tool's type and name whatever the settings, and its description and input schema only with input capture on, after `mask`. See [privacy](/platform/privacy) for server-side redaction. ## Send telemetry before exit diff --git a/docs/sdk/python.mdx b/docs/sdk/python.mdx index cd36751..0e4ea05 100644 --- a/docs/sdk/python.mdx +++ b/docs/sdk/python.mdx @@ -462,6 +462,7 @@ The SDK prepares each piece of captured content in three steps: | Span output | `gen_ai.output.messages`, or `gen_ai.tool.call.result` on tool spans | | `system_instructions` | `gen_ai.system_instructions` | | Log message | `log.message` | +| The list of tools offered to a model, from an unreleased change | `gen_ai.tool.definitions` | If `mask` raises, the SDK drops the value and reports the error to `on_error`. Returning `None` does not drop the value; it is recorded as the JSON string `null`. @@ -469,6 +470,8 @@ If `mask` raises, the SDK drops the value and reports the error to `on_error`. R `capture_input`, `capture_output`, and `mask` do not apply to span `metadata`, propagated metadata, raw `attributes`, log attributes, stop sequences, tool descriptions, or the message and stack trace of a recorded exception. The capture flags also do not apply to logs. Keep sensitive data out of those fields, or redact it before you pass it to the SDK. +An unreleased change makes one raw attribute an exception: `gen_ai.tool.definitions`, the tools offered to a model. With `capture_input` off it keeps only each tool's type and name, and with it on it passes through `mask`. Like other content, a list longer than `max_attribute_length`, 0 included, keeps only the types and names. The attribute is left out only when the names do not fit a limit above 0. + ::: The TypeScript SDK also masks log attributes. The Python SDK does not. diff --git a/docs/sdk/typescript.mdx b/docs/sdk/typescript.mdx index a48b628..9fe757b 100644 --- a/docs/sdk/typescript.mdx +++ b/docs/sdk/typescript.mdx @@ -467,6 +467,7 @@ The SDK prepares each piece of captured content in three steps: | `systemInstructions` | `gen_ai.system_instructions` | | Log message | `log.message` | | Log attributes other than numbers and booleans | The attribute name | +| The list of tools offered to a model, from an unreleased change | `gen_ai.tool.definitions` | If `mask` returns `undefined`, the SDK writes nothing for that attribute. If `mask` throws, the SDK drops the value and reports the error to `onError`. @@ -474,6 +475,8 @@ If `mask` returns `undefined`, the SDK writes nothing for that attribute. If `ma `captureInput`, `captureOutput`, and `mask` do not apply to span `metadata`, propagated metadata, raw `attributes`, stop sequences, tool descriptions, or the message and stack trace of a recorded error. The capture flags also do not apply to logs. Keep sensitive data out of those fields, or redact it before you pass it to the SDK. +An unreleased change makes one raw attribute an exception: `gen_ai.tool.definitions`, the tools offered to a model. With `captureInput` off it keeps only each tool's type and name, and with it on it passes through `mask`. Like other content, a list longer than `maxAttributeLength`, 0 included, keeps only the types and names. The attribute is left out only when the names do not fit a limit above 0. + ::: `maxAttributeLength` also truncates string metadata and log attributes, with the same marker. Other string attributes are cut at the same length without a marker.