-
Notifications
You must be signed in to change notification settings - Fork 46
fix(ai-sdk): support AI SDK v5 renamed tool attributes (inputSchema, input, output) #849
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
Conversation
WalkthroughExtends AI SDK transformation logic to support both v4 (parameters/args/result) and v5 (inputSchema/input/output) tool formats, preferring v5 when present, normalizing fields into OpenTelemetry and TRACELOOP attributes, and adding tests for v5 and mixed-format scenarios. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed everything up to 0f521ea in 1 minute and 45 seconds. Click for details.
- Reviewed
626lines of code in2files - Skipped
0files when reviewing. - Skipped posting
4draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts:267
- Draft comment:
Good job handling the v5 renaming (inputSchema over parameters, input over args, output over result). One minor suggestion: Consider adding explicit type checks and clear comments in these transformation blocks so that future developers immediately recognize that if both v4 and v5 properties are present, the newer one is preferred. - Reason this comment was not posted:
Comment looked like it was already resolved.
2. packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts:2540
- Draft comment:
The transformation for tool calls using the new v5 properties (input vs args, and output vs result) is clear and well tested. Ensure that in scenarios where one of the properties might be an empty string or null, you have a defined contract – currently the code uses a simple truthy check which appears acceptable, but an explicit check could prevent unexpected behavior. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. packages/traceloop-sdk/test/ai-sdk-transformations.test.ts:2354
- Draft comment:
The added tests for v5 compatibility are comprehensive. They cover transformation from string and object formatted tools (inputSchema) and correctly validate that v5 properties override legacy ones. Excellent job keeping the tests readable and structured. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%<= threshold50%This comment is purely informative, praising the comprehensiveness of the tests. It doesn't provide any actionable feedback or suggestions for improvement.
4. packages/traceloop-sdk/test/ai-sdk-transformations.test.ts:2540
- Draft comment:
The tests for tool call inputs (v5 renamed args to input) are clear and verify that the newer properties are preferred. Overall, the tests are well thought out and document intended behavior. Consider adding a comment near the test cases that mention the rationale for preferring v5 values for future maintainers. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%<= threshold50%The comment suggests adding a comment for future maintainers, which is purely informative and not a specific code suggestion or request for a test. It doesn't align with the rules for good comments.
Workflow ID: wflow_ZixS4tm4XmtH54zI
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts (1)
1-1: Fix Prettier formatting issues.The CI pipeline detected Prettier formatting issues. Run
pnpm prettier --writeto fix them before merging.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts(4 hunks)packages/traceloop-sdk/test/ai-sdk-transformations.test.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
packages/{instrumentation-*,traceloop-sdk}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Import AI/LLM semantic attribute constants from @traceloop/ai-semantic-conventions rather than hardcoding strings
Files:
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.tspackages/traceloop-sdk/test/ai-sdk-transformations.test.ts
packages/traceloop-sdk/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
packages/traceloop-sdk/**/*.{ts,tsx}: Use the provided decorators (@workflow, @task, @agent) for workflow/task/agent spans instead of re-implementing them
For manual LLM operations, use trace.withLLMSpan from @traceloop/node-server-sdk
Files:
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.tspackages/traceloop-sdk/test/ai-sdk-transformations.test.ts
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/{instrumentation-*,traceloop-sdk}/**/*.{ts,tsx} : Import AI/LLM semantic attribute constants from traceloop/ai-semantic-conventions rather than hardcoding strings
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/{instrumentation-*,traceloop-sdk}/**/*.{ts,tsx} : Import AI/LLM semantic attribute constants from traceloop/ai-semantic-conventions rather than hardcoding strings
Applied to files:
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.tspackages/traceloop-sdk/test/ai-sdk-transformations.test.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Instrumentations must create spans with appropriate AI/LLM semantic attributes for calls they wrap
Applied to files:
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/**/*.{ts,tsx} : Use the provided decorators (workflow, task, agent) for workflow/task/agent spans instead of re-implementing them
Applied to files:
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.tspackages/traceloop-sdk/test/ai-sdk-transformations.test.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/**/*.{ts,tsx} : For manual LLM operations, use trace.withLLMSpan from traceloop/node-server-sdk
Applied to files:
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.tspackages/traceloop-sdk/test/ai-sdk-transformations.test.ts
📚 Learning: 2025-08-12T13:57:05.901Z
Learnt from: galzilber
Repo: traceloop/openllmetry-js PR: 643
File: packages/traceloop-sdk/test/datasets-final.test.ts:97-105
Timestamp: 2025-08-12T13:57:05.901Z
Learning: The traceloop-sdk uses a response transformer (`transformApiResponse` in `packages/traceloop-sdk/src/lib/utils/response-transformer.ts`) that converts snake_case API responses to camelCase for SDK interfaces. Raw API responses use snake_case but SDK consumers see camelCase fields.
Applied to files:
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts
🧬 Code graph analysis (2)
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts (2)
packages/traceloop-sdk/src/lib/tracing/decorators.ts (1)
tool(287-293)packages/ai-semantic-conventions/src/SemanticAttributes.ts (1)
SpanAttributes(17-58)
packages/traceloop-sdk/test/ai-sdk-transformations.test.ts (2)
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts (2)
transformLLMSpans(672-693)transformAiSdkSpanAttributes(750-756)packages/ai-semantic-conventions/src/SemanticAttributes.ts (1)
SpanAttributes(17-58)
🪛 GitHub Actions: CI
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts
[warning] 1-1: Prettier formatting issues detected. Run 'pnpm prettier --write' to fix.
packages/traceloop-sdk/test/ai-sdk-transformations.test.ts
[warning] 1-1: Prettier formatting issues detected. Run 'pnpm prettier --write' to fix.
🔇 Additional comments (5)
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts (4)
149-163: LGTM! Clean v5 compatibility implementation.The dual-format support correctly prioritizes v5
inputover v4argsusing nullish coalescing, resolves once, and reuses the value consistently.
267-274: LGTM! Consistent v5 schema handling.The implementation correctly prefers v5
inputSchemaover v4parametersand properly handles both string and object formats.
550-566: LGTM! Comprehensive tool call attribute transformation.Both argument and result transformations correctly support dual formats, with v5 (
input/output) taking precedence over v4 (args/result). The deferred deletion is appropriate sincetransformToolCallshandles the cleanup.
696-710: LGTM! Complete cleanup of tool call attributes.The span transformation correctly resolves v5/v4 formats, sets Traceloop entity attributes, and properly cleans up all original attribute variants (both
args/inputandresult/output).packages/traceloop-sdk/test/ai-sdk-transformations.test.ts (1)
2353-2864: LGTM! Excellent test coverage for v5 compatibility.The comprehensive test suite validates all aspects of AI SDK v5 support:
- Tool definitions with
inputSchema(object and string formats)- Tool calls with
inputinstead ofargs- Tool call spans with
input/outputinstead ofargs/result- Precedence rules when both v4 and v5 formats exist
- Mixed v4/v5 scenarios for backward compatibility
- Complete end-to-end v5 transformation flow
The test structure follows existing patterns and thoroughly validates transformation correctness, attribute cleanup, and OpenTelemetry/Traceloop attribute mappings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed 297a7d8 in 1 minute and 28 seconds. Click for details.
- Reviewed
37lines of code in2files - Skipped
0files when reviewing. - Skipped posting
7draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/traceloop-sdk/test/ai-sdk-transformations.test.ts:2353
- Draft comment:
The new tests for AI SDK v5 compatibility (testing inputSchema in tools) are very comprehensive. They correctly check that when an object defines an inputSchema, it is transformed into the standardized parameters property. This is clear and follows best practices. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. packages/traceloop-sdk/test/ai-sdk-transformations.test.ts:2433
- Draft comment:
In the test "should handle AI SDK v5 string format tools with inputSchema", consider adding a comment that highlights the expectation that JSON strings are parsed correctly – this improves code readability for maintainers. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
3. packages/traceloop-sdk/test/ai-sdk-transformations.test.ts:2477
- Draft comment:
The test "should prefer inputSchema over parameters when both exist" clearly confirms the precedence of the v5 property. It’s a good safeguard against regressions. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
4. packages/traceloop-sdk/test/ai-sdk-transformations.test.ts:2540
- Draft comment:
The tests for tool call transformations using the new 'input' property (v5 format) are thorough. They also check that if both 'args' and 'input' exist, the newer 'input' is preferred. This is an appropriate approach. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
5. packages/traceloop-sdk/test/ai-sdk-transformations.test.ts:2674
- Draft comment:
The new suite of tests for span attribute transformation—ensuring that 'ai.toolCall.input' is properly mapped to OpenTelemetry attributes—is very comprehensive. The tests also favor v5 properties over legacy ones, which is ideal. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
6. packages/traceloop-sdk/test/ai-sdk-transformations.test.ts:2761
- Draft comment:
The complete v5 scenario test is a solid end‐to‐end integration check. It verifies not only tool definition and tool call transformations but also token calculations, vendor mapping, and operation naming. Excellent coverage. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
7. packages/traceloop-sdk/test/ai-sdk-transformations.test.ts:2530
- Draft comment:
Overall, the v5-related tests are well structured and descriptive. As a minor improvement, consider refactoring shared setup (e.g. JSON parsing of tool definitions or common attribute creation) into helper functions to reduce verbosity and improve maintainability. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_9pG4Im8pxc2oYj7M
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts (1)
643-662: Major issue: Agent spans ignore v5 tool call format.Lines 645-646 only check v4 attributes (
ai.toolCall.argsandai.toolCall.result) when populating entity input/output for agent spans. This means agent spans using v5 format (ai.toolCall.inputandai.toolCall.output) won't have their entity input/output set correctly.Apply this diff to support both v4 and v5 formats:
const inputMessages = attributes[ATTR_GEN_AI_INPUT_MESSAGES]; const outputMessages = attributes[ATTR_GEN_AI_OUTPUT_MESSAGES]; - const toolArgs = attributes["ai.toolCall.args"]; - const toolResult = attributes["ai.toolCall.result"]; + const toolArgs = attributes["ai.toolCall.input"] ?? attributes["ai.toolCall.args"]; + const toolResult = attributes["ai.toolCall.output"] ?? attributes["ai.toolCall.result"]; if (inputMessages || outputMessages) {
🧹 Nitpick comments (1)
packages/traceloop-sdk/test/ai-sdk-transformations.test.ts (1)
2353-2868: Suggest adding test for agent spans with v5 tool call format.The test suite lacks coverage for agent spans that use v5 tool call attributes (
ai.toolCall.input/output) instead of v4 (ai.toolCall.args/result). This scenario is relevant because agent spans may use tool call attributes for entity input/output when messages aren't available (seetransformTelemetryMetadatain the implementation).Consider adding a test like this to validate agent span behavior with v5 format:
it("should set agent entity input/output from v5 tool call attributes", () => { const attributes = { "ai.telemetry.metadata.agent": "research_assistant", "ai.toolCall.input": JSON.stringify({ query: "test" }), "ai.toolCall.output": JSON.stringify({ result: "success" }), }; transformLLMSpans(attributes, "research_assistant.agent"); // Should use v5 attributes for entity input/output assert.strictEqual( attributes[SpanAttributes.TRACELOOP_ENTITY_INPUT], JSON.stringify({ query: "test" }), ); assert.strictEqual( attributes[SpanAttributes.TRACELOOP_ENTITY_OUTPUT], JSON.stringify({ result: "success" }), ); });
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts(4 hunks)packages/traceloop-sdk/test/ai-sdk-transformations.test.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
packages/{instrumentation-*,traceloop-sdk}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Import AI/LLM semantic attribute constants from @traceloop/ai-semantic-conventions rather than hardcoding strings
Files:
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.tspackages/traceloop-sdk/test/ai-sdk-transformations.test.ts
packages/traceloop-sdk/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
packages/traceloop-sdk/**/*.{ts,tsx}: Use the provided decorators (@workflow, @task, @agent) for workflow/task/agent spans instead of re-implementing them
For manual LLM operations, use trace.withLLMSpan from @traceloop/node-server-sdk
Files:
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.tspackages/traceloop-sdk/test/ai-sdk-transformations.test.ts
🧠 Learnings (7)
📓 Common learnings
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/{instrumentation-*,traceloop-sdk}/**/*.{ts,tsx} : Import AI/LLM semantic attribute constants from traceloop/ai-semantic-conventions rather than hardcoding strings
Learnt from: galzilber
Repo: traceloop/openllmetry-js PR: 643
File: packages/traceloop-sdk/test/datasets-final.test.ts:129-143
Timestamp: 2025-08-12T13:57:42.538Z
Learning: The Traceloop SDK includes a response transformer utility (transformApiResponse) that automatically converts snake_case API responses to camelCase for SDK consumers. This means interface definitions and tests should use camelCase field names (like datasetId, datasetSlug, createdAt, updatedAt) rather than the raw API's snake_case format.
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/{instrumentation-*,traceloop-sdk}/**/*.{ts,tsx} : Import AI/LLM semantic attribute constants from traceloop/ai-semantic-conventions rather than hardcoding strings
Applied to files:
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.tspackages/traceloop-sdk/test/ai-sdk-transformations.test.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/**/*.{ts,tsx} : For manual LLM operations, use trace.withLLMSpan from traceloop/node-server-sdk
Applied to files:
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/instrumentation-*/**/*.{ts,tsx} : Instrumentations must create spans with appropriate AI/LLM semantic attributes for calls they wrap
Applied to files:
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/traceloop-sdk/**/*.{ts,tsx} : Use the provided decorators (workflow, task, agent) for workflow/task/agent spans instead of re-implementing them
Applied to files:
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts
📚 Learning: 2025-08-12T13:57:05.901Z
Learnt from: galzilber
Repo: traceloop/openllmetry-js PR: 643
File: packages/traceloop-sdk/test/datasets-final.test.ts:97-105
Timestamp: 2025-08-12T13:57:05.901Z
Learning: The traceloop-sdk uses a response transformer (`transformApiResponse` in `packages/traceloop-sdk/src/lib/utils/response-transformer.ts`) that converts snake_case API responses to camelCase for SDK interfaces. Raw API responses use snake_case but SDK consumers see camelCase fields.
Applied to files:
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts
📚 Learning: 2025-08-24T22:08:07.023Z
Learnt from: CR
Repo: traceloop/openllmetry-js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-08-24T22:08:07.023Z
Learning: Applies to packages/ai-semantic-conventions/src/SemanticAttributes.ts : Define all AI/LLM span attribute constants in packages/ai-semantic-conventions/src/SemanticAttributes.ts
Applied to files:
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts
🧬 Code graph analysis (2)
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts (2)
packages/traceloop-sdk/src/lib/tracing/decorators.ts (1)
tool(287-293)packages/ai-semantic-conventions/src/SemanticAttributes.ts (1)
SpanAttributes(17-58)
packages/traceloop-sdk/test/ai-sdk-transformations.test.ts (2)
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts (2)
transformLLMSpans(671-692)transformAiSdkSpanAttributes(749-755)packages/ai-semantic-conventions/src/SemanticAttributes.ts (1)
SpanAttributes(17-58)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build and test
🔇 Additional comments (5)
packages/traceloop-sdk/src/lib/tracing/ai-sdk-transformations.ts (4)
149-163: LGTM! Correct v5 compatibility for tool call arguments.The implementation correctly prefers v5
inputover v4argsusing nullish coalescing and maintains backward compatibility. The extractedtoolArgsis consistently used in both attribute assignments and the tool call structure.
267-273: LGTM! Correct v5 compatibility for tool schema.The implementation correctly prefers v5
inputSchemaover v4parametersusing nullish coalescing and maintains backward compatibility. The schema is properly serialized regardless of whether it's already a string.
549-565: LGTM! Correct v5 compatibility for tool call attributes.The implementation correctly handles both v5 (
input/output) and v4 (args/result) formats, preferring v5 when present. The comment explaining deferred deletion is helpful for understanding the transformation flow.
694-719: LGTM! Correct v5 compatibility and cleanup in tool call transformation.The implementation correctly derives
toolInputandtoolOutputfrom either v5 or v4 formats, properly sets the Traceloop entity attributes, and cleanly removes all original attributes (both v4 and v5) to prevent duplication.packages/traceloop-sdk/test/ai-sdk-transformations.test.ts (1)
2353-2868: Comprehensive v5 compatibility test suite.The test suite thoroughly covers all v5 renamed attributes (inputSchema, input, output), validates preference for v5 over v4 formats, tests mixed format handling, and includes a complete end-to-end v5 scenario. The tests are well-structured and properly verify attribute transformations and cleanup.
…input, output)
Important
Add support for AI SDK v5 renamed attributes while maintaining backward compatibility with v4.
transformResponseToolCallsandtransformToolsinai-sdk-transformations.tsto support AI SDK v5 attributesinputSchema,input, andoutput.inputSchema,input,output) over v4 (parameters,args,result) when both exist.ai-sdk-transformations.test.tsfor v5 compatibility, including tool definitions, tool calls, and prompt transformations.This description was created by
for 297a7d8. You can customize this summary. It will automatically update as commits are pushed.
Summary by CodeRabbit
New Features
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.