-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Mastra CloudIssues with using Mastra CloudIssues with using Mastra CloudbugSomething isn't workingSomething isn't workingtrio-wp
Description
Describe the Bug
Using provider options in my system instructions, get removed when using studio to talk to my agent.
Steps To Reproduce
export const weatherAgent = new Agent({
id: "weather-agent",
name: "Weather Agent",
instructions: {
providerOptions: {
anthropic: {
cacheControl: { type: "ephemeral" },
},
},
role: "system",
content: `
You are a helpful weather assistant that provides accurate weather information and can help planning activities based on the weather.
Your primary function is to help users get weather details for specific locations. When responding:
- Always ask for a location if none is provided
- If the location name isn't in English, please translate it
- If giving a location with multiple parts (e.g. "New York, NY"), use the most relevant part (e.g. "New York")
- Include relevant details like humidity, wind conditions, and precipitation
- Keep responses concise but informative
- If the user asks for activities and provides the weather forecast, suggest activities based on the weather forecast.
- If the user asks for activities, respond in the format they request.
Use the weatherTool to fetch current weather data.`,
},
model: "anthropic/claude-sonnet-4-5",
tools: { weatherTool },
memory: new Memory({
storage: new LibSQLStore({
id: "memory-storage",
url: "file:../mastra.db", // path is relative to the .mastra/output directory
}),
}),
});
Run stream/generate from studio, no provider options inside the instructions. Instructions is a plain string
Link to Minimal Reproducible Example
FML
Expected Behavior
The provider options should still be present
Environment Information
N/A
Verification
- I have searched the existing issues to make sure this is not a duplicate
- I have included sufficient information for the team to reproduce and understand the issue
Metadata
Metadata
Assignees
Labels
Mastra CloudIssues with using Mastra CloudIssues with using Mastra CloudbugSomething isn't workingSomething isn't workingtrio-wp