Skip to content

add experimental_context parameter to prepareStep callback #10482

@rogercbe

Description

@rogercbe

Description

Any change to reconsider this PR?
#10171

It was closed in favour of this (#9682) however I think that it is not really an alternative since the options cannot be changed (as far as I know) in the tools execution and, options are not available (yet?) on the prepareStep either.

I think it would be very convenient to have the context available on the prepareStep arguments. In our use case, we have a tool that delegates/handoffs to an agent and setting the agentId on the context and the prepareStep would retrieve the necesary tools for that agent and set the system/activeTools for the specific agent.

Can we reconsider this? Or is there a recommended alternative to achieve this?

AI SDK Version

  • "ai": "6.0.0-beta.105",

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

ai/corecore functions like generateText, streamText, etc. Provider utils, and provider spec.featureNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions