Skip to content

Add header reporting to the OpenAI-compatible sample for priority validation #621

Description

@along-2017

Description

End-to-end validation of request priority gates on the header contract: asserting which priority headers, with which values, reach the function container. There is currently no convenient way to observe the headers delivered to a deployed function. Extend the OpenAI-compatible sample (or add a sibling sample) to report the request headers it receives, so tests can assert delivery for favored, best-effort, and unconfigured callers.

Definition of Done

  • Header reporting is enabled through containerEnvironment (for example ECHO_HEADERS=true). A request body flag is not sufficient because the gateway rewrites chat completion bodies through a typed schema.
  • The sample logs an allowlisted header set (x-priority, x-dynamo-request-*, x-request-id, x-model, x-routing-key) as one JSON line per request, and echoes the same set in non-streaming response bodies.
  • The authorization header is never reported.
  • The sample image is published for test use.

Resources

  • Samples directory: examples/function-samples/

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions