Skip to content

Supported providers & parsers

Every captured request is routed to a parser by host and path. When a parser matches, Crucible decodes the body into a structured PromptEvent: messages by role, tool schemas and calls, token counts, finish reason and safety signals. When none matches, a content-based fallback tries to extract the conversation from the response body (see Unmatched traffic). Anything neither recognises is still captured as raw HTTP, without the decoded prompt view.

Routing is exact, not fuzzy. The registry checks the host string and the path (query string ignored) in the order below, and the first match wins. Get the host wrong (an IP instead of the vhost, a gateway in front of the real API) and you land on the OpenAI-compatible catch-all, the fallback, or raw HTTP.

Registered parsers

Provider (Provider value) Host match Path match Notes
OpenAI API (open_ai_api) api.openai.com /v1/chat/*, /v1/responses, /v1/completions Chat Completions, the Responses API and legacy completions. /v1/embeddings and /v1/moderations are claimed but yield no prompt event.
Azure OpenAI: *.openai.azure.com, *.cognitiveservices.azure.com, *.services.ai.azure.com Under /openai/, ending /chat/completions, /completions or /responses (covers /openai/deployments/{dep}/…, /openai/v1/… and /openai/responses) Parsed as OpenAI. The deployment name stands in for a missing model. Stamped hosting = azure.
Anthropic API (anthropic_api) api.anthropic.com /v1/messages Messages format, system field, tool use, thinking blocks. SSE events message_start / content_block_start / content_block_delta.
Vertex AI: aiplatform.googleapis.com, *-aiplatform.googleapis.com Contains /publishers/anthropic/models/, ending :rawPredict or :streamRawPredict Model taken from the path; streaming inferred from :streamRawPredict. Stamped hosting = vertex.
Bedrock: bedrock-runtime.*.amazonaws.com /model/anthropic.…/invoke or /invoke-with-response-stream The same Anthropic events inside AWS event-stream binary frames, detected from the first byte and decoded. Model id from the path (%3A decoded to :). Stamped hosting = bedrock.
Gemini API (gemini_api) generativelanguage.googleapis.com /v1beta/models/…, /v1/models/… or /v1alpha/models/…, containing :generateContent or :streamGenerateContent Populates safety ratings (HARM_CATEGORY_*) and finishReason (for example SAFETY). A stream without alt=sse arrives as one pretty-printed JSON array; it is re-read as an array at the end.
Vertex AI (hosts as above) Contains /publishers/google/models/ and a generate verb Model from the last /models/ segment. Stamped hosting = vertex.
Bedrock (bedrock_api) bedrock-runtime.*.amazonaws.com /model/{id}/converse or /model/{id}/converse-stream The provider-neutral Converse API, for any Bedrock model: system, messages with text, image, toolUse and toolResult parts, toolConfig tool specs, stopReason and token usage. converse-stream event-stream frames are decoded. Bedrock Guardrails verdicts stay in the body for the guardrail detectors.
OpenAI-compatible (open_ai_compatible) Any host not listed above (not OpenAI, Anthropic, Gemini, Azure, Vertex or Bedrock) /v1/chat/*, /v1/responses, /v1/completions, /api/chat, /api/generate The catch-all for local servers (Ollama, LM Studio, 127.0.0.1) and gateways (vLLM, Together, OpenRouter, LiteLLM). /api/chat and /api/generate are Ollama's native API. Stream framing (SSE or NDJSON) is decided once per stream from the first informative bytes, so SSE comment or keep-alive lines such as OpenRouter's : OPENROUTER PROCESSING do not derail it.
ChatGPT (web) (chat_gpt_web) chatgpt.com /backend-api/* The consumer ChatGPT web UI's backend. Only /backend-api/conversation… yields a prompt event: SSE data: {…} chunks, including the delta_encoding v1 patch stream.

The hosting stamp lands in parameters.other["hosting"], so a hosted re-seller shows its first-party provider label plus where it was served from. Routing is decided per record, so one session can mix providers (for example a local Ollama target plus an OpenAI-compatible judge).

Not parsed. The consumer web UIs claude.ai and gemini.google.com have no parser: their formats are undocumented and change without notice. Their records go to the fallback below. The claude_web and gemini_web values remain in the schema but no registered parser emits them. Bedrock invoke for non-Anthropic models, Anthropic Message Batches and the OpenAI Assistants and Threads APIs are not parsed either.

Unmatched traffic

When no parser matches, the proxy runs a content-based fallback over the response body, keyed on its shape rather than host and path. It tries, in order:

  1. Endpoint adapters you import in Proxy → Options → Endpoint adapters. They are saved with the project, and Export active adapters writes them to $CRUCIBLE_DATA_DIR/endpoint_adapters.json. Each names a path prefix (optionally a host), the transport (sse, ndjson or json) and a JSON Pointer to the assistant text, for a bespoke transport no built-in recogniser knows.
  2. Agent-protocol recognisers for CopilotKit / AG-UI, the Vercel AI SDK data stream and LangServe, which recover assistant text and tool calls.
  3. A generic heuristic for token-streaming SSE, NDJSON or plain JSON.

A hit is tagged Heuristic (heuristic), with the matched shape (for example copilotkit or sse-heuristic) in the model field, so the event-based guardrail detectors still run. Separately, the site map recognises JSON-RPC MCP traffic by its content and catalogues it per host; see Target → MCP. The mcp provider value is in the schema, but no code path stamps it on a record.

What the parser extracts

Into PromptEvent:

  • Messages by role (system / user / assistant) with content parts. Legacy completions map prompt (a string or an array) to user turns and choices[].text to assistant text.
  • Model name and provider-specific flags.
  • Tool / function schemas, tool-call arguments, and tool results. For the Responses API, streamed function_call arguments assemble into tool calls (not assistant text), and non-streamed function_call output items populate them too.
  • Token counts (prompt / completion) where the provider reports them.
  • finish_reason / finishReason, normalised across providers. A Responses API refusal sets Refusal, and its text stands in for the answer only when there is no output text.
  • Reasoning text: thinking and extended-reasoning traces, kept separate from the visible answer (reasoning_text), plus any pre_rewrite_text a provider exposes before a moderation rewrite.
  • Safety signals: provider safety ratings and refusal or filter markers, surfaced as guardrail hits. These feed the Judge column and the refusal verdict; see judge score for the polarity (high = a guardrail fired).

Security behaviour worth knowing

  • Credentials can be redacted at capture time, before the record hits the bus. With Redact sensitive headers on (a Proxy → Options toggle, off by default), sensitive headers are replaced in the stored record with a <REDACTED:sha256:…> marker (the first 8 hex characters of the value's SHA-256), so captures and reports never carry the key yet requests signed by the same key still correlate. The list covers Authorization, Proxy-Authorization, x-api-key, anthropic-api-key, x-goog-api-key, x-goog-user-project, Cookie, Set-Cookie, x-amz-security-token, x-amzn-trace-id, openai-organization, openai-project, x-csrf-token and the chatgpt.com sentinel tokens. It does not include Azure OpenAI's api-key header.
  • Replay keeps working. Authorization, x-api-key, x-goog-api-key, Cookie and anthropic-api-key are mirrored into an in-memory AuthCache (never written to disk) before redaction, so Craft and Barrage can still replay with real auth.
  • Parser buffers are hard-capped, so a hostile or runaway response can't exhaust memory. Limits: 16 MiB buffered text, 1 MiB per SSE line, 256 KiB per tool-call partial (4 MiB across all tool partials). On overflow the parser appends …[crucible-truncated] once and flags the record (parameters.other["parser_truncated"] = true). The proxy separately buffers at most 16 MiB of a body; beyond that a request is streamed upstream and tagged partial:request-body-over-cap, and a response is tagged partial:response-body-over-cap.

Local and mock targets

Point a local server (Ollama, an OpenAI-compatible gateway, LM Studio) at the proxy and it is captured under OpenAI-compatible. Inside the container this is the only supported way to rehearse attacks: zero cost, zero exposure, and no credentials on the wire. Live capture against a real provider is a VM-grade workflow, never a container one; see Isolated VM setup. The same local model can double as the Attacker or the LLM judge backend.

Troubleshooting

Symptom Cause Fix
Traffic captured but shows Unknown / raw HTTP Host or path matched no parser, and the fallback found no assistant text. A gateway in front of the real API changes the host; a non-chat path won't route. Confirm the client's base URL. A local or gateway endpoint parses as OpenAI-compatible only on the paths listed above. For a bespoke transport, add an endpoint adapter in Proxy → Options.
Record shows Heuristic No parser matched, but the fallback recognised the body shape. Expected for bespoke agent endpoints and the claude.ai / gemini.google.com web UIs.
OpenAI target lands as OpenAI-compatible, not OpenAI API The client isn't hitting api.openai.com or an Azure OpenAI host (a gateway host, or an IP). Expected. Parsing is identical; only the label differs.
Gemini traffic not decoded Path lacked :generateContent / :streamGenerateContent or a /models/ prefix, or it is the web UI (gemini.google.com). Use generativelanguage.googleapis.com or a Vertex /publishers/google/models/ path. The web UI only gets the fallback.
Bedrock call not decoded A non-Anthropic model on /invoke. Use /converse or /converse-stream, which parse for every model.
Response body cut off with …[crucible-truncated] A buffer cap fired (16 MiB text / 1 MiB SSE line / 256 KiB tool partial). Intended memory guard. The record is flagged parser_truncated; capture the full body out-of-band if you need it.
API key visible in a capture or export Redact sensitive headers is off, or the key travels in a header not on the list (such as Azure's api-key). Turn on redaction in Proxy → Options. It only affects captures taken after the toggle; existing rows aren't rewritten.
Replay from Craft/Barrage gets 401 after a restart The in-memory AuthCache is gone; only the <REDACTED:sha256:…> marker persists. Re-capture a live request so the auth header is mirrored again, or set the credential explicitly in the request.
Token counts / safety ratings blank The provider didn't return them, or the body was truncated. Not all providers report usage. Check the record isn't parser_truncated.

See also: Attack strategies · Glossary · Proxy · Cert / CA install · Troubleshooting