Docs / Models and cost
Bring your own providers
Connect any OpenAI-compatible endpoint and use its models alongside the rest.
You are not tied to one gateway. Rescriptum can talk to any provider that exposes an OpenAI-compatible API: a vendor you already pay, a company proxy, or a model running on your own machine.
What counts as compatible
The provider needs a chat endpoint at {base_url}/chat/completions, and ideally a model list at {base_url}/models. If the model list lives elsewhere you can set a separate Models URL.
Add a provider
- Open Settings, 01 · Models & Routing and find Other Providers.
- Pick a preset or Custom. Presets today are OpenCode Go and DeepSeek (direct).
- Enter an ID, the base URL, and the API key.
- Press Test. Rescriptum calls the model list and shows what the provider returned, or the exact HTTP error.
- Save. The provider's models are now in the picker as
provider-id/model-name.
Prefixes keep names unambiguous. When a request goes out, the provider-id/ part is removed, so the provider receives its own model name.
Optional fields
| Field | Use |
|---|---|
| Models URL | Where to list models if it is not {base_url}/models |
| Session header | A header name your provider uses for sticky sessions or cache keys |
| User agent | Override for providers that filter by client |
| Enabled | Turn a provider off without deleting it |
Local and self-hosted models
Loopback addresses such as http://localhost:11434/v1 are allowed. Use Custom with the base URL of Ollama, LM Studio, vLLM, or any local server that speaks the OpenAI API. A key is optional if the server does not check one.
Rules worth knowing
- Reserved IDs. Names like
openrouter,openai,anthropic,deepseek,meta, andmistralaicannot be used as your provider ID, because they collide with model prefixes. Choose something likework-proxyormy-llama. - No
/modelsendpoint. The picker may show nothing for that provider. You can still type a full model ID such asmy-proxy/model-nameinto the default model field. - First provider switches the default. If no model has been chosen and you save the first keyed provider, the default model moves to that provider's first model so the next prompt works.
- Keys are never shown again. The UI only shows whether a key is set and a short preview. See Security and privacy for where it is stored.
Using providers with OpenRouter
The two coexist. With both configured, the picker merges both catalogs. With only custom providers, OpenRouter models are hidden. OpenRouter-specific features, such as provider routing strategies and the Pareto router, apply only to models served through OpenRouter.
Caching and cost on custom providers
Prompt caching depends on the provider. Rescriptum keeps the start of every prompt stable so a provider that supports prefix caching can use it. If your provider returns cached-token counts, they appear in the Usage panel. If it does not, cost shows as uncached.
Troubleshooting
- 401 or 403 on test. Re-enter the key; check it belongs to this base URL.
- 404 on test. The base URL likely needs
/v1on the end, or the models path differs. Set a Models URL. - Models load but chat fails. Some providers need a different model name than the one they list. Copy the ID exactly.
- Timeouts. Local models may need more time on first load. Retry once the model is warm.
More in Troubleshooting.