Benchmark an OpenAI-compatible server
Use this type when the server has no servtuner catalog. You get every client-side metric. Kubernetes resource metrics are available when you declare its workload and Prometheus.
Prerequisites
Section titled “Prerequisites”- An endpoint that ends in the API prefix, usually
/v1. - The exact model name the server reports.
Configure the target
Section titled “Configure the target”apiVersion: servtuner.dev/v1kind: RunSpecname: gateway-baselinetarget: type: openai-compatible endpoint: https://api.example.com/v1 model: example-model auth: secretRef: { name: gateway-key, key: token } tls: { mode: tls }engine: { type: loadgen }workload: streaming: true dataset: type: synthetic input_tokens: { mean: 256, stddev: 64 } output_tokens: { mean: 128 }load: stages: - { rate: 2, duration: 120s } - { rate: 4, duration: 120s }slos: { ttft_p95: 2s, max_error_rate: 0.01 }tls verifies the server and presents no client certificate. It suits public HTTPS endpoints.
Run it
Section titled “Run it”For a local process, put the key in <dir>/gateway-key/token and pass --secrets-dir <dir>:
servtuner run --spec gateway.yaml --secrets-dir ./secretsVerify
Section titled “Verify”Run a connection check first. In the result, confirm that achieved RPS follows offered RPS and that errors are zero or expected.
Next steps
Section titled “Next steps”Use the SLO guide to extend the ladder until a stage fails.