Repository navigation
Description
Summary
BenchmarkJob still assumes every BaseModel is HostPath-backed and downloaded per node. That assumption was fixed for the serving path in #656 ("Mount PVC-backed models into ISVC pods"), whose description explicitly calls itself "the serving-side half of PVC support" — the benchmark controller never got the other half.
As a result, a BenchmarkJob targeting an InferenceService whose model is pvc:// can never be scheduled. There is also a hardcoded model name that makes every benchmark request 404 against a normally-configured runtime.
Verified against main @ 86184c3.
1. PVC-backed models make the benchmark pod permanently unschedulable
pkg/controller/v1beta1/benchmark/controller.go:250 adds the model-ready node selector unconditionally:
isvcutils.AddNodeSelectorForModelReadyNode(podSpec, baseModelMeta)and controller.go:354 builds the model volume as HostPath only:
HostPath: &v1.HostPathVolumeSource{Path: *baseModel.Storage.Path},Both assume model-agent has staged the weights onto the node. But model-agent skips PVC storage by design — pkg/modelagent/gopher.go:
case storage.StorageTypePVC:
s.logger.Infof("Skipping PVC storage type for model %s (handled by BaseModel controller)", modelInfo)
return nil // returns before the node-labeling stepand pkg/modelagent/scout.go returns false from shouldDownloadModel for PVC as well. So no node ever carries models.ome.io/<ns>.basemodel.<name>=Ready for a PVC-backed model, and the benchmark pod stays Pending forever:
0/2 nodes are available: 2 node(s) didn't match Pod's node affinity/selector.
preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling.
This is precisely the failure mode #656 anticipated and guarded against on the serving side (components/base.go, UpdatePodSpecNodeSelector):
// Skip the per-node model-ready affinity for PVC-backed models. PVCs
// aren't tied to specific nodes and the model agent never labels nodes
// for them, so the readiness selector would leave the pod unschedulable.
if isPVCBaseModel(b) { ... return }The benchmark controller has no equivalent branch.
podOverride cannot work around it: pod-level overrides are applied with a strategic merge patch, so the same-named volume keeps its HostPath source and nodeSelector (a map) can only gain keys, not lose them.
Related: Storage.Path is required even where it cannot exist
controller.go:346 and pkg/controller/v1beta1/benchmark/utils/utils.go:65-66 both hard-fail when Storage.Path is nil:
BaseModel <name> has missing Storage or Path information
But per #656's own description, "A pvc:// model has Storage.Path == nil" — the field is meaningful only for the HostPath case. The check belongs inside the HostPath branch.
2. --api-model-name is hardcoded to vllm-model
pkg/controller/v1beta1/benchmark/utils/utils.go:69-73:
args := map[string]string{
"--api-key": "sample-key", // TODO: Use actual service account key later
"--api-model-name": "vllm-model",
"--model-tokenizer": *baseModel.Storage.Path,
}--api-model-name becomes the model field of every OpenAI request genai-bench sends. vLLM and SGLang both validate it against --served-model-name and return 404 on a mismatch, so unless the runtime happens to serve under the literal name vllm-model, every request in the benchmark fails.
The failure is quiet: the job reports Completed, the pod exits 0, all result files are written — only num_error_requests inside the per-run JSON equals the request count. Nothing surfaces unless you open the results.
The correct value is already in scope in that same function (it has both the InferenceService and the BaseModel). Suggested precedence:
- the first value of
--served-model-namein the ISVC's engine runner command/args - otherwise the
BaseModelname - otherwise fail loudly, rather than substituting a guess
Note the neighbouring --api-key line carries a // TODO, but this one does not — it reads as an intentional constant rather than a placeholder.
3. The direct-Endpoint path is missing two required flags
utils.go:110-116:
func buildArgsFromEndpoint(endpoint *v1beta1.Endpoint) map[string]string {
return map[string]string{
"--api-backend": endpoint.APIFormat,
"--api-model-name": endpoint.ModelName,
"--api-base": endpoint.URL,
}
}No --api-key and no --model-tokenizer. genai-bench requires both (api-key is mandatory for the openai backend; --model-tokenizer is marked [required]), so a BenchmarkJob using spec.endpoint.endpoint exits immediately:
Error: Invalid value for '--api-key': API key is required for openai backend
--api-key has no envvar binding in genai-bench (only --model-api-key binds MODEL_API_KEY), so podOverride.env cannot supply it either. This path appears to be unusable for the openai backend as it stands.
Fixing this needs new fields on Endpoint (e.g. an api-key secret ref and a tokenizer reference), so it is heavier than 1 and 2. In the meantime it might be worth rejecting the combination in the webhook rather than letting the job fail inside genai-bench.
Environment
- OME
main@ 86184c3 (also reproduced on a v1.2.2-based build) - Kubernetes 1.30, 2 nodes
- BaseModel: Qwen2.5-0.5B-Instruct on a shared NFS-backed PVC (
pvc://<claim>/<subdir>) - Runtime: vLLM 0.8.5.post1
Willing to contribute
Happy to send a PR for 1 and 2 — both mirror what #656 already did on the serving side, and the pure helpers it introduced (isPVCStorage / parsePVCStorage in components/pvc.go) can be promoted to a shared package so the benchmark controller can reuse them. Please let me know if that direction looks right before I open it.
Activity
weetime commentedon Aug 21, 2026
Correcting my own scoping in section 2, and adding a finding that narrows it substantially. Also withdrawing an implication about
--api-key.Section 2 (
--api-model-name) is much narrower than I made it soundI said "unless a runtime happens to serve under the literal name
vllm-model, every request in the benchmark fails". True as far as it goes, but I never checked what the bundled runtimes actually do. Counting them:--served-model-nameconfig/runtimes/vllm/vllm-modelconfig/runtimes/srt/vllm-modelAnd SGLang doesn't validate the field at all —
python/sglang/srt/openai_api/adapter.pyechoesrequest.modelback without comparing it to the served name, so there is no 404 path there.So none of the ~206 bundled runtime definitions are affected. The hardcoded value is aligned with the vLLM catalogue's convention; SGLang's leniency covers the rest. That explains why it has held up.
What remains is narrower: a user-defined vLLM runtime whose
--served-model-nameis notvllm-model. Verified on a cluster:The failure mode is what makes it worth raising at all: the BenchmarkJob reports
Completed, the pod exits 0, and a full set of results and plots is written — onlynum_error_requestsin the per-run JSON reveals that every request 404'd.This may well be "document the convention" rather than "change the code". Your call.
Withdrawing an implication about
--api-keyI pointed out that the
--api-key: "sample-key"line lacks the// TODOits neighbour has, implying it was an unintentional constant. That reads as a criticism it doesn't deserve.genai-bench only requires an API key for backends in its
api_key_requiredlist (openai,vllm,sglang);oci-cohere,oci-genai,cohere,bedrockandvertexare inno_api_keyand authenticate through cloud-native mechanisms. GivenBenchmarkJob.spec.endpoint.endpoint.apiFormatisopenai;oci-cohere;cohere, the placeholder is doing exactly what a placeholder should for the OCI backends, and is harmless foropenaisince the engines OME fronts don't verify it.Section 3 (the direct-
Endpointpath not passing--api-key/--model-tokenizer) still stands as reported, since it is scoped to theopenaibackend where genai-bench does require them — that path exits before sending a single request.Proposed direction for section 2
Keep
vllm-modelas the default so the bundled runtimes are untouched, and add an optionalmodelNameto the endpoint spec — mirroringEndpoint.ModelName, which theinferenceServicebranch has no equivalent of. Unset preserves today's behaviour exactly; set sends that value instead. No new resource lookups.Two questions before I implement:
#779 is now a draft; the patch as it stands would regress the bundled vLLM runtimes (it falls back to the BaseModel name when the InferenceService has no runner override, which is the normal case), so it should not be merged as written.
weetime commentedon Aug 21, 2026
Closing. Most of what I reported here does not hold up, and I would rather retract it than leave it for someone to work through.
Section 2 (
--api-model-namehardcoded) — not a defect.spec.endpoint.endpoint.modelNameis passed through as--api-model-name, so a user who needs a specific name has a supported way to give one. The"vllm-model"constant applies only to theinferenceServicebranch, where no name was supplied, and it matches the--served-model-nameof every runtime underconfig/runtimes/vllm/. SGLang doesn't validate the field at all, so thesrt/catalogue is unaffected either way.The
--api-keyremark — withdrawn. genai-bench only requires a key foropenai/vllm/sglang;oci-cohere,cohereand the other cloud backends authenticate through their own mechanisms. The placeholder is doing what a placeholder should, and a real key can be supplied throughMODEL_API_KEY(orOPENAI_API_KEY) viapodOverride.env, which takes precedence over--api-keyincli.py.Section 1 (PVC-backed models) — I still believe this one is real:
addNodeSelectorFromInferenceServiceapplies the model-ready affinity unconditionally while the model agent skips PVC storage by design, so the pod cannot schedule. But I have not verified it end to end on a cluster, and given how much of this report was wrong I don't want it standing on my say-so. If it turns out to matter I'll open it separately with a reproduction.What may still be worth a look, unreported by me for now:
buildArgsFromEndpointreturns only--api-backend,--api-model-nameand--api-base. For theopenaibackend genai-bench also requires--api-keyand--model-tokenizer, so a BenchmarkJob usingspec.endpoint.endpointwith that backend exits before sending a request:Verified by running genai-bench 0.0.5 directly. I'm not filing it as an issue because I no longer trust my reading of the intended design here — happy to if you'd find it useful.
Apologies for the noise.