Summary
RFC 0021 ships the default reservation amount as a flat constant (uint(5000)) because reliably reading request body fields (requestBodyJSON('/max_tokens')) at the point Reserve needs to evaluate them isn't feasible today. Deriving the default from the request's own max_tokens — a real, protocol-declared upper bound — would be strictly better than a flat heuristic, and is called out as an open question in the RFC rather than a decided design.
This is filed as unresolved/exploratory, not committed scope, per RFC 0021, Unresolved questions.
Context
Acceptance Criteria (of the investigation, not an implementation)
Notes for reviewers
This is a design spike, not a coded feature — no PR review checklist applies until a follow-up implementation issue is filed.
Summary
RFC 0021 ships the default reservation
amountas a flat constant (uint(5000)) because reliably reading request body fields (requestBodyJSON('/max_tokens')) at the pointReserveneeds to evaluate them isn't feasible today. Deriving the default from the request's ownmax_tokens— a real, protocol-declared upper bound — would be strictly better than a flat heuristic, and is called out as an open question in the RFC rather than a decided design.This is filed as unresolved/exploratory, not committed scope, per RFC 0021, Unresolved questions.
Context
allow_on_headers_stop_iterationwas added to let the filter pause at headers and move into body processing, then reverted — Revert "feat(wasm):allow_on_headers_stop_iterationon ourPluginConfig" kuadrant-operator#2101.requestBodyJSONisn't usable atReservetime today (request phase, before body is available to the filter in the needed way).Acceptance Criteria (of the investigation, not an implementation)
Reserve's CEL evaluatesreservation.amount, without regressing the issue that caused kuadrant-operator#2101 to be revertedNotes for reviewers
This is a design spike, not a coded feature — no PR review checklist applies until a follow-up implementation issue is filed.