chat_via_lucairn
Send chat requests through Lucairn's privacy gateway. PII is detected and replaced before reaching the upstream LLM, with cross-provider routing to Anthropic or OpenAI.
Instructions
Send a chat request through the Lucairn privacy gateway with cross-provider BYOK (Anthropic + OpenAI). PII is detected and replaced with placeholders before reaching the upstream LLM. The gateway picks the upstream provider based on the model parameter: claude-* / anthropic-* use ANTHROPIC_API_KEY; gpt-* / openai-* / o1-* / o3-* / o4-* use OPENAI_API_KEY. Wire format follows the Anthropic Messages API. Developer-tier responses contain raw placeholders; Pro and Enterprise tiers can enable automatic re-linking back to the original values.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model identifier. Routing rules: `claude-*` and `anthropic-*` route to Anthropic via ANTHROPIC_API_KEY; `gpt-*`, `openai-*`, `o1-*`, `o3-*`, and `o4-*` route to OpenAI via OPENAI_API_KEY. Examples: `claude-sonnet-4-6`, `gpt-4o-mini`, `o3-mini`. Set one or both of ANTHROPIC_API_KEY and OPENAI_API_KEY in your MCP client env for BYOK; matching is case-insensitive. | |
| max_tokens | Yes | Maximum tokens to generate in the response. Required by the Anthropic Messages API. | |
| messages | Yes | Conversation messages. Each item is { role: "user" | "assistant", content: string | array }. | |
| system | No | Optional system prompt. May be a string or an array of content blocks. Sanitization policy is per-API-key on the gateway side (sanitize or passthrough_audit). | |
| temperature | No | Optional sampling temperature (0..1). |