activeBackend property

PreferredBackend activeBackend
final

What the embedder actually runs on, which is CPU whatever was asked — ON NATIVE. The web shell builds this object too, and there it still holds cpu while EmbeddingModel.activeBackend is null and the runtime may be on WebGPU. That is harmless because this field is a cache KEY: it is a constant, so it can never trigger a rebuild. Read the model's own activeBackend for the answer; do not read this one.

Named for the answer, not the request — deliberately unlike the preferredBackend on ActiveModelParams and RuntimeConfig, which do hold the raw request. The shells build this object and a RuntimeConfig from the same local a few lines apart, so two fields with one name and opposite meanings is a trap; this one matches EmbeddingModel.activeBackend, which is where the value surfaces.

Implementation

final PreferredBackend activeBackend;