Repository navigation
docs(private-ai): align Private AI docs with the ACI gateway and RedPill docs - #190
kingsleydon wants to merge 13 commits into
Conversation
…on and open-source pages Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # phala-cloud/confidential-ai/verify/typescript-sdk.mdx
…them in the overview
Single-source convergence, rendered text against
|
Single-source convergence, rendered text against
|
Summary
Align the Phala Private AI section with the ACI gateway contract and RedPill documentation while retaining Phala's TEE-only endpoint and account flows.
https://inference.phala.com/v1; add an API overview, endpoint policy, missing chat parameters, correct response headers, strict session-id validation, and host-forced TEE catalog semantics. Merge Signature into Receipts and Embedding Models into Embeddings, update links and navigation, and retain receipt ownership rules.Companion: https://github.com/redpill-ai/redpill-docs/pull/50
Necessary differences retained
https://inference.phala.com/v1, and mandatory verified upstream serving; no mixed/routed-model product flow.403/five-minute recovery claim.Redirects
/phala-cloud/confidential-ai/confidential-model/api-reference/signature→/phala-cloud/confidential-ai/confidential-model/api-reference/receipts(Legacy alias section)./phala-cloud/confidential-ai/confidential-model/api-reference/embedding-models→/phala-cloud/confidential-ai/confidential-model/api-reference/embeddings(List embedding models section).Verification
python3 .scripts/validate-redirects.py: passed, all 313 redirects valid.mkdir -p tmp && python3 .scripts/extract_links.py: passed; temporary output removed.git diff --check: passed. Checked ownership boundaries, all internal link paths, removed-page references, absolute API metadata, and API-key placeholders; parsed all 24 changed/new Python examples.https://inference.phala.com/v1/aci/attestation.tee=falseandtee=1;zdr=falsereturns400; attestation advertises both X25519 and secp256k1 keys. Model capabilities and context values were checked against the catalog.b8808773, control-planeauth.ts/zdr.ts, and linked official integration documentation. The final full-diff sweep also checkedservice/receipts.rs,service/e2ee.rs,dstack.rs,handlers.rs,spec/e2ee-v2.md,service/claims.rs, and the NVIDIA/Chutes JWT decode paths. No authenticated inference, billing mutation, or live deployment performed.The local preview emits an existing
ReferenceError: require is not definedfromscripts/generate-cli-docs.js, including on the unchanged Phala Cloud overview. It did not prevent page rendering; that shared script is outside this task's ownership boundary.Deliberately omitted or unconfirmed
403and fixed recovery interval: unsupported by the inspected authorization code. Account/key budget denials are documented as402 insufficient_quota. Phala Cloud Balance behavior beyond these verified quota/budget denials is not asserted.verifier_derivedlabel does not equate them to ArmetAI’s NRAS-signed gate. The moved GPU FAQ makes no such generic-proof claim.401before checking E2EE. No image/audio integration documentation was added.Single source
Shared ACI text is synced verbatim from redpill-ai/redpill-docs at
91f482a2eb15a7699545f588227be05b612ed28b. Edit shared text there, regenerate its MANIFEST, and sync it here; do not editsnippets/aci/in Phala.SOURCErecords the canonical commit exactly as the automated mirror does.snippets/site.jsxowns Phala branding, base URL, API-key environment name, dashboard, Proxy, and page paths. Release measurements remain upstream. The release-asset/monitor companion is gateway PR #546.CI now runs
.scripts/check_private_ai.py: it verifies every shared file against MANIFEST (SOURCE is mirror metadata), rejects relative Private AIapi:URLs, and rejects the removed KMS measurement names throughout repository files.Per-page convergence from
76bafea(paths below are underphala-cloud/confidential-ai/):confidential-model/how-it-worksverify/verify-attestationverify/verify-signatureconfidential-model/receipts-and-sessionsconfidential-model/verified-upstreamsconfidential-model/providersconfidential-model/trust-boundaryconfidential-model/e2ee-encryptionconfidential-model/e2ee-guide(new)confidential-model/attested-routingconfidential-model/error-handling404behavior, Balance/key-budget framing, SDK examples, retry guidance, and common cases.confidential-model/api-reference/attestationconfidential-model/api-reference/receiptsconfidential-model/api-reference/sessionsverify/typescript-sdkconfidential-model/channel-binding,confidential-model/tcb-and-claims(removed)The FAQ, compliance page and OpenAI SDK guide only change release-policy link destinations; their rendered prose is unchanged. All other non-shared pages were unchanged in the Phase 2 snippet conversion; the later fact-check corrections are listed below. Rendered-text diffs (content area, excluding navigation/pagination) are attached as PR comments rather than repository files.
Phase 2 verification (historical; cold browser verification below supersedes these browser results)
GitHub Documentation Validation passed on final commit
e4a2eb6.python3 .scripts/validate-redirects.py, link extraction (temporary output removed),.scripts/check_private_ai.py, and stagedgit diff --check: passed.Guard smoke checks: valid mirror passes; altered, extra or missing shared files, relative API metadata, and both prohibited measurement-name spellings fail; SOURCE is excluded from MANIFEST.
Exact byte comparison: all shared files and MANIFEST equal upstream
cd0be31; SOURCE is that full SHA plus one newline, matching the sync workflow.Chromium with pinned Mintlify
4.2.819and current4.2.1204: all 56 final Private AI pages returned HTTP 200 and rendered at 390/1440px in light/dark (448 page/viewport/theme states). No viewport overflow. Sample screenshots were inspected.Captured 57 pre-refactor pages. All 41 non-shared final page prose diffs are empty; the 15 shared/refactored pages have the intentional convergence changes listed above. Pinned/current rendered texts are identical. No unresolved site expressions or RedPill API credentials/base URLs appear in shared Phala content.
Every rendered local link and fragment on shared pages resolves, including release policy, manual artifact inspection, claims, sessions, transparency events and E2EE receipt hashing. All rendered preformatted code is free of curly quotes.
No new runtime errors. Both the unchanged baseline and final pages emit the existing
ReferenceError: require is not definedfromscripts/generate-cli-docs.js; that source remains outside this task’s ownership boundary.Focused final re-check: attested routing and error handling rendered again on both CLI versions, both widths and themes after canonical
model_not_foundwas corrected to404. No non-shared page incorrectly claimed unknown models return400.Canonical convergence corrected the shared tee-filter description to distinguish mixed and TEE-only endpoints and the unknown-model error status to
404 model_not_found. No known Phala-incompatible shared text remains. No merge or deployment performed.Fact-check corrections (Phala-owned pages)
Commit
b64210f; Documentation Validation passed.Checked P1, P2, R2, R3a and R3b independently against gateway
77fac126(production) anddb75886(main), control-plane86f8472, current upstream source, and the TypeSafe SDK package sources (typesafe-sdk0.7.5 /@typesafe-ai/sdk0.7.0). The gateway source diff is limited tosrc/middleware/audio.rs; the audio text below is valid for both. No authenticated inference or production changes were made.Applied
apps/desktop/agent-bridge/src/agents/discovery.rs:7-18andclients/verifier-ts/package.json.docs/control-plane-contract.md:34-61confirms the metadata fields.APIStatusErrorwhen accessingstatus_code; importtimein retry example; use stableclient.chat.completions.parse. Sources: OpenAI exceptions, parse helper./v1base from Anthropic host-only base; show complete gateway authentication-error shape and Anthropic envelope; disable compression in both TypeSafe examples; broaden Messages stop reasons to include refusal/provider-native values; clarify providers as provider IDs and keepis_teeseparate; add missing absolute API frontmatter for chat, embeddings and models. Gatewayerror_payload.rs:74-92,response_transform.rs:1060-1110,handlers.rsJSON parsing,Cargo.tomltower-http features, control-planemodelService.ts:389-398, Anthropic SDKmessages.py/v1/messages, and both published TypeSafe packages confirm these changes.autoremoval and mandatory usage, remove assumed output encoding/field presence, qualify parameter support, replace automatic-cache blanket wording with provider-specific activation/client markers, and enumerate every JSON ZDR endpoint plus audio's header carrier. Gatewayimages.rs:149-152,219-277,request_transform.rs:1044-1048,1159-1196,1760-1791,1863,handlers.rs:561-606, and control-planezdr.tsconfirm the source-supported behavior.Key-dependent claims rewritten or removed
png: removed the specific observed behavior and.jpginstruction; documentation now says the request is forwarded and returned bytes determine the encoding.images.rspasses through the encoding request and base64 image data without transcoding.size/output_format: replaced with the sanitizer rule that upstream string fields are preserved (images.rs:222-227).verbose_jsonerror text/status: removed the upstream-specific promise and error row. The parser supports JSON/verbose JSON, but provider support is not established by unauthenticated source inspection.verbose_json/missingno_speech_prob: removed the ahead-of-deploy optional-field sentence and made the response description conditional on success. Both commits require usable duration; production rejects string-only duration while main also parses numeric strings. The examples usejsonand no successful live verbose request is claimed.max_tokensrejection: no keyed upstream rejection was asserted; descriptions defer to the selected model/route and actual request errors.Disagreements, already-correct counterparts, and items not applied
chat_id: nullneeds no key to establish. Gatewaysrc/aggregator/service/middleware.rs:279-285explicitly initializes it to None on those endpoints; image/audio sanitizers removeid, so finalization cannot add one. Kept this verified claim. Image missing token counts filled with zero are also proven byimages.rs:248-277, not a live-only observation.beta.chat.completions.parseremains a supported alias; this is an API spelling update to the stable path, not removal of a deprecated API.requiredand hasadditionalProperties: false; no strict-schema fix was needed. OpenAI's strict schema requirements confirm it.required: trueis valid. No mixed-endpoint text was added to Phala framing.response_transform.rsidentity rewriting), existing/systemoneand/embeddings/modelsendpoint rows, and correct#param-providerlinks. Phala already uses its inference hostname for all ACI playgrounds; changing these to relative URLs would violate Phala's guard. Phala has no counterpart of RedPill's unpublishedopenapi.yaml.Business/legal/product-owner confirmation — left unchanged
confidential-ai-api.mdxrequire Phala billing ownership/source confirmation.compliance-and-open-source.mdx, provider non-retention contract/policy promises, and the existing image/audio and billing price statements remain unchanged for their owners. ZDR endpoint/carrier changes describe enforcement behavior only.Verification
4.2.819and current4.2.1204: all 24 changed pages returned HTTP 200 at 390/1440px in light/dark (192 page/viewport/theme states). Rendered texts match across versions, code has no curly quotes, and both TypeSafe compression flags appear in rendered code blocks. No viewport overflow or new runtime errors; the existing site-widerequire is not definedbaseline error remains.Shared
snippets/aci/were unchanged inb64210f. The separate canonical mirror and cold verification below complete that follow-up.Canonical fact-check mirror and cold verification
Mirrors
snippets/aci/byte for byte from RedPill91f482a2eb15a7699545f588227be05b612ed28b(the ten shared-topic changes are in72bd7f7).SOURCEis the full canonical SHA followed by one newline, exactly matching the sync workflow. Site props and anchors are unchanged.The shared corrections cover multipart endpoint capabilities, receipt ownership/error cases, session validity/reuse and claim fields, policy-dependent required verification, router evidence limits, and control-plane metadata.
Earlier browser evidence could have used a warm cache. The previews for
f6df737,e4a2eb6andb64210freused the same source path/preview port without proving the generated snippet output was invalidated. The pinned CLI keeps generatedpublic/content when.mint-content-sourceequals the same source directory. HTTP 200 alone did not prove the snippet revision. Their prior browser assertions and historical rendered-diff comments are superseded by the cold checks below; the independent static/source checks remain valid.For this pass, each CLI started from its own fresh
git archive HEADexport with the exact new mirror overlaid. The pinned and current export paths were distinct, so each start forced the source marker to change and the generated public content to be rebuilt. The marker was explicitly checked against the expected export path. Rendering used repository-free temporary exports; the assigned task worktree contains only the canonical mirror update.Commit
2127fa6; Documentation Validation passed:4.2.819and current4.2.1204each rendered all 57 pages covered by the earlier sweeps: the full 56-page non-GPU Private AI section plus the GPU FAQ. Every page returned HTTP 200 at 390/1440px in light/dark: 456 page/viewport/theme states, with no viewport overflow.3945/.../client/public/.mint-content-sourceand current Vite3945-beta/.../client-vite/.mint-cli/public/.mint-content-source. Each matched its distinct fresh export directory.require is not definederror from the site's CLI-generator script, outside this change's ownership boundary.Each changed topic had a positive rendered-text assertion that is absent from its old snippet:
supported_multipart_constraint_endpointssessionKindThe cold pass also checked prior Phala-owned fixes in rendered output, including Goose/Cline/Cherry instructions, Hermes Windows paths, archived GPU SDK framing, conditional Whisper verbose output, image usage, Anthropic base URL, TypeSafe compression flags,
APIStatusError, stable parse, provider-dependent caching, and ZDR endpoint coverage.