Skip to content

Protocols, HTTP Endpoints & Headers ​

ModelPrism supports all major LLM API protocols, dual transport modes, and structured custom HTTP headers.

Supported Protocols ​

ProtocolBehavior
auto (default)Detects protocol automatically; for Claude-family models, probes Anthropic Messages (/v1/messages) first and falls back seamlessly to OpenAI Chat Completions if unsupported
OpenAI Chat CompletionsStandard /v1/chat/completions
OpenAI Responses/v1/responses
Anthropic MessagesNative /v1/messages with thinking-block extraction and 1-bit signature checks
Cloudflare Workers AI / AI GatewayAccount ID and gateway-aware routing

Anthropic 1-Bit Signature Verification

When a Claude endpoint returns thinking blocks with signatures, ModelPrism supports single-endpoint self-checks and cross-endpoint verification by flipping 1 bit of the signature and verifying strict rejection (HTTP 400), alongside checks for forged UUID signatures, non-Base58 msg_01 IDs, and oversized zero-think signatures.

Dual Transport Modes ​

  1. Edge Relay (default): Forwards POST /api/probe and POST /api/models strictly in-memory through the same-origin Cloudflare Worker to bypass upstream CORS limits. Supports public plain HTTP domains, raw IPs, and custom ports via cloudflare:sockets (worker/socketHttp.ts).
  2. Browser Direct: Sends fetch() directly from the browser so API keys never pass through the Worker edge. Ideal for CORS-enabled APIs (OpenRouter, Anthropic direct-browser header) and 127.0.0.1 / LAN endpoints (Ollama, vLLM, LM Studio).

Custom HTTP Headers ​

  • Available across Check, Compare (per side), Easy Mode, and Custom Baseline Enrollment.
  • Supports pasting multi-line Key: Value text or JSON objects directly into the header name input.
  • Edge Relay enforces a strict header allowlist (never forwarding browser Cookie) and strips auth/custom headers on cross-domain or cross-scheme redirects.