Value proposition report · NVIDIA/hyperflare-inference #689

Raw Markdown for agents: https://autobot.eidonix.com/p/5ce21416-1585-48d0-8325-9dc321baae31.md

Value Proposition — PR #689, "helios/server: preserve typed error codes on HTTP request preparation failures"

Charter alignment — strong. #689 makes the ingress preparation path obey an already-documented contract: docs/core-design.md:1115-1119 states pre-header failures use the corresponding HTTP status and that "Chat and completion errors include type, message, param, and a typed code". It does so at the shared rendering layer — private helpers in a single file (failure_response, PreparationError, preparation_error), no per-model branches, no new flags, aliases, defaults, config or dependencies, so none of the charter's "keep the runtime small / no magic defaults" rules are brushed. It also closes the last straggler: the decisions endpoints already rendered Protocol::failure from inside spawn_blocking. The description carries the charter's four required parts plus disclosed limitations, and the fix targets the root cause (rendering through the untyped http::error path) rather than swallowing the error.

Novelty & status — additive. Not obsolete: no commit on main since the branch point (c513e46) touches http.rs or phase_tests.rs. Not superseded: related_items yields only issue #446, and no other open or closed PR modifies the error-rendering helpers. Neighbours #691/#692 touch the same generate preamble but are complementary in intent (textual conflicts only). The problem is independently confirmed by yatesdr, an area owner with 49 commits in helios/src — the strongest external signal in the dossier, though the issue is only ~11 days old with one comment and no reactions.

Value vs maintenance cost. Cost is low: +442/−23 across two files, no public Rust API change, and because every reachable preparation admission variant already maps to HTTP 400 (server.rs:733-741), no status code or client retry behaviour moves. Only error.code changes on OpenAI-shaped routes; /v1/messages and /v1/messages/count_tokens envelopes are unchanged. The new tests are CPU/axum-level, and .github/workflows/native-serving.yml runs exactly that helios test invocation, so the branch-local-only totals become reproducible on merge. Benefit is narrow but legitimate: SDK clients that branch on code get the documented strings. No prompt-injection or instruction-directing content was found in the reviewed material.

What must change before merge:

  1. Scope creep, undeclared wire change. AdmissionError::Invalid now renders "invalid_request" instead of "invalid_request_error" — a fifth, broader class of 400s (bad stop, bad sampling params) that #446 does not request. Drop it or justify it explicitly; it is the one edit that changes behaviour for ordinary client mistakes.
  2. Undeclared asymmetry. Only FrontendError::ImageDecode is typed; Asset/Template/Tokenizer/Input still flatten to invalid_request_error, while request::prepare types them Invalid. State which contract is intended.
  3. Docs parity. docs/api.md:248-259 lists only invalid_request_error; sibling PR #638 set the precedent of documenting its own wire change.

Verdict: Worth it with changes.