# Inference Server Setup > How to serve a Plexus endpoint from NVIDIA NIM, TensorRT-LLM, Triton, Dynamo, vLLM, SGLang, TGI, llama-server, Ollama, KServe, Ray Serve, BentoML or LiteLLM, and what each one supports. Section: Plexus. Web page: https://docs.katara.com/products/plexus-engines/ Each section below shows how to run one server as a [Plexus](https://docs.katara.com/products/plexus.txt) endpoint: the command, the settings for tool calls, JSON mode, pictures and context length, and what it supports against the [endpoint requirements](https://docs.katara.com/products/plexus-requirements.txt#what-each-feature-needs). Every section was checked against that server's documentation on 13 November 2026. Settings change between releases, so check your version's documentation, then let the [connection check](https://docs.katara.com/products/plexus.txt#the-connection-check) confirm the result. Where a server's documentation does not settle a point, the section says the check decides it. The model id you declare in the portal is the name the server answers to in the `model` field, as `GET /v1/models` lists it. The base URL is whatever path the server's `/chat/completions` hangs from, such as `https://llm.example.com/v1`. ## A Proxy in Front Most servers below do not check a bearer key, or check it only on some routes, and few terminate TLS themselves. Unless a section says the server handles both, run it on a private address and put a reverse proxy in front, such as nginx, Envoy or Caddy, that: - terminates HTTPS with a certificate for your hostname; - requires the bearer key, or a client certificate ([mTLS](https://docs.katara.com/products/plexus-connections.txt#mtls)), and refuses everything else with `401`; - forwards `/v1/chat/completions` and `/v1/models` only, without buffering server-sent events; - answers `429` or `503` when the server is full, where the server itself would queue without limit. [LiteLLM](#litellm-proxy) can play this part too, and can map a bearer key to whatever the server expects. No proxy adds tool calls, JSON mode or pictures a server lacks. ## NVIDIA ### NVIDIA NIM for LLMs NIM runs a vLLM or SGLang engine inside its container and serves the OpenAI chat completions API on port 8000. ```sh docker run --gpus all -p 8000:8000 \ -e NIM_MODEL_PATH=hf:/// \ -e NIM_SERVED_MODEL_NAME= -e NIM_MAX_MODEL_LEN=32768 \ -e NIM_SSL_MODE=MTLS -e NIM_SSL_CERTS_PATH=/certs/server.pem \ -e NIM_SSL_KEY_PATH=/certs/server.key -e NIM_SSL_CA_CERTS_PATH=/certs/katara-plexus-ca.pem \ -v $PWD/certs:/certs \ : nim-serve --enable-auto-tool-choice --tool-call-parser llama3_json ``` - **Tool calls:** on an image with the vLLM engine, `--enable-auto-tool-choice` and `--tool-call-parser` together; without them `tool_choice` `auto` is refused with `400`. Parser names are the engine's own (see [vLLM](#vllm) and [SGLang](#sglang)); an SGLang image refuses `--enable-auto-tool-choice` and takes only its parser flag. Where container arguments cannot be passed, `NIM_PASSTHROUGH_ARGS` takes them, but it replaces the image's own value rather than adding to it, so start from that value. - **JSON mode:** the current documentation does not cover `response_format`; the check shows whether `json_object` and `json_schema` pass. - **Pictures:** a vision-language NIM accepts `image_url` with `data:` URIs. - **Context:** `NIM_MAX_MODEL_LEN`. - **Authentication:** no bearer key; NIM refuses `--api-key` and leaves authentication to you. `NIM_SSL_MODE=MTLS` makes it require a client certificate, which covers the credential: trust the Katara Plexus certificate authority, as above, or your own CA. Otherwise use a [proxy](#a-proxy-in-front). - **Busy:** not documented; cap concurrency at the proxy. ### TensorRT-LLM `trtllm-serve` serves `/v1/chat/completions` and `/v1/models`. ```sh cat > config.yaml <<'EOF' guided_decoding_backend: xgrammar EOF trtllm-serve --host 0.0.0.0 --port 8000 --config config.yaml \ --max_seq_len 32768 --tool_parser --served_model_name ``` - **Tool calls:** `--tool_parser`, a prototype feature: `qwen3`, `qwen3_coder` (also for Nemotron 3), `kimi_k2`, `gemma4`, `minimax_m2` and others, or `auto`. There is no Llama parser; serve Llama models with another server. - **JSON mode:** needs guided decoding, `guided_decoding_backend` in the file passed to `--config`. - **Pictures:** a multimodal model accepts `image_url` with `data:` URIs. Multimodal models also need `kv_cache_config.enable_block_reuse: false` in the config file. - **Context:** `--max_seq_len` caps prompt and output together. - **Authentication:** none, and no TLS. Use a [proxy](#a-proxy-in-front). - **Busy:** not documented for chat; cap concurrency at the proxy. ### Triton Inference Server, OpenAI-Compatible Frontend Triton's OpenAI frontend runs in front of a vLLM or TensorRT-LLM model repository, on port 9000 by default. ```sh cd /opt/tritonserver/python/openai python3 openai_frontend/main.py --model-repository --tokenizer \ --tool-call-parser llama3 ``` It does not meet the requirements for JSON mode or pictures: `response_format` is accepted and not applied, `json_schema` is not accepted, and the frontend takes text messages only. Its tool parsers cover Llama 3 (`llama3`) and Mistral (`mistral`) only, and `tool_choice` `required` forces the first tool in the list rather than any tool. Authentication is one custom header and value (`--openai-restricted-api`), not a bearer key. A model on Triton's frontend can serve chat and, with a parser, tool calls; a request that needs JSON mode or a picture goes to Katara's tier in fallback mode and is refused in strict mode. For the full feature set, serve the same engine with [TensorRT-LLM](#tensorrt-llm), [Dynamo](#nvidia-dynamo) or [vLLM](#vllm) instead. A [proxy](#a-proxy-in-front) or LiteLLM can turn the bearer key into Triton's header. ### NVIDIA Dynamo Dynamo's frontend serves the OpenAI API in front of vLLM, SGLang or TensorRT-LLM workers. Tool and reasoning parsers are set on the worker. ```sh python3 -m dynamo.frontend --http-port 8000 \ --tls-cert-path server.pem --tls-key-path server.key \ --tls-client-ca-cert-path katara-plexus-ca.pem python3 -m dynamo.vllm --model --dyn-tool-call-parser ``` - **Tool calls:** `--dyn-tool-call-parser` on the worker: `llama3_json` for Llama 3, `pythonic` for Llama 4, `hermes` and `qwen3_coder` for Qwen, `mistral`, `harmony` for gpt-oss, `nemotron_v3`, `gemma4`, `phi4`, `kimi_k2` and others. - **JSON mode:** `json_object` and `json_schema` are applied through guided decoding. - **Pictures:** supported with vLLM, SGLang and TensorRT-LLM workers serving a multimodal model. - **Context:** the worker engine's own setting. - **Authentication:** no bearer key. The frontend terminates TLS and, with `--tls-client-ca-cert-path`, requires a client certificate from that CA. Otherwise use a [proxy](#a-proxy-in-front). - **Busy:** an overloaded frontend answers `529` by default. Set `DYN_HTTP_OVERLOAD_STATUS_CODE=503`, or Katara counts the reply as a fault instead of a busy signal. ## Open-Source Servers ### vLLM ```sh vllm serve --api-key "$KEY" --max-model-len 32768 \ --enable-auto-tool-choice --tool-call-parser \ --max-num-seqs 64 --max-num-queued-reqs 256 ``` - **Tool calls:** `--enable-auto-tool-choice` with `--tool-call-parser`; `auto`, `required` and a named function then all work. Parsers by family: `hermes` (Hermes, Qwen2.5, QwQ), `qwen3_xml` (Qwen3-Coder), `llama3_json` (Llama 3.1 and 3.2), `llama4_pythonic` (Llama 4), `mistral`, `openai` (gpt-oss), `granite4`, `kimi_k2`, `cohere_command4` and more on the tool calling page; `--tool-parser-plugin` loads your own. - **JSON mode:** `json_object` and `json_schema` are on by default. - **Pictures:** a vision model; `--limit-mm-per-prompt.image` caps pictures per request. - **Context:** `--max-model-len`. Usage on a stream comes when the request asks, which Katara does; `--enable-force-include-usage` sends it always. - **Authentication:** `--api-key` (or `VLLM_API_KEY`) protects the `/v1` routes, though not every route the server has; vLLM does not terminate TLS. Use a [proxy](#a-proxy-in-front) for HTTPS. - **Busy:** requests queue; with `--max-num-queued-reqs`, those past the limit get `503`. ### SGLang ```sh python3 -m sglang.launch_server --model-path --host 0.0.0.0 --port 30000 \ --api-key "$KEY" --context-length 32768 --tool-call-parser \ --max-running-requests 64 --max-queued-requests 256 ``` - **Tool calls:** `--tool-call-parser`: `qwen` (Qwen except Qwen3-Coder), `qwen3_coder`, `llama3`, `llama4`, `pythonic`, `mistral`, `gpt-oss`, `hermes`, `gemma4`, `kimi_k2` and others, or `auto` to pick one from the chat template. With the default XGrammar backend, `required` and a named function are enforced. - **JSON mode:** `json_schema` is supported; the check shows whether `json_object` passes. `--grammar-backend` picks the backend. - **Pictures:** a vision-language model; add `--enable-multimodal` where the model needs it. - **Context:** `--context-length`. Leave `--allow-auto-truncate` off, its default, so a prompt over it is refused. - **Authentication:** `--api-key`. Use a [proxy](#a-proxy-in-front) for HTTPS. - **Busy:** `--max-queued-requests` limits the queue; the check's concurrency probe shows how the server answers past it. ### Hugging Face Text Generation Inference TGI is in maintenance mode: its maintainers accept only small fixes and point new deployments to vLLM or SGLang. An existing TGI deployment can still serve. ```sh docker run --gpus all --shm-size 1g -p 8080:80 -v $PWD/data:/data \ ghcr.io/huggingface/text-generation-inference: --model-id \ --max-input-tokens 30000 --max-total-tokens 32768 \ --max-concurrent-requests 64 --api-key "$KEY" --payload-limit 20000000 ``` - **Tool calls:** grammar-constrained from the model's chat template, with `tool_choice` `auto`, `required` or a named function; there is no parser flag. A request may not carry both `tools` and `response_format`. - **JSON mode:** `json_object` and `json_schema`. - **Pictures:** a vision-language model. Raise `--payload-limit` above its 2 MB default, or pictures sent as `data:` URIs are refused. - **Context:** `--max-input-tokens` and `--max-total-tokens`; a prompt over them is refused with `422`. - **Authentication:** `--api-key` checks a bearer key on the inference routes. Use a [proxy](#a-proxy-in-front) for HTTPS. - **Busy:** past `--max-concurrent-requests` the server answers `429`. ### llama.cpp llama-server ```sh llama-server -m model.gguf --api-key "$KEY" -c 32768 -np 1 \ --host 127.0.0.1 --port 8080 ``` - **Tool calls:** through the model's chat template (`--jinja`, on by default in current builds; some models need `--chat-template-file`). `tool_choice` `auto` and `required` work. A named function is not one of the values it reads, so the `tools_named` probe may fail; then tool calls stay closed for that model. - **JSON mode:** `json_object` and `json_schema`. - **Pictures:** `--mmproj` with the model's projector; `image_url` then takes `data:` URIs. - **Context:** `-c` with `-np` parallel slots. With more than one slot, read each slot's context at `/slots` and declare that figure. A prompt over it is refused with `400`, on a stream too. - **Authentication:** `--api-key` (several, comma-separated, or `--api-key-file`). Use a [proxy](#a-proxy-in-front) for HTTPS. - **Busy:** requests wait for a free slot without limit; cap concurrency at the proxy. ### Ollama ```sh OLLAMA_HOST=127.0.0.1:11434 OLLAMA_CONTEXT_LENGTH=32768 \ OLLAMA_NUM_PARALLEL=4 OLLAMA_MAX_QUEUE=64 ollama serve ollama pull ``` Ollama serves `/v1/chat/completions` and `/v1/models` with three gaps against the requirements: - It ignores `tool_choice`, so `required` and a named function are not enforced; the tool probes pass only if the model chooses to call the tool. - It cuts a prompt longer than its context instead of refusing it. Its default context is 4,096 tokens: set `OLLAMA_CONTEXT_LENGTH`, or `num_ctx` in a Modelfile, to the figure you declare. The context probe fails with `truncates_silently` and the usable context drops to what passed. - It has no authentication and serves plain HTTP. Bind it to localhost and put a [proxy](#a-proxy-in-front) in front. Tools follow the model's template, with no parser flag. `json_object` and `json_schema` are supported, and pictures as base64 `data:` URIs on a vision model. Past `OLLAMA_MAX_QUEUE` it answers `503`. Ollama suits a small model for chat; for agent runs, serve the model with [vLLM](#vllm) or [llama-server](#llamacpp-llama-server). ## Kubernetes Serving Platforms These platforms run vLLM underneath, so tool calls, JSON mode, pictures and the context limit are vLLM's: pass [vLLM's settings](#vllm) through the platform. None of them checks a bearer key itself. ### KServe The Hugging Face serving runtime uses vLLM on GPUs and serves the OpenAI API under `/openai/v1`. Pass vLLM's flags as arguments: ```yaml apiVersion: serving.kserve.io/v1beta1 kind: InferenceService metadata: name: spec: predictor: model: modelFormat: name: huggingface args: - --model_name= - --max-model-len=32768 - --enable-auto-tool-choice - --tool-call-parser= storageUri: hf:/// resources: limits: nvidia.com/gpu: "1" ``` The base URL is the service's HTTPS address with `/openai/v1`, such as `https://.example.com/openai/v1`; `KSERVE_OPENAI_ROUTE_PREFIX` set to empty serves `/v1` instead. An `LLMInferenceService` takes the same flags in its main container's arguments and is exposed through a Gateway API route; raise the route's timeout for long replies. KServe has no API key: require the bearer key or client certificate at the ingress or gateway, with an authorization policy or a [proxy](#a-proxy-in-front). ### Ray Serve LLM `build_openai_app` serves the OpenAI API; `engine_kwargs` passes any vLLM setting. ```python from ray import serve from ray.serve.llm import LLMConfig, build_openai_app config = LLMConfig( model_loading_config={"model_id": "", "model_source": "/"}, deployment_config={"autoscaling_config": {"min_replicas": 1, "max_replicas": 4}, "max_ongoing_requests": 64, "max_queued_requests": 128}, engine_kwargs={"max_model_len": 32768, "enable_auto_tool_choice": True, "tool_call_parser": ""}, ) serve.run(build_openai_app({"llm_configs": [config]}), blocking=True) ``` The same configuration works as YAML with `import_path: ray.serve.llm:build_openai_app` and `serve run`. JSON mode and pictures work as on vLLM. Past `max_queued_requests` Serve answers `503`. The OpenAI app checks no key: put a [proxy](#a-proxy-in-front) or ingress that requires one in front. ### BentoML BentoML's vLLM service starts vLLM's own OpenAI server inside the Bento, on port 3000 under `/v1`, and passes its arguments through. Add vLLM's flags to that argument list: `--max-model-len`, `--enable-auto-tool-choice` and `--tool-call-parser`. Build and run it with `bentoml build`, `bentoml containerize` and your own Kubernetes deployment. Features are vLLM's. A self-hosted Bento checks no key, so put a [proxy](#a-proxy-in-front) in front; a deployment on BentoCloud with authorization on takes a bearer API token. ## Gateways ### LiteLLM Proxy LiteLLM serves one OpenAI-compatible endpoint in front of several backends and checks keys itself. Point Katara at the proxy and give it a LiteLLM key. ```yaml model_list: - model_name: litellm_params: model: hosted_vllm/ api_base: https://engine.internal.example.com/v1 api_key: os.environ/ENGINE_KEY litellm_settings: drop_params: false general_settings: master_key: os.environ/LITELLM_MASTER_KEY database_url: os.environ/DATABASE_URL always_include_stream_usage: true ``` ```sh litellm --config config.yaml --port 4000 \ --ssl_keyfile_path server.key --ssl_certfile_path server.pem ``` - **Keys:** the master key, or a virtual key from `/key/generate` (needs the database), as the bearer key. Keys start with `sk-`. A key's rate limit answers `429`. - **Backends:** `hosted_vllm/` or `openai/` for any OpenAI-compatible server, with `api_base` ending in `/v1`. LiteLLM also has providers for NIM, Ollama and TGI. Its Triton provider uses Triton's own generate and infer routes, which carry no tool calls. - **Keep `drop_params` off**, its default. With it on, parameters LiteLLM thinks a backend does not support are removed without an error, `tools` and `response_format` among them, and the checks fail in ways that are hard to read. - **Features are the backend's.** LiteLLM forwards tool calls, JSON mode and pictures; it does not add them to a backend that lacks them. - **Upstream TLS:** `ssl_verify` takes a CA bundle and `ssl_certificate` a client certificate for the backend. - **Usage:** `always_include_stream_usage` adds usage to every stream. LiteLLM's usage chunk carries a non-empty `choices` list; Katara reads usage from any chunk, so this does not matter here.