This error occurs when the Tambo SDK can't process the API response. Here's how to fix it:
Your current API key contains /, +, and = characters:
tambo_lneMFOWwF2ncSvLCibWfJM/LUDIX+BDbD3ImJ7LquZW9kmXjYT1pjwj5Y/bCaiJouW6+brvjBdMKFpEtZSKG4R2gCm0I7MWcBjxEnmNKby4=
- Go to https://tambo.co/dashboard
- Generate a new API key
- Some API keys don't have special characters - try generating a few until you get one without
/,+, or= - Update your
.env.localfile with the new key - Restart dev server:
Ctrl+Cthennpm run dev
If you must keep this key, URL encode it:
# The encoded version replaces:
# / with %2F
# + with %2B
# = with %3DIn your .env.local:
NEXT_PUBLIC_TAMBO_TOKEN=tambo_lneMFOWwF2ncSvLCibWfJM%2FLUDIX%2BBDbD3ImJ7LquZW9kmXjYT1pjwj5Y%2FbCaiJouW6%2BbrvjBdMKFpEtZSKG4R2gCm0I7MWcBjxEnmNKby4%3DAfter making changes:
-
Restart your dev server (REQUIRED!)
# Stop with Ctrl+C, then: npm run dev -
Hard refresh your browser
- Windows/Linux:
Ctrl + Shift + R - Mac:
Cmd + Shift + R
- Windows/Linux:
-
Open the AI Assistant (button at bottom of page)
-
Click "Test API Key" to verify it works
-
Or click "Run Stream Diagnostics" to see detailed debug info in console
- API key is in
.env.localfile in project root - No quotes around the API key
- Key is URL-encoded if it contains special characters
- Dev server was restarted after changes
- Browser was hard-refreshed
- Tested with "Test API Key" button
- Open your app in browser
- Click the "AI Assistant" button (bottom center)
- Click "Run Stream Diagnostics"
- Press
F12to open browser console - Review the diagnostic output
"401 Unauthorized"
- Your API key is wrong or expired
- Get a new key from tambo.co/dashboard
"Network Error" / "Failed to fetch"
- Check internet connection
- Disable VPN temporarily
- Check if tambo.co is accessible
"CORS Error"
- This is usually related to the API key issue
- Try getting a new API key
"Still seeing stream error after all fixes"
- Clear browser cache completely
- Delete
.nextfolder:rm -rf .next - Rebuild:
npm run build - Restart:
npm run dev
The Tambo SDK's stream handler expects the API key to be clean in HTTP headers. Special characters like /, +, and = can cause issues when:
- The key is used in Authorization headers
- The stream parser tries to decode the response
- Base64-like strings aren't properly encoded
The best solution is to get a new API key without these characters.
- See
TAMBO_TROUBLESHOOTING.mdfor detailed troubleshooting - Check
TAMBO_INTEGRATION.mdfor integration guide - Visit: https://docs.tambo.co
- Dashboard: https://tambo.co/dashboard
Last Updated: 2024
For: Clinks AI Workflow Builder