LLM
Modal logo

Modal self-hosted LLM for Bolna AI voice agents

Modal lets you self-host an open-weight LLM with vLLM on serverless GPUs, in a region near your callers, and use it as the model behind a Bolna voice agent.

llmmodalself-hostedvllmserverless-gpucustom-llm
At a glance

How Modal fits in the stack

Best for

Reasoning, policy handling, tool use, and response generation.

Use this layer when

You want to tune quality, cost, latency, or function-calling behavior.

Connects to

Transcribed caller input upstream and voice or actions downstream.

Voice Stack

The LLM is the reasoning layer

The LLM is the reasoning layer

This provider decides how the agent interprets intent, selects next actions, calls tools, and formulates responses. It is the decision engine inside the voice stack.

TelephonyPhone Network
→
STTListener
→
LLMReasoning
→
TTSVoice
→
ToolsActions

Last updated

What is Modal used for in a Bolna voice agent?

Modal is where you run your own LLM server for a Bolna voice agent: you write a small Python app, run modal deploy, and Modal gives you a public HTTPS URL backed by GPUs. Unlike the other inference providers, Modal has no model catalog or shared endpoint, so you run the inference server. Choose it for a fine-tuned checkpoint, a model no hosted API offers, a GPU region close to your callers, or full control over the serving engine.

How do I set up Modal with Bolna?

  1. Install the Modal CLI with pip install modal, then run modal setup.
  2. Deploy an OpenAI-compatible vLLM server with modal deploy, based on Modal's vLLM inference example. Keep min_containers=1 and set routing_region close to your callers.
  3. Create a proxy token under Settings → Proxy Auth Tokens in Modal, or with modal workspace proxy-tokens create.
  4. Check the endpoint with a request to /v1/models. The id in the response is the model name to register.
  5. In Bolna, go to Settings → Integrations, filter by LLM, click Add model on the Custom LLM card and pick Modal.
  6. Enter the model name (a value you gave vLLM's --served-model-name, such as llm), the URL modal deploy printed followed by /v1, the proxy token as wk-<id>.ws-<secret>, and a family such as gemma or qwen.
  7. On the agent's Intelligence tab choose custom, select the model, save and place a web call.

The Modal setup guide in the Bolna docs includes the full example app.

Which Modal settings matter for a voice agent?

SettingWhereWhy it matters on a call
min_containers@app.serverKeep at least 1; with none running, requests get a 503
target_concurrency@app.serverConcurrent requests per container before Modal adds another
routing_region@app.serverus-east (default), us-west, ca-central, eu-west, ap-south (Mumbai) or ap-southeast-2
GPU typegpu=Larger GPUs cut time to first token for bigger models
--max-model-lenvLLM flagsSmaller context windows boot faster and leave memory for concurrent calls
--enable-auto-tool-choicevLLM flagsNeeded with your model's tool call parser if the agent uses tools

What can you build with Modal and Bolna?

Agents on your own fine-tuned model. Serve any Hugging Face checkpoint with vLLM and use it as the agent's LLM, with tokens billed by your Modal account rather than Bolna.

Lower latency for callers in India. Put the endpoint in ap-south to cut network time on every turn.

Open models with thinking turned off. Qwen3 models think before every reply by default. Turn it off per agent with the extra request param {"chat_template_kwargs": {"enable_thinking": false}}.

Full control over serving. Pick the engine, GPU and context length yourself. For managed dedicated deployments without server code, see Baseten, and for every provider preset see the custom LLM page.

FAQ

Modal on Bolna: frequently asked questions

Yes. Deploy an OpenAI-compatible vLLM server with modal deploy, then add it in Bolna as a custom LLM using the Modal preset, the printed URL plus /v1 and a Modal proxy token as the API key.

A Modal proxy token, written as the token ID and secret joined with a period, wk-<id>.ws-<secret>. Modal accepts it as a bearer token, which is what Bolna sends.

The app scaled to zero and Modal rejected the request with a 503. Set min_containers=1 and redeploy for any agent that takes live calls.

Yes. Set routing_region to ap-south (Mumbai) so Modal's proxy accepts requests there. To also keep the GPUs in that region, set compute_region, which adds a cost multiplier.

Browse this layer

Keep exploring the voice stack

Browse

Large Language Models

The LLM is the brain of your voice agent. It understands what callers say and decides how to respond. Bolna lets you switch between models like GPT-5.4 mini, Claude and DeepSeek by changing the provider and model in your agent LLM settings, so you can tune for speed, cost or reasoning depth.

Browse

Telephony

Telephony providers connect your voice agents to the phone network so they can make and receive real calls. Bolna supports managed integrations with major carriers as well as bring-your-own-carrier via SIP trunking, giving you full control over call routing, number provisioning, and cost.

Browse

Speech-to-Text

Speech-to-text converts what callers say into text that your LLM can process. Transcription accuracy and latency directly affect how natural a conversation feels. Bolna supports streaming STT providers optimized for telephony audio, including specialized models for Indian languages.

Browse

Text-to-Speech

Text-to-speech turns your agent responses into spoken audio. Voice quality shapes how callers perceive your brand. Flat, robotic speech kills trust while natural, expressive voices build it. Bolna integrates with the fastest TTS providers so responses sound human and arrive without awkward pauses.

Browse

Tools & Workflows

Tools let your voice agents take action during a call, not just talk. Book a calendar slot, look up an order through your own API, push a lead into your CRM, or trigger a multi-step automation in Zapier. These integrations turn voice agents from answering machines into workflow engines.

See where Modal fits in your production workflow

Use the demo to walk through provider selection, stack tradeoffs, and the exact workflow you want Bolna to automate.