Model providers and self-hosted LLMs
On this page
Labels on this page
- a provider
- Provider Backend Type
- a subscription pool
- ChatGPT subscription pool, Claude subscription pool
- a relay pool
- ChatGPT relay pool, Claude relay pool
- a self-hosted model
- hosted_vllm
Model providers in SecondStack are your own accounts: provider keys, ChatGPT and Claude subscription pools, and self-hosted LLMs on vLLM as a development setup. SecondStack hosts no models and resells none. Your administrator connects the accounts your company already has, and SecondGate carries every request to them under your model access and your budget.
Which providers SecondGate connects
At v3.7.2 a site connects Anthropic, OpenAI, Google and OpenRouter with API keys, adds ChatGPT and Claude subscriptions as pools, and serves open-weight models from its own GPU through vLLM.
The provider form in ControlTower asks for a Backend Service (SecondGate, vLLM or custom) and a Provider Backend Type. The types at v3.7.2 are OpenAI, Anthropic, Gemini, Vertex AI, Azure AI, Azure, Bedrock, Databricks, xAI, OpenRouter, TypeSafe, Exa, Brave Search, SecondStack search and hosted vLLM. Exa, Brave Search and SecondStack search serve the gateway’s search model, which agents on Anthropic models use for web search.
How an administrator connects a provider
An administrator gives SecondStack at least one provider key at install, and adds or changes providers later in ControlTower.
- Before the first start, set one or more of
INITIAL_ANTHROPIC_API_KEY,INITIAL_OPENAI_API_KEY,INITIAL_GEMINI_API_KEYandINITIAL_OPENROUTER_API_KEYin the site’s environment. The install needs at least one, and the OpenAI key is the recommended one because some services depend on it.INITIAL_EXA_API_KEY,INITIAL_BRAVE_SEARCH_API_KEY,INITIAL_TYPESAFE_AI_API_KEY,INITIAL_CEREBRAS_API_KEY,INITIAL_AZURE_DATABRICKS_API_KEYandINITIAL_AZURE_DATABRICKS_BASE_URLare optional. - After the first start, open ControlTower and the providers page. Each provider has a Backend Service, a Provider Backend Type and its credential. SecondGate encrypts provider keys at rest, and the key never reaches a person or an app that calls the gateway.
- Grant models to people, teams and keys. Access is denied until someone grants it. Models and access describes the two channels, Chat App and direct API.
A provider is one account. A model that two providers serve has one binding per provider, and SecondGate fails over across them by priority. The default site allows 2 attempts for a model with several bindings. An administrator can set 1 to 3 with secondgate_default_max_attempts. A model with one binding fails on the first error.
How subscription pools work
A subscription pool lets a site share ChatGPT or Claude subscriptions it already pays for, and requests on a pool debit no platform budget.
- The operator turns a pool on with
CHATGPT_SUBSCRIPTION_DEPLOY=trueorCLAUDE_SUBSCRIPTION_DEPLOY=true, restarts the credential broker with./force_restart.sh credential-broker, runsjust init-configand suppliesINITIAL_CHATGPT_REFRESH_TOKENorINITIAL_CLAUDE_SETUP_TOKEN. - In ControlTower the pool appears as a ChatGPT subscription pool or a Claude subscription pool, with the subscriptions it holds.
- In the Chat App a subscription entry shows a smiley badge beside the model’s name, and the setting Auto: subscription models only keeps the automatic choice on those entries.
- From code, a subscription model answers under
/gateway/api/subscription/v1/and not under/gateway/api/v1/. SecondGate spreads requests across the pool in round robin. A request on one route never falls back to the other. Call SecondGate from your code shows both routes.
How one SecondStack borrows another’s providers
A relay pool lets one SecondStack deployment use the subscriptions of another through one parent key, and chained bindings do the same for API providers.
- A ChatGPT relay pool or a Claude relay pool points at the parent’s
/gateway/api/subscription/v1with ansg_key the parent issued. The link must use HTTPS. SecondGate refuses a fifth hop in a chain. - For API providers,
INITIAL_OPENAI_API_BASE_URL,INITIAL_ANTHROPIC_API_BASE_URLandINITIAL_GEMINI_API_BASE_URLtake the parent’s/gateway/apiroot, with the parent’ssg_key as the credential. Subscription pools, vLLM and the speech model do not chain. - A SecondStack search provider lets the child site search through the parent’s search model with a parent key.
- An administrator can reserve a pool for one Apps & Agents key, so one application owns that capacity.
The parent sees each borrowed request in its own record and charges it to the key it issued.
How self-hosted models run on vLLM
Self-hosted models run in vLLM on the site’s own NVIDIA GPUs, one vLLM service per model, and SecondGate serves them like any other provider.
- The operator sets
VLLM_DEPLOY=trueandVLLM_GPU_ENABLED=true. The second setting attaches every NVIDIA GPU on the host and needs the NVIDIA container runtime. Both are off by default. - Each model gets a provider with the backend type hosted vLLM, an
apiBaseUrlof the formhttp://vllm-<modelId>:8000/v1and the site’sVLLM_API_KEY. The hosted vLLM type is for chat models only. - A vLLM model can serve the Chat App, agents, Agent Claude and the Anthropic Messages surface that Claude Code uses, and a reasoning switch exists for vLLM and llama.cpp models since v3.6.0.
The default-local-gpu site configuration shows the whole stack on local models: Qwen3.6-35B-A3B and Qwen3-4B-Instruct for chat and agents, Qwen3‑Embedding-0.6B for Collections, Qwen-Image-2.1 for images and Parakeet for speech. The configuration is a development setup, verified on one arm64 NVIDIA GB10 host with 128 GB of unified memory. Its sample environment turns SecondGuard off. The Qwen-Image-2.1 license allows non-commercial research and evaluation only, so a production site replaces that model.
What model providers do not do
- SecondStack does not host or resell models. Every request runs on an account you own or a GPU you run.
- A provider key never leaves SecondGate. People and apps hold
sg_keys, and only SecondGate talks to the provider. - Subscription pools and API keys stay on separate routes. A request on
/subscription/v1/never falls back to an API key, and a request on/v1/never falls back to a pool. - The
default-local-gpuconfiguration is a development setup verified on one host. The product does not size it for a team. - A relay chain stops at four hops and runs only over HTTPS.
- Models and picker groups come from each site’s configuration. This page promises no model on every site.