InferenceInput
What the server should embed, and with which model.
Kdrant does not generate embeddings: it bundles no model, takes no dependency on an inference library, and never sends a vector it computed itself. This type is not an exception to that. It is a request that names text, an image or a custom object together with a model, exactly as a filter names what to match, and Qdrant produces the vector on its own side. The models, the providers and the cost of running them stay where they are.
qdrant.upsert("docs", wait = true) {
point(1) { document("the text to embed", model = "jinaai/jina-embeddings-v2-base-en") }
}
val hits = qdrant.search("docs") {
query(InferenceInput.Document("what to look for", model = "jinaai/jina-embeddings-v2-base-en"))
}The request needs a Qdrant with an inference provider configured; a plain container has none and rejects it. That is the server's deployment rather than the client's capability, which is why this is a request shape the contract tests validate against Qdrant's own schema and a round trip that runs only where a provider exists.
The three shapes are distinguished by the field they carry — text, image, object — rather than by a discriminator, which is why they serialize through a hand-written serializer instead of the generated polymorphic one.