Skip to main content
Self-hosted models are configured as first-class Meerkat model IDs. Once an alias such as gemma-4-31b is registered, users can pass it anywhere they would pass a hosted model:
This guide covers the general self-hosting contract and the Gemma 4 worked example. There is no separate Gemma page: Gemma 4 is one family under the same self-hosted model system as Ollama, LM Studio, vLLM, or another private OpenAI-compatible endpoint.

Model

Every self-hosted setup has three pieces: The alias is the name users type. The remote_model is the model name returned or expected by the serving stack.
Server entries carry connection facts only. The legacy bearer_token / bearer_token_env server fields are rejected at config parse; credentials are owned by the realm auth profile selected through the binding. A self-hosted server with no realm binding fails closed at run time.

Server Shape

For Ollama, LM Studio, vLLM, and most private gateways, use the OpenAI-compatible transport:
config.toml
api_style = "chat_completions" is the conservative default for Gemma 4 and other self-hosted tool-calling models. Use another API style only after the specific serving stack has been validated with Meerkat tools, structured output, and multimodal input.

Realm Binding

Self-hosted credentials are realm-owned. Declare a backend, auth profile, and binding for provider = "self_hosted" in the same realm config, and make it the realm default (or select it per run with --auth-binding):
config.toml
For a server that requires a bearer token, use:
config.toml

Alias Shape

config.toml
supports_thinking and supports_reasoning describe the behavior Meerkat should expose through the configured transport. Gemma 4 is reasoning-capable, but normalized reasoning controls and trace streaming still vary by serving stack, so validate the behavior you plan to rely on.
Meerkat’s current self-hosted path does not expose self-hosted Gemma audio or a self-hosted realtime transport. Treat these aliases as text, image-input, and tool-capable models unless a dedicated self-hosted realtime path is documented.

Gemma 4 Aliases

Recommended aliases:

Ollama

Use Ollama when the model runs on the same machine as Meerkat and you want the lightest local setup.
1

Serve the model

2

Register Ollama

config.toml
3

Add aliases

config.toml

LM Studio

Use LM Studio when you want a desktop-managed OpenAI-compatible server.
1

Start the local server

Load the Gemma 4 model in LM Studio, then start the local server.
2

Register LM Studio

config.toml
3

Alias the served model

Use the model name LM Studio exposes in its /v1/models output.
config.toml

vLLM

Use vLLM when you want a private server with more deployment control.
1

Launch vLLM

Start vLLM with the Gemma 4 model you want to expose.
2

Register the server

config.toml
If the endpoint requires a token, point the realm auth profile at it:
config.toml
3

Add remote aliases

Point aliases at the exact model names your vLLM endpoint exposes.
config.toml

Validation

Run these after adding or editing self-hosted model config:
The expected result:
  • rkat models shows a self_hosted provider group and the aliases you added.
  • rkat doctor resolves the realm binding and reports the server as reachable.
  • rkat run -m ... works without an explicit --provider.
  • The alias points at the exact upstream remote_model exposed by the server.
If rkat run fails with “no canonical realm binding”, add the realm binding shown above.

See Also

Providers

Hosted and self-hosted provider model.

CLI configuration

Config file locations and model settings.

CLI commands

Commands for running, diagnosing, and inspecting models.