feat(responses): reject background=true with 400 not supported #1239
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.44) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.44 · 262 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.333
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #1239"
general
weight: 0.35
franciscojavierarceo
Summary
Praxis does not implement the asynchronous Responses lifecycle (schedule, poll, cancel), so previously forwarding
background: trueto a native backend could return a202the gateway cannot manage, while the Responses→Chat Completions path rejected it — inconsistent behavior. This change rejectsbackground: trueuniformly in theopenai_responses_formatclassifier, before routing or upstream contact, with an OpenAI-shaped400 invalid_request_error("background mode is not supported");background: false/nullremain supported. It also removesbackgroundfrom stateful mode classification and updates the format/validate filters, example configs, architecture/filter docs, and unit/SDK/integration tests, plus a newbackground-unsupportedinference fixture scenario with synthetic recording.Related issue
No issue is closed by this change (the background epic tracks implementing the feature). Related: Epic #32 (OpenAI background_jobs).
Closes #
Validation
cargo test -p praxis-ai-apis --lib responses(1862 passed)openai_responses_format,responses_routing,openai_responses_validatesuites; new SDK testtest_background_mode_is_rejected_before_inference; inference fixture replay (cargo xtask check-inference)make lint(alsomake buildandmake doc)Checklist
Signed-off-bytrailer.Breaking changes
Clients sending
background: trueto a native Responses route now receive a400instead of having the request forwarded to the backend. This aligns behavior with the (already-rejecting) translation path;background: false/omitted are unaffected.