ZDR and drop_params via CEL config transformations (no custom binary/plugin)
Date: 2026-06-06 Status: Superseded by hl-0eb Decision: hl-env Deciders: sean
Context
Section titled “Context”LiteLLM enforced server-side ZDR (inject provider.zdr=true into OpenRouter requests) and drop_params (strip backend-unsupported fields, e.g. Ollama rejecting encoding_format on /v1/embeddings). Both must survive the LiteLLM replacement WITHOUT a custom binary or plugin. The Bifrost alternative required a Go .so plugin for ZDR — the sole driver that would have forced choosing Bifrost.
Decision
Section titled “Decision”ZDR injection (provider.zdr=true, require_parameters=true) and drop_params (strip encoding_format on the Ollama embeddings route) are implemented as CEL request transformations bound to their respective routes in agentgateway’s config.yaml — no custom binary, plugin, or Postgres.
Rationale
Section titled “Rationale”- Route-bound server-side transformation means the guarantee holds regardless of client behavior — equivalent to today’s LiteLLM enforcement (a client cannot bypass ZDR by omitting the field).
- Pure config eliminates the entire class of ABI-matching / rebuild-on-upgrade problems that made the Bifrost path untenable.
- Both transforms are route-scoped (zdr model alias; Ollama embeddings) so they compose cleanly.
Alternatives Considered
Section titled “Alternatives Considered”- CEL request transformations in agentgateway config (CHOSEN) — config-only, no image/plugin/Postgres; server-side + route-bound. Cost: CEL adds a config-complexity layer; field spellings pinned against the v1.2.1 schema at plan time.
- Go .so plugin (PreLLMHook) in a custom Bifrost image — rejected: dynamically-linked custom image; strict Go-version/dependency/libc ABI matching; rebuild on every Bifrost upgrade. This was the sole reason the two-tool Bifrost path was even considered.
Consequences
Section titled “Consequences”Positive: ZDR + drop_params preserved with no custom image/plugin; future provider-quirk/compliance injections are config changes, not builds. Negative: CEL correctness must be validated at plan time against the pinned schema; transformation-API changes across versions require config updates. Neutral: the transformation mechanism is general-purpose for future route-level injections.
References
Section titled “References”- Superseded by: hl-0eb