Skip to content

feature: Pass headers to downstream servers (and plugins) #44

@evaline-ju

Description

@evaline-ju

Feature Description

Header passing happens on ContextForge plugin payloads. When the plugin framework is separated into its own package, this should not be disabled by default. We can leverage this to pass headers for traceability or metadata from a gateway call to downstream plugin servers like the Nemo guardrails server.

The priority is to pass headers to downstream servers like the Nemo guardrails server through the internal "nemocheck" plugin, but the pattern could be applied to any external plugins as well.

Proposed Solution

  • We should make it explicit what headers are being passed through, if passthrough is by default. However, it would likely be better to also disable arbitrary headers by default for security reasons, and allow an adapter user to configure "allowed" headers like through aDEFAULT_PASSTHROUGH_HEADERS env var
  • Some plugin payloads like the ToolPreInvokePayload accept headers, while some like ToolPostInvokePayload do not. These different patterns will have to be considered while passing headers downstream. If/when a common data model is accessible, there should be headers across all hooks.

Want to contribute?

  • I would like to work on this issue.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions