Skip to content

D5 follow-up: APR Q4K CUDA chat/completions backends have no serving-context pre-flight (scheduler errors map to 500) #4625

Closed as not planned

Description

@noahgift

Split out of PMAT-4616 / #4614 (D5), which covers the dense GGUF CUDA serve paths.

try_apr_q4k_chat_backend (crates/aprender-serve/src/api/cuda_chat_backend.rs ~795-889) and its mirror in gpu_completions_handler.rs (~295-334) send to the APR Q4K scheduler with no serving-context pre-flight, and map every scheduler error (a String) to 500. The scheduler bounds at metadata().max_position_embeddings (apr_q4k_scheduler.rs:130), which the with_apr_q4k_and_vocab* constructors never see, so AppState::serving_context() is None on those states.

Fix: pass the Q4K context into the state at construction (set cached_serving_context), so the existing preflight_serving_context / serve_context_refusal 400 applies before the send. Found by the quorum (sonnet lane) on #4614 @1531ead607.

Agent: aprender-2e-serve

🤖 Generated with Claude Code

Activity

  1. added this to the 0.71.0 milestone on Oct 8, 2026
  2. noahgift commented on Oct 14, 2026

    @noahgift
    MemberAuthor

    merged into #5312 (master ticket for epic #3994; triage rule 7b, 2026-10-14). It is a checklist row there; reopen this issue when work on it starts or its PR opens.

  3. noahgift commented on Oct 14, 2026

    @noahgift
    MemberAuthor

    Moved: this sub-ticket is now a row in #5329 (apr serve request path: BPE tokenization, graceful drain, no 500 on oversize prompts), split out of #5312 by theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High priorityowner:la-0.71Owned by the 0.71 look-ahead slotsize:MK̂ 3-4 h

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions