Skip to content

[Feature Request] Pre-Invocation Prompt Hook #3487

@coolbeevip

Description

@coolbeevip

Required prerequisites

Motivation

In the current model invocation pipeline, prompts (system/user/tool messages) go straight to the model backend with no interception point.
Yet real-world enterprise and agent-framework scenarios often require dynamically adjusting prompts before invocation — such as injecting user identity or applying platform-wide governance rules.
Without a unified pre-invocation hook, these requirements cannot be implemented consistently or sustainably.

A unified pre-invocation hook not only enables these capabilities but also cleanly supports common cross-business features currently implemented in scattered, model-coupled code paths, such as:

Centralizing these behaviors in a hook reduces business coupling, improves maintainability, and provides a consistent, extensible governance layer across all models.

Solution

No response

Alternatives

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions