Currently AgentCall and AgentStreamCall only carry a fixed set of fields (sampling params, messages, tools, callbacks, etc.). There is no first-class way for application-layer code to:
- Attach arbitrary, application-specific data to a call.
- Run a one-shot preparation hook before the first model invocation, analogous to the internal agent.prepareCall.
Typical use cases for the hook: translating an application-defined context object into SystemPrompt / ProviderOptions / Messages, injecting tenant-scoped headers, resolving feature flags, hydrating RAG context, etc.
Currently AgentCall and AgentStreamCall only carry a fixed set of fields (sampling params, messages, tools, callbacks, etc.). There is no first-class way for application-layer code to:
Typical use cases for the hook: translating an application-defined context object into SystemPrompt / ProviderOptions / Messages, injecting tenant-scoped headers, resolving feature flags, hydrating RAG context, etc.