Packages

ai

7.0.176 · 17 Nov 2026Apache-2.048.6M / weekRepositoryHomepagenpmAtom feed

Your version

6.0.188

21 May 2026Where it was published

6.0.333 is the newest release of 6.x.

In short

1 new

Release note

Patch Changes

  • Add allowSystemInMessages option to ToolLoopAgent.

    This exposes the same option that exists on streamText and generateText, whether role: "system" messages are allowed in the prompt or messages fields. When unset, system messages are rejected because they can create a prompt injection attack risk. Ideally, use the instructions option instead. Set to true to allow system messages, or false to explicitly reject them.

    const agent = new ToolLoopAgent({
      model,
      allowSystemInMessages: true,
    });
    
    await agent.generate({
      messages: [
        { role: "system", content: "Server context" },
        { role: "user", content: "Hello" },
      ],
    });

    The option can also be returned from prepareCall for dynamic per-call configuration.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.