Skip to main content
Deploy openai/gpt-oss-20b or openai/gpt-oss-120b as an authenticated chat endpoint in your AWS account using Tensorfuse and vLLM. This guide connects the model server, GPU allocation, API secret, and readiness probe, then shows how to query the endpoint. Benchmark your own workload before setting production capacity.

Before you deploy

Configure your cluster using Getting started. Confirm GPU quota and available capacity in your AWS region, then choose one model for the deployment directory. The Dockerfiles below pin the CUDA 12.9 variant of vLLM 0.28.0. Verify the cluster’s NVIDIA driver supports that image before deploying. Consult the upstream GPT-OSS recipe for model and hardware requirements.
These examples were checked against documentation and configuration syntax on September 6, 2026; the updated image has not been GPU-tested on a Tensorfuse cluster as part of this refresh. The GPU allocations below are starting configurations, not minimum requirements or throughput guarantees.
The model repositories are public. If your environment requires Hugging Face authentication, pass a token through Tensorfuse secrets, never through a Dockerfile.

1. Create an API secret

Keep the generated key in your password manager or secret store. The deployment injects it into the server environment. Clients need the same key in the Authorization header.

2. Choose a Dockerfile

Save one of the following as Dockerfile. Each starts a chat server on port 8000 and limits context to 8,192 tokens as an initial memory budget. Change that limit after measuring your prompt lengths, output lengths, and concurrency.
The 120B example preserves this guide’s eight-GPU layout. Eight GPUs are not a minimum requirement: quantization, context, kernels, and throughput targets affect sizing. Keep the server’s tensor-parallel size aligned with the deployment GPU count when changing the layout.

3. Match the deployment configuration

Save the matching example as deployment.yaml in the same directory. port, the server’s --port, and the readiness probe all use 8000. See the configuration reference for the complete set of options.
These settings allow scale-to-zero and cap the example at one replica. A request after idle shutdown can wait for startup. Set a positive min_scale when a warm replica is needed, then tune concurrency and max_scale from load-test results.

4. Deploy and check readiness

Inspect startup logs if the service stays unready. Common causes include unavailable GPUs, image/driver incompatibility, model loading failures, and insufficient memory. Configure a custom domain with TLS before sending credentials over a network.

5. Send an authenticated chat request

Set INFERENCE_URL to your HTTPS endpoint without /v1. Set MODEL_ID to the model you deployed, and retain the API key from step 1. The chat endpoint applies the model’s chat template.
For the 120B deployment, set MODEL_ID to openai/gpt-oss-120b. A successful streaming request returns server-sent events; the exact generated text depends on the model and sampling settings. With the openai Python package installed, use the same environment variables:
Validate reasoning output and tool calls separately using the upstream recipe when your application requires them. Basic chat success does not establish parser compatibility or tool correctness. Also confirm an invalid API key is rejected by the chat endpoint before using it beyond your test environment.

Benchmark GPT-OSS latency and cost

Measure your input lengths, output lengths, request rate, and cache state.

Reduce repeated prompt work

Evaluate prefix reuse for agent instructions and conversation history.