const stream = await agentDouble0Seven.streamVNext(
[
{
role: "system",
providerOptions: {
anthropic: { cacheControl: { type: "ephemeral" } }, // what enables the "checkpoint" caching that anthropic uses
},
content: `...Long System Prompt over 1.2k tokens (minimum required for caching)...`,
},
{
role: "user",
content: "Do the cool AI thing you do",
},
],
{
format: "aisdk",
},
);
const stream = await agentDouble0Seven.streamVNext(
[
{
role: "system",
providerOptions: {
anthropic: { cacheControl: { type: "ephemeral" } }, // what enables the "checkpoint" caching that anthropic uses
},
content: `...Long System Prompt over 1.2k tokens (minimum required for caching)...`,
},
{
role: "user",
content: "Do the cool AI thing you do",
},
],
{
format: "aisdk",
},
);