[BUG] bedrock over vercel ai provider error
Describe the bug
Summary
When attempting to use Amazon Bedrock models via VercelAIProvider in a VoltAgent setup, the agent initialization fails with an AI_LoadSettingError.
The error lacks detailed information, making it difficult to diagnose.
Environment
@voltagent/core@voltagent/vercel-ai@ai-sdk/amazon-bedrock- Model:
anthropic.claude-3-7-sonnet-20250219-v1:0 - Runtime: Vercel environment
Code Snippet
import VoltAgent, { Agent, createReasoningTools, MCPConfiguration, Toolkit } from "@voltagent/core";
import { VercelAIProvider } from "@voltagent/vercel-ai";
import { bedrock } from "@ai-sdk/amazon-bedrock";
async function main() {
try {
const agent = new Agent({
name: "Reasoning Assistant",
description: "A reasoning assistant using a lightweight provider",
llm: new VercelAIProvider(),
model: bedrock('anthropic.claude-3-7-sonnet-20250219-v1:0'),
markdown: true,
});
new VoltAgent({
agents: { agent },
});
} catch (error) {
console.error("Failed to initialize VoltAgent:", error);
}
}
main();
Steps To Reproduce
Steps to Reproduce
- Install the following packages:
@voltagent/core@voltagent/vercel-ai@ai-sdk/amazon-bedrock
- Import
VercelAIProviderandbedrock()into your project. - Create a new
Agentwith:llm: new VercelAIProvider()model: bedrock('anthropic.claude-3-7-sonnet-20250219-v1:0')
- Initialize
VoltAgentwith the agent. - Run the application.
- Observe that the Reasoning Assistant agent immediately fails with:
Status: errorEvent Type: finished (error)- Error:
{ "name": "AI_LoadSettingError" }
- Check browser console logs for repeated
error: {error: null, message: undefined}entries.
Expected behavior
Expected Behavior
- The
VoltAgentshould successfully initialize theReasoning Assistantagent without any errors. - The Bedrock model (
anthropic.claude-3-7-sonnet-20250219-v1:0) should be properly loaded and made available for reasoning through theVercelAIProvider. - No
AI_LoadSettingErroror undefined error messages should occur during agent startup. - The agent should enter a
workingoridlestate, ready to process user input.
Packages
@voltagent/core— ^0.1.7@voltagent/vercel-ai— ^0.1.3@ai-sdk/amazon-bedrock— ^2.2.8composio-core— ^0.5.33zod— ^3.24.3
Additional Context
No response
[BUG] bedrock over vercel ai provider error
Describe the bug
Summary
When attempting to use Amazon Bedrock models via VercelAIProvider in a VoltAgent setup, the agent initialization fails with an
AI_LoadSettingError.
The error lacks detailed information, making it difficult to diagnose.Environment
@voltagent/core@voltagent/vercel-ai@ai-sdk/amazon-bedrock- Model:
anthropic.claude-3-7-sonnet-20250219-v1:0- Runtime: Vercel environment
Code Snippet
import VoltAgent, { Agent, createReasoningTools, MCPConfiguration, Toolkit } from "@voltagent/core"; import { VercelAIProvider } from "@voltagent/vercel-ai"; import { bedrock } from "@ai-sdk/amazon-bedrock"; async function main() { try { const agent = new Agent({ name: "Reasoning Assistant", description: "A reasoning assistant using a lightweight provider", llm: new VercelAIProvider(), model: bedrock('anthropic.claude-3-7-sonnet-20250219-v1:0'), markdown: true, }); new VoltAgent({ agents: { agent }, }); } catch (error) { console.error("Failed to initialize VoltAgent:", error); } } main();
Steps To Reproduce
Steps to Reproduce
- Install the following packages:
@voltagent/core@voltagent/vercel-ai@ai-sdk/amazon-bedrock- Import
VercelAIProviderandbedrock()into your project.- Create a new
Agentwith:
llm: new VercelAIProvider()model: bedrock('anthropic.claude-3-7-sonnet-20250219-v1:0')- Initialize
VoltAgentwith the agent.- Run the application.
- Observe that the Reasoning Assistant agent immediately fails with:
Status: errorEvent Type: finished (error)- Error:
{ "name": "AI_LoadSettingError" }- Check browser console logs for repeated
error: {error: null, message: undefined}entries.Expected behavior
Expected Behavior
- The
VoltAgentshould successfully initialize theReasoning Assistantagent without any errors.- The Bedrock model (
anthropic.claude-3-7-sonnet-20250219-v1:0) should be properly loaded and made available for reasoning through theVercelAIProvider.- No
AI_LoadSettingErroror undefined error messages should occur during agent startup.- The agent should enter a
workingoridlestate, ready to process user input.Packages
@voltagent/core— ^0.1.7@voltagent/vercel-ai— ^0.1.3@ai-sdk/amazon-bedrock— ^2.2.8composio-core— ^0.5.33zod— ^3.24.3Additional Context
No response
Hey @wakeupmh
Here is my answer:
The issue you're encountering with the AI_LoadSettingError when using Amazon Bedrock models via the VercelAIProvider in VoltAgent could be due to several factors. Here are some potential causes and solutions:
-
Provider Compatibility: Ensure that the
VercelAIProvideris compatible with the Amazon Bedrock models. The provider might not fully support the specific model or API version you're trying to use. Check the documentation for any compatibility notes or updates. -
Model Configuration: The error might be related to incorrect model configuration. Verify that the model identifier
anthropic.claude-3-7-sonnet-20250219-v1:0is correctly specified and supported by theVercelAIProvider. -
API Key and Authentication: Ensure that all necessary API keys and authentication details are correctly configured. Missing or incorrect credentials can lead to initialization errors.
-
Error Details: The error message
{ "name": "AI_LoadSettingError" }lacks detail. Check the console logs for any additional error messages or stack traces that might provide more context. The repeatederror: {error: null, message: undefined}entries suggest that the error handling might not be capturing the full error details. -
Provider Initialization: Double-check the initialization of the
VercelAIProviderand ensure that all required parameters are provided. Any missing configuration could lead to errors during agent setup. -
Library Versions: Ensure that all libraries (
@voltagent/core,@voltagent/vercel-ai,@ai-sdk/amazon-bedrock) are up to date. Incompatibilities between library versions can cause unexpected errors.
For further troubleshooting, consider enabling more detailed logging or debugging to capture additional information about the error. If the issue persists, reaching out to the maintainers or community for support might provide additional insights.
Trust Score: 🟡 60%
Sources:
👀 View on Gurubase for a better UX
Tag @gurubase to ask me a question.
Hey @wakeupmh 👋, Thank you for reporting this issue. We’ll take a look soon!
Hey @wakeupmh , I just tried it and it worked fine on my end. Could you double-check your environment variables and model name? If the issue persists, please re-open issue so we can take a closer look.
Here’s the link for reference: https://sdk.vercel.ai/providers/ai-sdk-providers/amazon-bedrock