Skip to content

Classify rejected provider responses without exposing content - #13

Merged
AppSolves merged 1 commit into
mainfrom
fix/provider-response-diagnostics
Nov 14, 2026
Merged

AppSolves merged 1 commit into
mainfrom
fix/provider-response-diagnostics

Conversation

@AppSolves

Copy link
Copy Markdown
Owner

The inference proxy's format failure currently discards whether an upstream 2xx reply was JSON, HTML, missing a body or mislabeled. Preserve the actual status, a five-value Content-Type category and body presence, plus only existing approved machine codes/parameters from at most 8 KiB of JSON. Never forward raw bodies, header values, messages, prompts, user data or credentials.

Non-SSE success still fails closed; require the exact SSE media type, preserve the fixed Responses endpoint and all credential/OIDC/merge boundaries. Provider metadata is projected only for provider diagnostics and cannot be attested by the unprivileged reviewer. Failed inference still exits nonzero and only permits separate non-approving fallback publication.

Verified against the official SIWC Responses documentation and pinned Codex 0.169.0. A bundled Codex model catalog is not account entitlement; the affected account-specific catalog and precise production response shape remain unverified, with authorized owner-only investigation documented. No specific model/authentication/provider cause is inferred from the historical generic log.

Validation: Node 24 check (143 tests, typecheck, lint, build), independent clean-source check, real workerd/D1, 21 targeted execution/security regressions, Actionlint, Docker build and actual pinned Codex using synthetic SSE success/HTTP 400 JSON/HTTP 200 JSON failures, npm audit, strict image scan and Wrangler dry-run. Failure tests require exit 1, no review output and sanitized metadata. No deployment, OAuth reconnect, real inference or merge performed.

Runner source changes require coordinated exact source/Worker trust/caller pins. Rollout drafts must stay blocked until this PR merges and both pins (including the exact backend test expectation) use the verified actual merged source SHA. Keep merge disabled; verify credential-only diagnostics before a separately authorized fresh advisory test. No database migration, new permissions or secret changes.

@AppSolves
AppSolves merged commit 98c2bc4 into main Nov 14, 2026
4 checks passed
@AppSolves
AppSolves deleted the fix/provider-response-diagnostics branch November 14, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant