Skip to content

Custom providers

Connect an OpenAI Chat Completions or Anthropic Messages upstream from the admin catalog.

Different from the public SDK base URL#

For inbound Anthropic SDK and Claude Code traffic, use the PleumRouter root https://router.pleum.ai; the client appends /v1/messages. This inbound surface supports Messages, count_tokens, tools, and SSE, but does not claim perfect parity with every Anthropic feature.

https://router.pleum.ai https://api.example.com/v1/messages

What the admin stores#

A custom provider base_url is the full upstream endpoint PleumRouter calls. It is not an SDK root, so include /v1/chat/completions or /v1/messages.

Upstream URL safety boundary#

Registration-time URL syntax checks reject Unicode dot separators, non-canonical numeric IPv4 forms, and non-global IP literals; outbound requests do not follow redirects. This cannot fully stop DNS rebinding, so deployment network controls must deny egress to private and link-local addresses.

Protocols and authentication#

OpenAI Chat Completions supports bearer or x-api-key authentication. It covers endpoints that implement Chat Completions request and response shapes, including Mistral, Groq, xAI, Google and Cohere compatibility surfaces, and Vercel AI Gateway's openai-compatible surface.

OpenAI Chat Completions
Protocol: OpenAI Chat Completions
Full endpoint: https://api.example.com/v1/chat/completions
Authentication: Authorization: Bearer <encrypted key>

Anthropic Messages supports bearer or x-api-key authentication. Amazon Bedrock Mantle and Microsoft Foundry can be registered with their full /v1/messages URL when using their Anthropic Messages-compatible endpoints.

Anthropic Messages
Protocol: Anthropic Messages
Full endpoint: https://api.example.com/v1/messages
Authentication: x-api-key <encrypted key>  # or Authorization: Bearer
New custom-provider models are text-only for both OpenAI Chat Completions and Anthropic Messages. The admin UI prevents other modalities and the backend rechecks with a 422 response.

Compatibility requirements#

A compatibility label alone is not enough. The endpoint must actually provide the selected protocol's request and response JSON, tool use, usage fields, and streaming SSE events. Keys are encrypted at rest and sent only through the selected header.

A legacy image/audio/video/3d model with token pricing is blocked when either the logical model or source provider is custom. Correctly non-token-priced legacy media remains attachable when the protocol is compatible.

Currently excluded#

AWS Bedrock Runtime, Google Vertex AI, OAuth flows, and AWS SigV4 signing are not directly supported. Do not register APIs that need custom URL construction, signing, or token exchange as bearer/x-api-key endpoints.

Next optional priorities#

No additional protocols are registered yet. The next candidates are Ollama native, Gemini native, Cohere v2, then cloud adapters such as Bedrock Runtime and Vertex.