Skip to content

[Router] Response augmentation + block handling (Mode B) #2386

Description

@ramkrishna2910

Goal

Response augmentation + block handling for Mode B.

Scope

  • Add x_lemonade_route object to the chat.completion response + an x-lemonade-route header.
  • verdict=block → synthesized refusal, finish_reason:"content_filter", no backend call.
  • Streaming variant: chat.completion.chunk + header.

Acceptance

  • Non-stream, stream, and block paths tested.
  • A vanilla OpenAI client ignoring the extra field still works unchanged.

Depends on: #2385, #2376

Metadata

Metadata

Assignees

No one assigned

    Labels

    area::apiHTTP REST API surface and route handlersenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions