// This file is auto-generated by alef — DO NOT EDIT.
// alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
// To regenerate: alef generate
// To verify freshness: alef verify --exit-code
// Issues & docs: https://github.com/kreuzberg-dev/alef
package dev.kreuzberg;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

/**
 * Embedding model types supported by Kreuzberg.
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = false)
@JsonSubTypes({
    @JsonSubTypes.Type(value = EmbeddingModelType.Preset.class, name = "preset"),
    @JsonSubTypes.Type(value = EmbeddingModelType.Custom.class, name = "custom"),
    @JsonSubTypes.Type(value = EmbeddingModelType.Llm.class, name = "llm"),
    @JsonSubTypes.Type(value = EmbeddingModelType.Plugin.class, name = "plugin")
})
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public sealed interface EmbeddingModelType {

    /** Use a preset model configuration (recommended) */
    record Preset(@JsonProperty("name") String name) implements EmbeddingModelType { }

    /** Use a custom ONNX model from HuggingFace */
    record Custom(
        @JsonProperty("model_id") String modelId,
        @JsonProperty("dimensions") long dimensions
    ) implements EmbeddingModelType {
    }

    /** Provider-hosted embedding model via liter-llm. */
    record Llm(@JsonProperty("llm") LlmConfig llm) implements EmbeddingModelType { }

    /** In-process embedding backend registered via the plugin system. */
    record Plugin(@JsonProperty("name") String name) implements EmbeddingModelType { }
}
