Skip to content

Conversation

@vercel-ai-sdk
Copy link
Contributor

@vercel-ai-sdk vercel-ai-sdk bot commented Nov 10, 2025

This is an automated backport of #8880 to the release-v5.0 branch. FYI @shelleypham

<!--
Welcome to contributing to AI SDK! We're excited to see your changes.

We suggest you read the following contributing guide we've created
before submitting:

https://github.com/vercel/ai/blob/main/CONTRIBUTING.md
-->

## Background

<!-- Why was this change necessary? -->

* We updated our provider to be AI SDK v5 compatible

## Summary

<!-- What did you change? -->

* Updated Letta provider doc
`content/providers/03-community-providers/71-letta.mdx`


## Checklist

<!--
Do not edit this list. Leave items unchecked that don't apply. If you
need to track subtasks, create a new "## Tasks" section

Please check if the PR fulfills the following requirements:
-->

- [ ] Tests have been added / updated (for bug fixes / features)
- [ ] Documentation has been added / updated (for bug fixes / features)
- [ ] A _patch_ changeset for relevant packages has been added (for bug
fixes / features - run `pnpm changeset` in the project root)
- [X] Formatting issues have been fixed (run `pnpm prettier-fix` in the
project root)
- [X] I have reviewed this pull request (self-review)

---------

Co-authored-by: Nico Albanese <49612682+nicoalbanese@users.noreply.github.com>
Co-authored-by: nicoalbanese <gcalbanese96@gmail.com>
},
providerOptions: {
letta: {
agent: { id: agentId },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
agent: { id: agentId },
agent: { id: 'your-agent-id' },

The code example uses an undefined variable agentId instead of a string literal, which will cause a runtime error when someone copies this example.

View Details

Analysis

Documentation bug: Undefined variable in Letta provider example

What fails: Line 177 in the "Custom Tools and MCP" code example uses undefined variable agentId instead of a string literal, which would cause a ReferenceError when developers copy-paste this example.

How to reproduce: Copy the code example from the "Custom Tools and MCP" section (lines 165-182) and run it. The code references agentId which is not defined anywhere in the example.

What happens: ReferenceError: agentId is not defined

Expected: Should use string literal 'your-agent-id' to match the pattern used consistently in all other examples on the same page (lines 79 and 141).

Fix: Changed line 177 from agent: { id: agentId } to agent: { id: 'your-agent-id' }

@vercel-ai-sdk vercel-ai-sdk bot merged commit 3a8fad0 into release-v5.0 Nov 10, 2025
22 checks passed
@vercel-ai-sdk vercel-ai-sdk bot deleted the backport-pr-8880-to-release-v5.0 branch November 10, 2025 23:20
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.

3 participants