2026-09-23 06:20:08 +00:00
{
"version" : 1 ,
"providers" : {
"aliyun" : [
{
"name" : "Qwen3 family (hybrid thinking)" ,
"match" : "qwen3*" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"name" : "Qwen3.5 family (hybrid thinking)" ,
"match" : "qwen3.5*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"name" : "Qwen3.6 family (hybrid thinking)" ,
"match" : "qwen3.6*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"name" : "Qwen3.7 family (hybrid thinking)" ,
"match" : "qwen3.7*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"name" : "Qwen3.8 family (hybrid thinking)" ,
"match" : "qwen3.8*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true ,
"supports_reasoning_effort" : true ,
"thinking_budget_excludes_effort" : true
} ,
"thinking_levels" : {
"minimal" : "low" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "medium" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"name" : "qwen-plus family (hybrid thinking)" ,
"match" : "qwen-plus*" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"name" : "qwen-max family (hybrid thinking)" ,
"match" : "qwen-max*" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"name" : "qwen-turbo family (hybrid thinking)" ,
"match" : "qwen-turbo*" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"name" : "qwen-flash family (hybrid thinking)" ,
"match" : "qwen-flash*" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"name" : "DeepSeek V3 family on DashScope (hybrid thinking)" ,
"match" : "deepseek-v3*" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"name" : "DeepSeek V4 family on DashScope (hybrid thinking)" ,
"match" : "deepseek-v4*" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"name" : "Kimi K2 family on DashScope (hybrid thinking)" ,
"match" : "kimi-k2*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"name" : "GLM-5 family on DashScope (hybrid thinking)" ,
"match" : "glm-5*" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"id" : "qwen3.8-max" ,
"name" : "Qwen3.8 Max" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 1.77744 ,
"output" : 5.33231 ,
"cache_read" : 0.22218 ,
"cache_write" : 2.22179
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true ,
"supports_reasoning_effort" : true ,
"thinking_budget_excludes_effort" : true
} ,
"thinking_levels" : {
"minimal" : "low" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "medium" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"id" : "qwen3.8-flash" ,
"name" : "Qwen3.8 Flash" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.11875 ,
"output" : 0.40073 ,
"cache_read" : 0.01187 ,
"cache_write" : 0.14844
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true ,
"supports_reasoning_effort" : true ,
"thinking_budget_excludes_effort" : true
} ,
"thinking_levels" : {
"minimal" : "low" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "medium" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"id" : "qwen3.7-max" ,
"name" : "Qwen3.7 Max" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 2.5 ,
"output" : 7.5 ,
"cache_read" : 0.5 ,
"cache_write" : 3.125
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"id" : "qwen3.7-plus" ,
"name" : "Qwen3.7 Plus" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 64000 ,
"cost" : {
"input" : 0.5 ,
"output" : 3 ,
"cache_read" : 0.05 ,
"cache_write" : 0.625
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"id" : "qwen3.7-flash" ,
"name" : "Qwen3.7 Flash" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.02962 ,
"output" : 0.1185 ,
"cache_read" : 0.002962 ,
"cache_write" : 0.03703
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"id" : "qwen3.6-plus" ,
"name" : "Qwen3.6 Plus" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.5 ,
"output" : 3 ,
"cache_read" : 0.05 ,
"cache_write" : 0.625
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"id" : "qwen3.6-flash" ,
"name" : "Qwen3.6 Flash" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.1875 ,
"output" : 1.125 ,
"cache_write" : 0.234375
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"id" : "qwen3.5-plus" ,
"name" : "Qwen3.5 Plus" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.287 ,
"output" : 1.722
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"id" : "qwen3.5-flash" ,
"name" : "Qwen3.5 Flash" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.172 ,
"output" : 1.033
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"id" : "qwen3-max" ,
"name" : "Qwen3 Max" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 1.291 ,
"output" : 7.749
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"id" : "qwen3-vl-plus" ,
"name" : "Qwen3 VL Plus" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 32768 ,
"cost" : {
"input" : 0.143353 ,
"output" : 1.433525
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"id" : "qwen-plus" ,
"name" : "Qwen Plus" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 32768 ,
"cost" : {
"input" : 0.115 ,
"output" : 0.287 ,
"cache_read" : 0.012 ,
"cache_write" : 0.144
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"id" : "qwen-max" ,
"name" : "Qwen Max" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 8192 ,
"cost" : {
"input" : 0.345 ,
"output" : 1.377
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"id" : "qwen-turbo" ,
"name" : "Qwen Turbo" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 16384 ,
"cost" : {
"input" : 0.044 ,
"output" : 0.087
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"id" : "qwen-flash" ,
"name" : "Qwen Flash" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 32768 ,
"cost" : {
"input" : 0.022 ,
"output" : 0.216
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"id" : "qwen-vl-max" ,
"name" : "Qwen VL Max" ,
"reasoning" : false ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 8192 ,
"cost" : {
"input" : 0.23 ,
"output" : 0.574
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking"
} ,
{
"id" : "qwen-vl-plus" ,
"name" : "Qwen VL Plus" ,
"reasoning" : false ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 8192 ,
"cost" : {
"input" : 0.115 ,
"output" : 0.287
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking"
} ,
{
"id" : "qwq-plus" ,
"name" : "QwQ Plus" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 8192 ,
"cost" : {
"input" : 0.23 ,
"output" : 0.574
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "qwq-32b" ,
"name" : "QwQ 32B" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 8192 ,
"cost" : {
"input" : 0.287 ,
"output" : 0.861
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "deepseek-v4-pro" ,
"name" : "DeepSeek V4 Pro" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 393216 ,
"cost" : {
"input" : 0.435 ,
"output" : 0.87 ,
"cache_read" : 0.003625
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deepseek-api" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true ,
"supports_reasoning_effort" : true
} ,
"thinking_levels" : {
"minimal" : "high" ,
"low" : "high" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "deepseek-v4-flash" ,
"name" : "DeepSeek V4 Flash" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 393216 ,
"cost" : {
"input" : 0.14 ,
"output" : 0.28 ,
"cache_read" : 0.0028
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deepseek-api" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true ,
"supports_reasoning_effort" : true
} ,
"thinking_levels" : {
"minimal" : "high" ,
"low" : "high" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "deepseek-r1" ,
"name" : "DeepSeek R1" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 16384 ,
"cost" : {
"input" : 0.574 ,
"output" : 2.294
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deepseek-api" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "kimi-k3" ,
"name" : "Kimi K3" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 1048576 ,
"cost" : {
"input" : 2.827 ,
"output" : 14.133 ,
"cache_read" : 0.283
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "kimi-k2.6" ,
"name" : "Kimi K2.6" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 16384 ,
"cost" : {
"input" : 0.929 ,
"output" : 3.858
} ,
"source" : "https://help.aliyun.com/zh/model-studio/deep-thinking" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true
}
} ,
{
"id" : "glm-5.3" ,
"name" : "GLM-5.3" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 1.1 ,
"output" : 3.851 ,
"cache_read" : 0.275
} ,
"source" : "https://docs.bigmodel.cn/cn/guide/models/text/glm-5.3" ,
"compat" : {
"thinking_always_send" : true ,
"thinking_disable_on_non_stream" : true ,
"supports_reasoning_effort" : true
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"low" : "low" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "qwen3.7-text-embedding" ,
"name" : "Qwen3.7 Text Embedding" ,
"type" : "Embedding" ,
"dimension" : 1024 ,
"source" : "https://help.aliyun.com/zh/model-studio/embedding" ,
"compat" : {
"max_batch_size" : 20
}
} ,
{
"id" : "qwen3.7-text-embedding-flash" ,
"name" : "Qwen3.7 Text Embedding Flash" ,
"type" : "Embedding" ,
"dimension" : 1024 ,
"source" : "https://help.aliyun.com/zh/model-studio/embedding" ,
"compat" : {
"max_batch_size" : 20
}
} ,
{
"id" : "text-embedding-v4" ,
"name" : "Tongyi text-embedding-v4" ,
"type" : "Embedding" ,
"dimension" : 1024 ,
"source" : "https://help.aliyun.com/zh/model-studio/embedding" ,
"compat" : {
"max_batch_size" : 10
}
} ,
{
"id" : "text-embedding-v3" ,
"name" : "Tongyi text-embedding-v3" ,
"type" : "Embedding" ,
"dimension" : 1024 ,
"source" : "https://help.aliyun.com/zh/model-studio/embedding" ,
"compat" : {
"max_batch_size" : 10
}
} ,
{
"name" : "text-embedding-v2 (fixed 1536 dimensions)" ,
"match" : "text-embedding-v2" ,
"type" : "Embedding" ,
"source" : "https://help.aliyun.com/zh/model-studio/embedding-interfaces-compatible-with-openai" ,
"compat" : {
"dimensions_field" : "" ,
"max_batch_size" : 25
}
} ,
{
"name" : "text-embedding-v1 (fixed 1536 dimensions)" ,
"match" : "text-embedding-v1" ,
"type" : "Embedding" ,
"source" : "https://help.aliyun.com/zh/model-studio/embedding-interfaces-compatible-with-openai" ,
"compat" : {
"dimensions_field" : "" ,
"max_batch_size" : 25
}
} ,
{
"id" : "tongyi-embedding-vision-plus" ,
"name" : "Tongyi Embedding Vision Plus" ,
"type" : "Embedding" ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"input" : [
"text" ,
"image" ,
"video"
] ,
2026-09-23 06:20:08 +00:00
"dimension" : 1152 ,
"source" : "https://help.aliyun.com/zh/model-studio/multimodal-embedding-api-reference" ,
"compat" : {
"api" : "dashscope-embeddings" ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"dimensions_field" : "" ,
"max_image_batch_size" : 8 ,
"max_image_bytes" : 3000000
2026-09-23 06:20:08 +00:00
}
} ,
{
"name" : "tongyi-embedding-vision-flash (fixed 768 dimensions)" ,
"match" : "tongyi-embedding-vision-flash" ,
"type" : "Embedding" ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"input" : [
"text" ,
"image" ,
"video"
] ,
2026-09-23 06:20:08 +00:00
"source" : "https://help.aliyun.com/zh/model-studio/multimodal-embedding-api-reference" ,
"compat" : {
"api" : "dashscope-embeddings" ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"dimensions_field" : "" ,
"max_image_batch_size" : 8 ,
"max_image_bytes" : 3000000
2026-09-23 06:20:08 +00:00
}
} ,
{
"name" : "tongyi-embedding-vision snapshots" ,
"match" : "tongyi-embedding-vision*" ,
"type" : "Embedding" ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"input" : [
"text" ,
"image" ,
"video"
] ,
2026-09-23 06:20:08 +00:00
"source" : "https://help.aliyun.com/zh/model-studio/multimodal-embedding-api-reference" ,
"compat" : {
"api" : "dashscope-embeddings" ,
"dimensions_field" : "dimension" ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"max_batch_size" : 20 ,
"max_image_batch_size" : 8 ,
"max_image_bytes" : 3000000
2026-09-23 06:20:08 +00:00
}
} ,
{
"name" : "qwen3-vl-embedding (independent vectors by default)" ,
"match" : "qwen3-vl-embedding*" ,
"type" : "Embedding" ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"input" : [
"text" ,
"image" ,
"video"
] ,
2026-09-23 06:20:08 +00:00
"source" : "https://help.aliyun.com/zh/model-studio/multimodal-embedding-api-reference" ,
"compat" : {
"api" : "dashscope-embeddings" ,
"dimensions_field" : "dimension" ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"max_batch_size" : 20 ,
"max_image_batch_size" : 10 ,
"max_image_bytes" : 10000000
2026-09-23 06:20:08 +00:00
}
} ,
{
"name" : "qwen2.5-vl-embedding (fused vectors only)" ,
"match" : "qwen2.5-vl-embedding*" ,
"type" : "Embedding" ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"input" : [
"text" ,
"image" ,
"video"
] ,
2026-09-23 06:20:08 +00:00
"source" : "https://help.aliyun.com/zh/model-studio/multimodal-embedding-api-reference" ,
"compat" : {
"api" : "dashscope-embeddings" ,
"dimensions_field" : "dimension" ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"max_batch_size" : 1 ,
"max_image_batch_size" : 1 ,
"max_image_bytes" : 5000000
2026-09-23 06:20:08 +00:00
}
} ,
{
"name" : "multimodal-embedding-v1" ,
"match" : "multimodal-embedding*" ,
"type" : "Embedding" ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"input" : [
"text" ,
"image" ,
"video"
] ,
2026-09-23 06:20:08 +00:00
"source" : "https://help.aliyun.com/zh/model-studio/multimodal-embedding-api-reference" ,
"compat" : {
"api" : "dashscope-embeddings" ,
"dimensions_field" : "" ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"max_batch_size" : 20 ,
"max_image_batch_size" : 1 ,
"max_image_bytes" : 3000000
2026-09-23 06:20:08 +00:00
}
} ,
{
"id" : "qwen3-rerank" ,
2026-09-24 03:51:32 +00:00
"name" : "Qwen3 Rerank" ,
2026-09-23 06:20:08 +00:00
"type" : "Rerank" ,
2026-09-24 03:51:32 +00:00
"source" : "https://help.aliyun.com/zh/model-studio/text-rerank-api"
2026-09-23 06:20:08 +00:00
} ,
{
"id" : "gte-rerank-v2" ,
"name" : "GTE Rerank v2" ,
"type" : "Rerank" ,
"source" : "https://help.aliyun.com/zh/model-studio/text-rerank-api"
} ,
{
"id" : "qwen3-asr-flash" ,
"name" : "Qwen3 ASR Flash" ,
"type" : "ASR" ,
"source" : "https://help.aliyun.com/zh/model-studio/qwen-asr-api-reference" ,
"compat" : {
"api" : "openai-chat-audio" ,
"max_encoded_bytes" : 10485760 ,
"language_param" : "asr_options"
}
} ,
{
"name" : "Other Alibaba recognition models (not callable with the audio in the request)" ,
"match" : "*" ,
"type" : "ASR" ,
"source" : "https://help.aliyun.com/zh/model-studio/qwen-asr-api-reference" ,
"compat" : {
"unsupported_reason" : "Alibaba's other recognition models take a public file URL or run as asynchronous tasks; only qwen3-asr-flash accepts the audio in the request"
}
}
] ,
"anthropic" : [
{
"id" : "claude-fable-5-1" ,
"name" : "Claude Fable 5.1" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 10 ,
"output" : 50 ,
"cache_read" : 0.25 ,
"cache_write" : 12.5
} ,
"source" : "https://docs.anthropic.com/en/docs/about-claude/models" ,
"api" : "anthropic-messages" ,
"compat" : {
"thinking_mode" : "adaptive" ,
"supports_effort" : true
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"id" : "claude-opus-5" ,
"name" : "Claude Opus 5" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 5 ,
"output" : 25 ,
"cache_read" : 0.5 ,
"cache_write" : 6.25
} ,
"source" : "https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting#supported-models" ,
"api" : "anthropic-messages" ,
"compat" : {
"thinking_mode" : "adaptive" ,
"supports_effort" : true
} ,
"thinking_levels" : {
"minimal" : "low" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"id" : "claude-sonnet-5" ,
"name" : "Claude Sonnet 5" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 2 ,
"output" : 10 ,
"cache_read" : 0.2 ,
"cache_write" : 2.5
} ,
"source" : "https://docs.anthropic.com/en/docs/about-claude/models" ,
"api" : "anthropic-messages" ,
"compat" : {
"thinking_mode" : "adaptive" ,
"supports_effort" : true
} ,
"thinking_levels" : {
"minimal" : "low" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"id" : "claude-fable-5" ,
"name" : "Claude Fable 5" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 10 ,
"output" : 50 ,
"cache_read" : 1 ,
"cache_write" : 12.5
} ,
"source" : "https://docs.anthropic.com/en/docs/about-claude/models" ,
"api" : "anthropic-messages" ,
"compat" : {
"thinking_mode" : "adaptive" ,
"supports_effort" : true
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"id" : "claude-opus-4-8" ,
"name" : "Claude Opus 4.8" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 5 ,
"output" : 25 ,
"cache_read" : 0.5 ,
"cache_write" : 6.25
} ,
"source" : "https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting#supported-models" ,
"api" : "anthropic-messages" ,
"compat" : {
"thinking_mode" : "adaptive" ,
"supports_effort" : true
} ,
"thinking_levels" : {
"minimal" : "low" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"id" : "claude-opus-4-7" ,
"name" : "Claude Opus 4.7" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 5 ,
"output" : 25 ,
"cache_read" : 0.5 ,
"cache_write" : 6.25
} ,
"source" : "https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting#supported-models" ,
"api" : "anthropic-messages" ,
"compat" : {
"thinking_mode" : "adaptive" ,
"supports_effort" : true
} ,
"thinking_levels" : {
"minimal" : "low" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"id" : "claude-sonnet-4-6" ,
"name" : "Claude Sonnet 4.6" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 3 ,
"output" : 15 ,
"cache_read" : 0.3 ,
"cache_write" : 3.75
} ,
"source" : "https://docs.anthropic.com/en/docs/about-claude/models" ,
"api" : "anthropic-messages" ,
"compat" : {
"thinking_mode" : "adaptive" ,
"supports_effort" : true
} ,
"thinking_levels" : {
"minimal" : "low" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "claude-opus-4-6" ,
"name" : "Claude Opus 4.6" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 5 ,
"output" : 25 ,
"cache_read" : 0.5 ,
"cache_write" : 6.25
} ,
"source" : "https://docs.anthropic.com/en/docs/about-claude/models" ,
"api" : "anthropic-messages" ,
"compat" : {
"thinking_mode" : "adaptive" ,
"supports_effort" : true
} ,
"thinking_levels" : {
"minimal" : "low" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "claude-opus-4-5" ,
"name" : "Claude Opus 4.5" ,
"aliases" : [
"claude-opus-4-5-20251101"
] ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 200000 ,
"max_output_tokens" : 64000 ,
"cost" : {
"input" : 5 ,
"output" : 25 ,
"cache_read" : 0.5 ,
"cache_write" : 6.25
} ,
"source" : "https://platform.claude.com/docs/en/build-with-claude/effort" ,
"api" : "anthropic-messages" ,
"compat" : {
"supports_effort" : true
}
} ,
{
"id" : "claude-sonnet-4-5" ,
"name" : "Claude Sonnet 4.5" ,
"aliases" : [
"claude-sonnet-4-5-20250929"
] ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 200000 ,
"max_output_tokens" : 64000 ,
"cost" : {
"input" : 3 ,
"output" : 15 ,
"cache_read" : 0.3 ,
"cache_write" : 3.75
} ,
"source" : "https://platform.claude.com/docs/en/models/sonnet-4-5/overview" ,
"api" : "anthropic-messages"
} ,
{
"id" : "claude-haiku-4-5" ,
"name" : "Claude Haiku 4.5" ,
"aliases" : [
"claude-haiku-4-5-20251001"
] ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 200000 ,
"max_output_tokens" : 64000 ,
"cost" : {
"input" : 1 ,
"output" : 5 ,
"cache_read" : 0.1 ,
"cache_write" : 1.25
} ,
"source" : "https://docs.anthropic.com/en/docs/about-claude/models" ,
"api" : "anthropic-messages"
}
] ,
"azure_openai" : [
{
"name" : "GPT-6 deployments (reasoning, thinking always on)" ,
"match" : "gpt-6*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://learn.microsoft.com/azure/ai-foundry/openai/how-to/reasoning" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"name" : "GPT-5 deployments (reasoning, no sampling parameters)" ,
"match" : "gpt-5*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://learn.microsoft.com/azure/ai-foundry/openai/how-to/reasoning" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : "none" ,
"minimal" : "low"
}
} ,
{
"id" : "gpt-5" ,
"name" : "GPT-5 deployment (thinking cannot be disabled)" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://developers.openai.com/api/docs/models/gpt-5" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gpt-5-mini" ,
"name" : "GPT-5 Mini deployment (thinking cannot be disabled)" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://developers.openai.com/api/docs/models/gpt-5-mini" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gpt-5-nano" ,
"name" : "GPT-5 Nano deployment (thinking cannot be disabled)" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://developers.openai.com/api/docs/models/gpt-5-nano" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"name" : "o1 deployments (always-on reasoning)" ,
"match" : "o1*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://learn.microsoft.com/azure/ai-foundry/openai/how-to/reasoning" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"name" : "o3 deployments (always-on reasoning)" ,
"match" : "o3*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://learn.microsoft.com/azure/ai-foundry/openai/how-to/reasoning" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"name" : "o4 deployments (always-on reasoning)" ,
"match" : "o4*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://learn.microsoft.com/azure/ai-foundry/openai/how-to/reasoning" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"name" : "GPT-4o deployments" ,
"match" : "gpt-4o*" ,
"reasoning" : false ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://learn.microsoft.com/azure/ai-foundry/openai/how-to/reasoning"
} ,
{
"name" : "GPT-4.1 deployments" ,
"match" : "gpt-4.1*" ,
"reasoning" : false ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://learn.microsoft.com/azure/ai-foundry/openai/how-to/reasoning"
} ,
{
"name" : "text-embedding-3 deployments" ,
"match" : "text-embedding-3*" ,
"type" : "Embedding" ,
"source" : "https://learn.microsoft.com/azure/ai-foundry/openai/how-to/reasoning"
}
] ,
"deepseek" : [
{
"id" : "deepseek-v4-pro" ,
"name" : "DeepSeek V4 Pro" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 384000 ,
"cost" : {
"input" : 0.66 ,
"output" : 1.98 ,
"cache_read" : 0.022
} ,
"source" : "https://api-docs.deepseek.com/quick_start/pricing" ,
"thinking_levels" : {
"minimal" : "high" ,
"low" : "high" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "deepseek-flash" ,
"name" : "DeepSeek V4.1 Flash" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 384000 ,
"cost" : {
"input" : 0.15 ,
"output" : 0.6 ,
"cache_read" : 0.003
} ,
"source" : "https://api-docs.deepseek.com/quick_start/pricing"
} ,
{
"id" : "deepseek-v4-flash" ,
"name" : "DeepSeek V4 Flash (retired name, served by V4.1 Flash)" ,
"deprecated" : true ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 384000 ,
"cost" : {
"input" : 0.15 ,
"output" : 0.6 ,
"cache_read" : 0.003
} ,
"source" : "https://api-docs.deepseek.com/quick_start/pricing"
} ,
{
"id" : "deepseek-chat" ,
"name" : "DeepSeek Chat (retired 2026-07-24, non-thinking alias)" ,
"deprecated" : true ,
"reasoning" : false ,
"input" : [
"text"
] ,
"context_window" : 128000 ,
"max_output_tokens" : 8192 ,
"source" : "https://api-docs.deepseek.com/news/news260424/"
} ,
{
"id" : "deepseek-reasoner" ,
"name" : "DeepSeek Reasoner (retired 2026-07-24, thinking alias)" ,
"deprecated" : true ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 128000 ,
"max_output_tokens" : 65536 ,
"source" : "https://api-docs.deepseek.com/news/news260424/" ,
"thinking_levels" : {
"off" : null
}
}
] ,
"gemini" : [
{
"name" : "Gemini 3 family (thinkingLevel)" ,
"match" : "gemini-3*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"source" : "https://ai.google.dev/gemini-api/docs/thinking" ,
"api" : "google-generative-ai" ,
"compat" : {
"thinking_mode" : "level"
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"low" : "low" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gemini-3.8-flash" ,
"name" : "Gemini 3.8 Flash" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.75 ,
"output" : 3.75 ,
"cache_read" : 0.075
} ,
"source" : "https://ai.google.dev/gemini-api/docs/thinking" ,
"api" : "google-generative-ai" ,
"compat" : {
"thinking_mode" : "level"
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gemini-3.7-flash" ,
"name" : "Gemini 3.7 Flash" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.75 ,
"output" : 3.75 ,
"cache_read" : 0.075
} ,
"source" : "https://ai.google.dev/gemini-api/docs/thinking" ,
"api" : "google-generative-ai" ,
"compat" : {
"thinking_mode" : "level"
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gemini-3.6-flash" ,
"name" : "Gemini 3.6 Flash" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.75 ,
"output" : 3.75 ,
"cache_read" : 0.075
} ,
"source" : "https://ai.google.dev/gemini-api/docs/thinking" ,
"api" : "google-generative-ai" ,
"compat" : {
"thinking_mode" : "level"
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "minimal" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gemini-3.5-flash" ,
"name" : "Gemini 3.5 Flash" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 1.5 ,
"output" : 9 ,
"cache_read" : 0.15
} ,
"source" : "https://ai.google.dev/gemini-api/docs/thinking" ,
"api" : "google-generative-ai" ,
"compat" : {
"thinking_mode" : "level"
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "minimal" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gemini-3.5-flash-lite" ,
"name" : "Gemini 3.5 Flash Lite" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.3 ,
"output" : 2.5 ,
"cache_read" : 0.03
} ,
"source" : "https://ai.google.dev/gemini-api/docs/thinking" ,
"api" : "google-generative-ai" ,
"compat" : {
"thinking_mode" : "level"
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "minimal" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gemini-3.1-pro-preview" ,
"name" : "Gemini 3.1 Pro Preview" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 2 ,
"output" : 12 ,
"cache_read" : 0.2
} ,
"source" : "https://ai.google.dev/gemini-api/docs/thinking" ,
"api" : "google-generative-ai" ,
"compat" : {
"thinking_mode" : "level"
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gemini-3.1-flash-lite" ,
"name" : "Gemini 3.1 Flash Lite" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.25 ,
"output" : 1.5 ,
"cache_read" : 0.025
} ,
"source" : "https://ai.google.dev/gemini-api/docs/thinking" ,
"api" : "google-generative-ai" ,
"compat" : {
"thinking_mode" : "level"
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "minimal" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gemini-3-flash-preview" ,
"name" : "Gemini 3 Flash Preview" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.5 ,
"output" : 3 ,
"cache_read" : 0.05
} ,
"source" : "https://ai.google.dev/gemini-api/docs/thinking" ,
"api" : "google-generative-ai" ,
"compat" : {
"thinking_mode" : "level"
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "minimal" ,
"low" : "low" ,
"medium" : "medium" ,
"high" : "high" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gemini-2.5-pro" ,
"name" : "Gemini 2.5 Pro" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 1.25 ,
"output" : 10 ,
"cache_read" : 0.125
} ,
"source" : "https://ai.google.dev/gemini-api/docs/thinking" ,
"api" : "google-generative-ai" ,
"compat" : {
"thinking_mode" : "budget"
} ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "gemini-2.5-flash" ,
"name" : "Gemini 2.5 Flash" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.3 ,
"output" : 2.5 ,
"cache_read" : 0.03
} ,
"source" : "https://ai.google.dev/gemini-api/docs/thinking" ,
"api" : "google-generative-ai" ,
"compat" : {
"thinking_mode" : "budget"
}
} ,
{
"id" : "gemini-2.5-flash-lite" ,
"name" : "Gemini 2.5 Flash Lite" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.1 ,
"output" : 0.4 ,
"cache_read" : 0.01
} ,
"source" : "https://ai.google.dev/gemini-api/docs/thinking" ,
"api" : "google-generative-ai" ,
"compat" : {
"thinking_mode" : "budget"
}
} ,
{
"id" : "gemini-embedding-001" ,
"name" : "Gemini Embedding 001" ,
"type" : "Embedding" ,
"dimension" : 3072 ,
"context_window" : 2048 ,
"cost" : {
"input" : 0.15 ,
"output" : 0
} ,
"source" : "https://ai.google.dev/gemini-api/docs/embeddings"
} ,
{
"id" : "gemini-embedding-2" ,
"name" : "Gemini Embedding 2" ,
"aliases" : [
"gemini-embedding-2-preview"
] ,
"type" : "Embedding" ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"dimension" : 3072 ,
"context_window" : 8192 ,
"cost" : {
"input" : 0.2 ,
"output" : 0
} ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"source" : "https://ai.google.dev/gemini-api/docs/embeddings" ,
"compat" : {
"max_image_batch_size" : 6 ,
"image_mime_types" : [
"image/png" ,
"image/jpeg"
]
}
2026-09-23 06:20:08 +00:00
}
] ,
"generic" : [
{
"match" : "gpt-5*" ,
"reasoning" : true ,
"source" : "https://platform.openai.com/docs/guides/reasoning" ,
"compat" : {
"max_tokens_field" : "max_completion_tokens" ,
"supports_temperature" : false ,
"thinking_format" : "openai" ,
"supports_reasoning_effort" : true
}
} ,
{
"match" : "o1*" ,
"reasoning" : true ,
"source" : "https://platform.openai.com/docs/guides/reasoning" ,
"compat" : {
"max_tokens_field" : "max_completion_tokens" ,
"supports_temperature" : false ,
"thinking_format" : "openai" ,
"supports_reasoning_effort" : true
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"match" : "o3*" ,
"reasoning" : true ,
"source" : "https://platform.openai.com/docs/guides/reasoning" ,
"compat" : {
"max_tokens_field" : "max_completion_tokens" ,
"supports_temperature" : false ,
"thinking_format" : "openai" ,
"supports_reasoning_effort" : true
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"match" : "o4*" ,
"reasoning" : true ,
"source" : "https://platform.openai.com/docs/guides/reasoning" ,
"compat" : {
"max_tokens_field" : "max_completion_tokens" ,
"supports_temperature" : false ,
"thinking_format" : "openai" ,
"supports_reasoning_effort" : true
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "high" ,
"max" : "high"
}
}
] ,
"gpustack" : [ ] ,
2026-10-08 06:02:49 +00:00
"huggingface_tei" : [ ] ,
2026-09-23 06:20:08 +00:00
"hunyuan" : [
{
"name" : "Hunyuan T1 family (always-on reasoning)" ,
"match" : "hunyuan-t1*" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"source" : "https://cloud.tencent.com/document/product/1729/104753" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "hunyuan-t1-latest" ,
"name" : "Hunyuan T1" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 32000 ,
"source" : "https://cloud.tencent.com/document/product/1729/104753" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "hunyuan-t1-vision-20250916" ,
"name" : "Hunyuan T1 Vision (deep thinking)" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 28000 ,
"max_output_tokens" : 20000 ,
"source" : "https://cloud.tencent.com/document/product/1729/104753" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "hunyuan-turbos-latest" ,
"name" : "Hunyuan TurboS" ,
"reasoning" : false ,
"input" : [
"text"
] ,
"context_window" : 32000 ,
"max_output_tokens" : 8000 ,
"cost" : {
"input" : 0.11 ,
"output" : 0.28
} ,
"source" : "https://cloud.tencent.com/document/product/1729/104753"
} ,
{
"id" : "hunyuan-a13b" ,
"name" : "Hunyuan A13B (hybrid thinking)" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 224000 ,
"max_output_tokens" : 32000 ,
"source" : "https://cloud.tencent.com/document/product/1729/104753"
} ,
{
"id" : "hunyuan-2.0-thinking-20251109" ,
"name" : "Hunyuan 2.0 Thinking" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"source" : "https://cloud.tencent.com/document/product/1729/127293"
} ,
{
"id" : "hunyuan-2.0-instruct-20251111" ,
"name" : "Hunyuan 2.0 Instruct" ,
"reasoning" : false ,
"input" : [
"text"
] ,
"source" : "https://cloud.tencent.com/document/product/1729/127293"
} ,
{
"id" : "hunyuan-vision-1.5-instruct" ,
"name" : "Hunyuan Vision 1.5 Instruct (fast thinking)" ,
"reasoning" : false ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 24000 ,
"max_output_tokens" : 16000 ,
"source" : "https://cloud.tencent.com/document/product/1729/104753"
} ,
{
"id" : "hunyuan-turbos-vision-video" ,
"name" : "Hunyuan TurboS Vision Video" ,
"reasoning" : false ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 24000 ,
"max_output_tokens" : 8000 ,
"source" : "https://cloud.tencent.com/document/product/1729/104753"
} ,
{
"id" : "hunyuan-turbos-vision" ,
"name" : "Hunyuan TurboS Vision" ,
"reasoning" : false ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 32000 ,
"max_output_tokens" : 8000 ,
"source" : "https://cloud.tencent.com/document/product/1729/104753"
} ,
{
"id" : "hunyuan-lite" ,
"name" : "Hunyuan Lite" ,
"reasoning" : false ,
"input" : [
"text"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 6000 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://cloud.tencent.com/document/product/1729/104753"
} ,
{
"id" : "hunyuan-embedding" ,
"name" : "Hunyuan Embedding" ,
"type" : "Embedding" ,
"dimension" : 1024 ,
"source" : "https://cloud.tencent.com/document/product/1729/111007"
}
] ,
"jina" : [
{
"id" : "jina-embeddings-v5-omni-small" ,
"name" : "Jina Embeddings v5 Omni Small (multimodal)" ,
"type" : "Embedding" ,
"input" : [
"text" ,
"image"
] ,
"dimension" : 1024 ,
"context_window" : 32768 ,
"source" : "https://jina.ai/models/"
} ,
{
"id" : "jina-embeddings-v5-omni-nano" ,
"name" : "Jina Embeddings v5 Omni Nano (multimodal)" ,
"type" : "Embedding" ,
"input" : [
"text" ,
"image"
] ,
"dimension" : 768 ,
"context_window" : 8192 ,
"source" : "https://jina.ai/models/"
} ,
{
"id" : "jina-embeddings-v5-text-small" ,
"name" : "Jina Embeddings v5 Text Small" ,
"type" : "Embedding" ,
"dimension" : 1024 ,
"context_window" : 32768 ,
"source" : "https://jina.ai/models/"
} ,
{
"id" : "jina-embeddings-v5-text-nano" ,
"name" : "Jina Embeddings v5 Text Nano" ,
"type" : "Embedding" ,
"dimension" : 768 ,
"context_window" : 8192 ,
"source" : "https://jina.ai/models/"
} ,
{
"id" : "jina-embeddings-v4" ,
"name" : "Jina Embeddings v4" ,
"type" : "Embedding" ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"input" : [
"text" ,
"image"
] ,
2026-09-23 06:20:08 +00:00
"dimension" : 2048 ,
"context_window" : 32768 ,
"source" : "https://jina.ai/models/jina-embeddings-v4/"
} ,
{
"id" : "jina-embeddings-v3" ,
"name" : "Jina Embeddings v3" ,
"type" : "Embedding" ,
"dimension" : 1024 ,
"context_window" : 8192 ,
"source" : "https://jina.ai/models/jina-embeddings-v3/"
} ,
{
"id" : "jina-code-embeddings-1.5b" ,
"name" : "Jina Code Embeddings 1.5B" ,
"type" : "Embedding" ,
"dimension" : 1536 ,
"context_window" : 32768 ,
"source" : "https://jina.ai/models/"
} ,
{
"id" : "jina-code-embeddings-0.5b" ,
"name" : "Jina Code Embeddings 0.5B" ,
"type" : "Embedding" ,
"dimension" : 896 ,
"context_window" : 32768 ,
"source" : "https://jina.ai/models/"
} ,
{
"id" : "jina-reranker-v3.5" ,
"name" : "Jina Reranker v3.5" ,
"type" : "Rerank" ,
"context_window" : 131072 ,
"source" : "https://jina.ai/reranker/"
} ,
{
"id" : "jina-reranker-v3" ,
"name" : "Jina Reranker v3" ,
"type" : "Rerank" ,
"context_window" : 131072 ,
"source" : "https://jina.ai/models/jina-reranker-v3/"
} ,
{
"id" : "jina-reranker-m0" ,
"name" : "Jina Reranker m0 (multimodal)" ,
"type" : "Rerank" ,
"context_window" : 10000 ,
"source" : "https://jina.ai/reranker/"
} ,
{
"id" : "jina-reranker-v2-base-multilingual" ,
"name" : "Jina Reranker v2 Base Multilingual" ,
"type" : "Rerank" ,
"context_window" : 1024 ,
"source" : "https://jina.ai/reranker/"
}
] ,
"litellm" : [ ] ,
"lkeap" : [
{
"name" : "DeepSeek R1 family (always-on reasoning)" ,
"match" : "*deepseek-r1*" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"source" : "https://cloud.tencent.com/document/product/1772/115963" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"name" : "DeepSeek V3 family (thinking switch)" ,
"match" : "*deepseek-v3*" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"source" : "https://cloud.tencent.com/document/product/1772/115963"
} ,
{
"id" : "deepseek-v3.2" ,
"name" : "DeepSeek V3.2" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 32768 ,
"source" : "https://cloud.tencent.com/document/product/1772/115963"
} ,
{
"id" : "deepseek-v3.1-terminus" ,
"name" : "DeepSeek V3.1 Terminus" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 32768 ,
"source" : "https://cloud.tencent.com/document/product/1772/115963"
} ,
{
"id" : "deepseek-r1-0528" ,
"name" : "DeepSeek R1 (0528)" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 16384 ,
"source" : "https://cloud.tencent.com/document/product/1772/115963" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "deepseek-v3-0324" ,
"name" : "DeepSeek V3 (0324)" ,
"reasoning" : false ,
"input" : [
"text"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 16384 ,
"source" : "https://cloud.tencent.com/document/product/1772/115963"
} ,
{
"id" : "deepseek-r1" ,
"name" : "DeepSeek R1" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 65536 ,
"max_output_tokens" : 16384 ,
"source" : "https://cloud.tencent.com/document/product/1772/115963" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "deepseek-v3" ,
"name" : "DeepSeek V3" ,
"reasoning" : false ,
"input" : [
"text"
] ,
"context_window" : 65536 ,
"max_output_tokens" : 16384 ,
"source" : "https://cloud.tencent.com/document/product/1772/115963"
} ,
{
"id" : "deepseek-v3.1" ,
"name" : "DeepSeek V3.1" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 32768 ,
"source" : "https://cloud.tencent.com/document/product/1772/115963"
} ,
{
"id" : "lke-reranker-base" ,
"name" : "LKE Reranker Base" ,
"type" : "Rerank" ,
"source" : "https://cloud.tencent.com/document/product/1772/115339"
}
] ,
"longcat" : [
{
"id" : "LongCat-2.0" ,
"name" : "LongCat 2.0" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.75 ,
"output" : 2.95 ,
"cache_read" : 0.015
} ,
"source" : "https://longcat.chat/platform/docs/zh/api/chat.html"
} ,
{
"id" : "LongCat-Flash-Chat" ,
"name" : "LongCat Flash Chat (retired 2026-05-29)" ,
"deprecated" : true ,
"reasoning" : false ,
"input" : [
"text"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 8192 ,
"source" : "https://longcat.chat/platform/docs/zh/ChangeLog.html"
} ,
{
"id" : "LongCat-Flash-Thinking" ,
"name" : "LongCat Flash Thinking (retired 2026-05-29)" ,
"deprecated" : true ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 65536 ,
"source" : "https://longcat.chat/platform/docs/zh/ChangeLog.html" ,
"thinking_levels" : {
"off" : null
}
}
] ,
"mimo" : [
{
"id" : "mimo-v2.5-pro" ,
"name" : "MiMo V2.5 Pro" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.435 ,
"output" : 0.87 ,
"cache_read" : 0.0036
} ,
"source" : "https://mimo.mi.com/static/docs/price/pay-as-you-go.md"
} ,
{
"id" : "mimo-v2.5" ,
"name" : "MiMo V2.5" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.14 ,
"output" : 0.28 ,
"cache_read" : 0.0028
} ,
"source" : "https://mimo.mi.com/static/docs/price/pay-as-you-go.md"
} ,
{
"id" : "mimo-v2.5-pro-ultraspeed" ,
"name" : "MiMo V2.5 Pro Ultraspeed" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 1.305 ,
"output" : 2.61 ,
"cache_read" : 0.0108
} ,
"source" : "https://mimo.mi.com/static/docs/news/latest/beta-extended.md"
} ,
{
"id" : "mimo-v2-flash" ,
"name" : "MiMo V2 Flash (retired 2026-06-30)" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 256000 ,
"cost" : {
"input" : 0.1 ,
"output" : 0.3 ,
"cache_read" : 0.01
} ,
"deprecated" : true ,
"source" : "https://mimo.mi.com/static/docs/updates/deprecate.md"
} ,
{
"id" : "mimo-v2.5-asr" ,
"name" : "MiMo V2.5 ASR" ,
"type" : "ASR" ,
"source" : "https://mimo.mi.com/docs/en-US/quick-start/usage-guide/audio/Speech-Recognition"
}
] ,
"minimax" : [
{
"id" : "MiniMax-M3" ,
"name" : "MiniMax M3" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 512000 ,
"cost" : {
"input" : 0.3 ,
"output" : 1.2 ,
"cache_read" : 0.06
} ,
"source" : "https://platform.minimax.io/docs/guides/text-generation"
} ,
{
"id" : "MiniMax-M2.7" ,
"name" : "MiniMax M2.7" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 204800 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.3 ,
"output" : 1.2 ,
"cache_read" : 0.06 ,
"cache_write" : 0.375
} ,
"source" : "https://platform.minimax.io/docs/api-reference/text-openai-api" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "MiniMax-M2.7-highspeed" ,
"name" : "MiniMax M2.7 Highspeed" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 204800 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.6 ,
"output" : 2.4 ,
"cache_read" : 0.06 ,
"cache_write" : 0.375
} ,
"source" : "https://platform.minimax.io/docs/api-reference/text-openai-api" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "MiniMax-M2.5" ,
"name" : "MiniMax M2.5" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 204800 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.3 ,
"output" : 1.2 ,
"cache_read" : 0.03 ,
"cache_write" : 0.375
} ,
"source" : "https://platform.minimax.io/docs/api-reference/text-openai-api" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "MiniMax-M2.5-highspeed" ,
"name" : "MiniMax M2.5 Highspeed" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 204800 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.6 ,
"output" : 2.4 ,
"cache_read" : 0.06 ,
"cache_write" : 0.375
} ,
"source" : "https://platform.minimax.io/docs/api-reference/text-openai-api" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "MiniMax-M2.1" ,
"name" : "MiniMax M2.1" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 204800 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.3 ,
"output" : 1.2 ,
"cache_read" : 0.03 ,
"cache_write" : 0.375
} ,
"source" : "https://platform.minimax.io/docs/api-reference/text-openai-api" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "MiniMax-M2.1-highspeed" ,
"name" : "MiniMax M2.1 Highspeed" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 204800 ,
"max_output_tokens" : 131072 ,
"source" : "https://platform.minimax.io/docs/guides/text-generation" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "MiniMax-M2" ,
"name" : "MiniMax M2" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 204800 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.3 ,
"output" : 1.2
} ,
"source" : "https://platform.minimax.io/docs/api-reference/text-openai-api" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "asr-1.0" ,
"name" : "MiniMax ASR 1.0" ,
"type" : "ASR" ,
"source" : "https://platform.minimax.io/docs/api-reference/speech-to-text"
}
] ,
"modelscope" : [
{
"id" : "ZhipuAI/GLM-4.6" ,
"name" : "GLM-4.6" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 202752 ,
"max_output_tokens" : 98304 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://modelscope.cn/models/ZhipuAI/GLM-4.6"
} ,
{
"id" : "ZhipuAI/GLM-4.5" ,
"name" : "GLM-4.5" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 98304 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://modelscope.cn/models/ZhipuAI/GLM-4.5"
} ,
{
"id" : "Qwen/Qwen3-235B-A22B-Instruct-2507" ,
"name" : "Qwen3 235B-A22B Instruct 2507" ,
"reasoning" : false ,
"input" : [
"text"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://modelscope.cn/models/Qwen/Qwen3-235B-A22B-Instruct-2507"
} ,
{
"id" : "Qwen/Qwen3-235B-A22B-Thinking-2507" ,
"name" : "Qwen3 235B-A22B Thinking 2507" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://modelscope.cn/models/Qwen/Qwen3-235B-A22B-Thinking-2507" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "Qwen/Qwen3-30B-A3B-Instruct-2507" ,
"name" : "Qwen3 30B-A3B Instruct 2507" ,
"reasoning" : false ,
"input" : [
"text"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 16384 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://modelscope.cn/models/Qwen/Qwen3-30B-A3B-Instruct-2507"
} ,
{
"id" : "Qwen/Qwen3-30B-A3B-Thinking-2507" ,
"name" : "Qwen3 30B-A3B Thinking 2507" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 32768 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://modelscope.cn/models/Qwen/Qwen3-30B-A3B-Thinking-2507" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "Qwen/Qwen3-Coder-30B-A3B-Instruct" ,
"name" : "Qwen3 Coder 30B-A3B Instruct" ,
"reasoning" : false ,
"input" : [
"text"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://modelscope.cn/models/Qwen/Qwen3-Coder-30B-A3B-Instruct"
} ,
{
"id" : "Qwen/Qwen3-8B" ,
"name" : "Qwen3 8B (hybrid thinking)" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 32768 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://modelscope.cn/models/Qwen/Qwen3-8B"
} ,
{
"id" : "Qwen/Qwen3-VL-235B-A22B-Instruct" ,
"name" : "Qwen3 VL 235B-A22B Instruct" ,
"reasoning" : false ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 32768 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://modelscope.cn/models/Qwen/Qwen3-VL-235B-A22B-Instruct"
} ,
{
"id" : "Qwen/Qwen3-Embedding-8B" ,
"name" : "Qwen3 Embedding 8B" ,
"type" : "Embedding" ,
"dimension" : 4096 ,
"source" : "https://modelscope.cn/models/Qwen/Qwen3-Embedding-8B"
} ,
{
"id" : "Qwen/Qwen3-Embedding-0.6B" ,
"name" : "Qwen3 Embedding 0.6B" ,
"type" : "Embedding" ,
"dimension" : 1024 ,
"source" : "https://modelscope.cn/models/Qwen/Qwen3-Embedding-0.6B"
}
] ,
"moonshot" : [
{
"id" : "kimi-k3" ,
"name" : "Kimi K3" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 3 ,
"output" : 15 ,
"cache_read" : 0.3
} ,
"source" : "https://platform.kimi.com/docs/guide/kimi-k3-quickstart" ,
"compat" : {
"thinking_format" : "openai" ,
"supports_reasoning_effort" : true ,
"supports_temperature" : false ,
"tool_choice_modes" : [
"none" ,
"auto" ,
"required"
]
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"low" : "low" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "kimi-k2.7-code" ,
"name" : "Kimi K2.7 Code" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 262144 ,
"cost" : {
"input" : 0.95 ,
"output" : 4 ,
"cache_read" : 0.19
} ,
"source" : "https://platform.kimi.com/docs/guide/kimi-k2-7-code-quickstart" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "kimi-k2.7-code-highspeed" ,
"name" : "Kimi K2.7 Code Highspeed" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 262144 ,
"cost" : {
"input" : 1.9 ,
"output" : 8 ,
"cache_read" : 0.38
} ,
"source" : "https://platform.kimi.com/docs/guide/kimi-k2-7-code-quickstart" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "kimi-k2.6" ,
"name" : "Kimi K2.6" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 262144 ,
"cost" : {
"input" : 0.95 ,
"output" : 4 ,
"cache_read" : 0.16
} ,
"source" : "https://platform.kimi.com/docs/guide/kimi-k2-6-quickstart" ,
"compat" : {
"supports_temperature" : false
}
} ,
{
"name" : "moonshot-v1 family (retired 2026-08-31)" ,
"match" : "moonshot-v1*" ,
"reasoning" : false ,
"input" : [
"text"
] ,
"deprecated" : true ,
"source" : "https://platform.kimi.com/docs/models" ,
"compat" : {
"fixed_temperature" : 1
}
} ,
{
"id" : "kimi-k2.5" ,
"name" : "Kimi K2.5 (retired 2026-08-31)" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 262144 ,
"cost" : {
"input" : 0.6 ,
"output" : 3 ,
"cache_read" : 0.1
} ,
"deprecated" : true ,
"source" : "https://platform.kimi.com/docs/models" ,
"compat" : {
"supports_temperature" : false
}
} ,
{
"id" : "kimi-k2-thinking" ,
"name" : "Kimi K2 Thinking (retired 2026-08-31)" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 16384 ,
"cost" : {
"input" : 0.574 ,
"output" : 2.294
} ,
"deprecated" : true ,
"source" : "https://platform.kimi.com/docs/models" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "kimi-k2-turbo-preview" ,
"name" : "Kimi K2 Turbo (retired 2026-08-31)" ,
"reasoning" : false ,
"input" : [
"text"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 16384 ,
"deprecated" : true ,
"source" : "https://platform.kimi.com/docs/models"
} ,
{
"id" : "moonshot-v1-8k" ,
"name" : "Moonshot v1 8K (retired 2026-08-31)" ,
"reasoning" : false ,
"input" : [
"text"
] ,
"context_window" : 8192 ,
"max_output_tokens" : 8192 ,
"deprecated" : true ,
"source" : "https://platform.kimi.com/docs/models" ,
"compat" : {
"fixed_temperature" : 1
}
} ,
{
"id" : "moonshot-v1-32k" ,
"name" : "Moonshot v1 32K (retired 2026-08-31)" ,
"reasoning" : false ,
"input" : [
"text"
] ,
"context_window" : 32768 ,
"max_output_tokens" : 32768 ,
"deprecated" : true ,
"source" : "https://platform.kimi.com/docs/models" ,
"compat" : {
"fixed_temperature" : 1
}
} ,
{
"id" : "moonshot-v1-128k" ,
"name" : "Moonshot v1 128K (retired 2026-08-31)" ,
"reasoning" : false ,
"input" : [
"text"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 131072 ,
"deprecated" : true ,
"source" : "https://platform.kimi.com/docs/models" ,
"compat" : {
"fixed_temperature" : 1
}
} ,
{
"id" : "moonshot-v1-8k-vision-preview" ,
"name" : "Moonshot v1 8K Vision (retired 2026-08-31)" ,
"reasoning" : false ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 8192 ,
"max_output_tokens" : 8192 ,
"deprecated" : true ,
"source" : "https://platform.kimi.com/docs/models" ,
"compat" : {
"fixed_temperature" : 1
}
}
] ,
"novita" : [
{
"id" : "moonshotai/kimi-k3" ,
"name" : "Kimi K3" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 1048576 ,
"cost" : {
"input" : 3 ,
"output" : 15 ,
"cache_read" : 0.3
} ,
"source" : "https://docs.novita.ai/api-reference/model-apis-llm-chat-completions-api"
} ,
{
"id" : "zai-org/glm-5.2" ,
"name" : "GLM-5.2" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 1.4 ,
"output" : 4.4 ,
"cache_read" : 0.26
} ,
"source" : "https://docs.novita.ai/api-reference/model-apis-llm-chat-completions-api"
} ,
{
"id" : "zai-org/glm-5.1" ,
"name" : "GLM-5.1" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 204800 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 1.38 ,
"output" : 4.4 ,
"cache_read" : 0.26
} ,
"source" : "https://docs.novita.ai/api-reference/model-apis-llm-chat-completions-api"
} ,
{
"id" : "deepseek/deepseek-v4-pro" ,
"name" : "DeepSeek V4 Pro" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 393216 ,
"cost" : {
"input" : 1.6 ,
"output" : 3.2 ,
"cache_read" : 0.135
} ,
"source" : "https://docs.novita.ai/api-reference/model-apis-llm-chat-completions-api"
} ,
{
"id" : "deepseek/deepseek-v4-flash" ,
"name" : "DeepSeek V4 Flash" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 393216 ,
"cost" : {
"input" : 0.14 ,
"output" : 0.28 ,
"cache_read" : 0.028
} ,
"source" : "https://docs.novita.ai/api-reference/model-apis-llm-chat-completions-api"
} ,
{
"id" : "moonshotai/kimi-k2.6" ,
"name" : "Kimi K2.6" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 262144 ,
"cost" : {
"input" : 0.8 ,
"output" : 3.4 ,
"cache_read" : 0.16
} ,
"source" : "https://docs.novita.ai/api-reference/model-apis-llm-chat-completions-api"
} ,
{
"id" : "moonshotai/kimi-k2.7-code" ,
"name" : "Kimi K2.7 Code" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 262144 ,
"cost" : {
"input" : 0.95 ,
"output" : 4 ,
"cache_read" : 0.19
} ,
"source" : "https://docs.novita.ai/api-reference/model-apis-llm-chat-completions-api"
} ,
{
"id" : "qwen/qwen3.7-max" ,
"name" : "Qwen3.7 Max" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 1.25 ,
"output" : 3.75 ,
"cache_read" : 0.25 ,
"cache_write" : 1.5625
} ,
"source" : "https://docs.novita.ai/api-reference/model-apis-llm-chat-completions-api"
} ,
{
"id" : "qwen/qwen3.5-397b-a17b" ,
"name" : "Qwen3.5 397B-A17B" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.6 ,
"output" : 3.6
} ,
"source" : "https://docs.novita.ai/api-reference/model-apis-llm-chat-completions-api"
} ,
{
"id" : "minimax/minimax-m2.7" ,
"name" : "MiniMax M2.7" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 204800 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.3 ,
"output" : 1.2 ,
"cache_read" : 0.06
} ,
"source" : "https://docs.novita.ai/api-reference/model-apis-llm-chat-completions-api" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "xiaomimimo/mimo-v2.5-pro" ,
"name" : "MiMo V2.5 Pro" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.522 ,
"output" : 1.044 ,
"cache_read" : 0.0043
} ,
"source" : "https://docs.novita.ai/api-reference/model-apis-llm-chat-completions-api" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "google/gemma-4-31b-it" ,
"name" : "Gemma 4 31B IT" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.14 ,
"output" : 0.4
} ,
"source" : "https://docs.novita.ai/api-reference/model-apis-llm-chat-completions-api"
} ,
{
"id" : "qwen/qwen3-embedding-0.6b" ,
"name" : "Qwen3 Embedding 0.6B" ,
"type" : "Embedding" ,
"dimension" : 1024 ,
"context_window" : 32768 ,
"source" : "https://docs.novita.ai/api-reference/model-apis-llm-chat-completions-api"
} ,
{
"id" : "qwen/qwen3-embedding-8b" ,
"name" : "Qwen3 Embedding 8B" ,
"type" : "Embedding" ,
"dimension" : 4096 ,
"context_window" : 32768 ,
"source" : "https://docs.novita.ai/api-reference/model-apis-llm-chat-completions-api"
} ,
{
"id" : "baai/bge-m3" ,
"name" : "BGE-M3" ,
"type" : "Embedding" ,
"dimension" : 1024 ,
"context_window" : 8192 ,
"source" : "https://docs.novita.ai/api-reference/model-apis-llm-chat-completions-api"
}
] ,
"nvidia" : [
{
"id" : "nvidia/nemotron-3-ultra-550b-a55b" ,
"name" : "Nemotron 3 Ultra 550B-A55B" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.5 ,
"output" : 2.5 ,
"cache_read" : 0.15
} ,
"source" : "https://build.nvidia.com"
} ,
{
"id" : "nvidia/nemotron-3-super-120b-a12b" ,
"name" : "Nemotron 3 Super 120B-A12B" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 262144 ,
"cost" : {
"input" : 0.2 ,
"output" : 0.8
} ,
"source" : "https://build.nvidia.com"
} ,
{
"id" : "nvidia/nemotron-3.5-lightning-30b-a3b" ,
"name" : "Nemotron 3.5 Lightning 30B-A3B" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 262144 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://build.nvidia.com"
} ,
{
"id" : "z-ai/glm-5.3" ,
"name" : "GLM-5.3" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://build.nvidia.com" ,
"compat" : {
"thinking_format" : "openai" ,
"supports_reasoning_effort" : true
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"medium" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "deepseek-ai/deepseek-v4-pro-0813" ,
"name" : "DeepSeek V4 Pro" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 393216 ,
"cost" : {
"input" : 0.435 ,
"output" : 0.87 ,
"cache_read" : 0.003625
} ,
"source" : "https://build.nvidia.com"
} ,
{
"id" : "deepseek-ai/deepseek-v4-flash-0731" ,
"name" : "DeepSeek V4 Flash" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 393216 ,
"cost" : {
"input" : 0.14 ,
"output" : 0.28 ,
"cache_read" : 0.0028
} ,
"source" : "https://build.nvidia.com"
} ,
{
"id" : "moonshotai/kimi-k3" ,
"name" : "Kimi K3" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://build.nvidia.com" ,
"compat" : {
"max_tokens_field" : "max_completion_tokens" ,
"thinking_format" : "openai" ,
"supports_reasoning_effort" : true
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"medium" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "moonshotai/kimi-k2.6" ,
"name" : "Kimi K2.6" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 262144 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://build.nvidia.com"
} ,
{
"id" : "google/gemma-4-31b-it" ,
"name" : "Gemma 4 31B IT" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 16384 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://build.nvidia.com" ,
"compat" : {
"max_tokens_field" : "max_completion_tokens" ,
"thinking_format" : "none"
}
} ,
{
"id" : "nvidia/nemotron-3-embed-1b" ,
"name" : "Nemotron 3 Embed 1B" ,
"type" : "Embedding" ,
"dimension" : 2048 ,
"context_window" : 4096 ,
"source" : "https://docs.api.nvidia.com/nim/reference/nvidia-nemotron-3-embed-1b-infer"
} ,
{
"id" : "nvidia/llama-nemotron-rerank-vl-1b-v2" ,
"name" : "Llama Nemotron Rerank VL 1B v2" ,
"type" : "Rerank" ,
"source" : "https://build.nvidia.com"
} ,
{
"id" : "nvidia/nv-rerankqa-mistral-4b-v3" ,
"name" : "NV-RerankQA Mistral 4B v3" ,
"type" : "Rerank" ,
"source" : "https://build.nvidia.com"
}
] ,
"openai" : [
{
"name" : "GPT-6 family (reasoning, no sampling parameters, thinking always on)" ,
"match" : "gpt-6*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://developers.openai.com/api/docs/guides/latest-model" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"name" : "GPT-5 family (reasoning, no sampling parameters)" ,
"match" : "gpt-5*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://developers.openai.com/api/docs/guides/reasoning" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : "none" ,
"minimal" : "low"
}
} ,
{
"name" : "o1 family (always-on reasoning)" ,
"match" : "o1*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"name" : "o3 family (always-on reasoning)" ,
"match" : "o3*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"name" : "o4 family (always-on reasoning)" ,
"match" : "o4*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gpt-6-astra" ,
"name" : "GPT-6 Astra" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1050000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 10 ,
"output" : 50 ,
"cache_read" : 1 ,
"cache_write" : 12.5
} ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"id" : "gpt-5.6-terra" ,
"name" : "GPT-5.6 Terra" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1050000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 2 ,
"output" : 12 ,
"cache_read" : 0.2 ,
"cache_write" : 2.5
} ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : "none" ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"id" : "gpt-5.6-sol" ,
"name" : "GPT-5.6 Sol" ,
"aliases" : [
"gpt-5.6"
] ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1050000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 4 ,
"output" : 20 ,
"cache_read" : 0.4 ,
"cache_write" : 5
} ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : "none" ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"id" : "gpt-5.6-luna" ,
"name" : "GPT-5.6 Luna" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1050000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 0.2 ,
"output" : 1.2 ,
"cache_read" : 0.02 ,
"cache_write" : 0.25
} ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : "none" ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"id" : "gpt-5.5" ,
"name" : "GPT-5.5" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1050000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 5 ,
"output" : 30 ,
"cache_read" : 0.5
} ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : "none" ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"id" : "gpt-5.4" ,
"name" : "GPT-5.4" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1050000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 2.5 ,
"output" : 15 ,
"cache_read" : 0.25
} ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : "none" ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"id" : "gpt-5.4-mini" ,
"name" : "GPT-5.4 Mini" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 400000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 0.75 ,
"output" : 4.5 ,
"cache_read" : 0.075
} ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : "none" ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"id" : "gpt-5.4-nano" ,
"name" : "GPT-5.4 Nano" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 400000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 0.2 ,
"output" : 1.25 ,
"cache_read" : 0.02
} ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : "none" ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"id" : "gpt-5.2" ,
"name" : "GPT-5.2" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 400000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 1.75 ,
"output" : 14 ,
"cache_read" : 0.175
} ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : "none" ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"id" : "gpt-5.1" ,
"name" : "GPT-5.1" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 400000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 1.25 ,
"output" : 10 ,
"cache_read" : 0.125
} ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : "none" ,
"minimal" : "low" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gpt-5" ,
"name" : "GPT-5" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 400000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 1.25 ,
"output" : 10 ,
"cache_read" : 0.125
} ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gpt-5-mini" ,
"name" : "GPT-5 Mini" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 400000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 0.25 ,
"output" : 2 ,
"cache_read" : 0.025
} ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gpt-5-nano" ,
"name" : "GPT-5 Nano" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 400000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 0.05 ,
"output" : 0.4 ,
"cache_read" : 0.005
} ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "o3" ,
"name" : "o3" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 200000 ,
"max_output_tokens" : 100000 ,
"cost" : {
"input" : 2 ,
"output" : 8 ,
"cache_read" : 0.5
} ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "gpt-4.1" ,
"name" : "GPT-4.1" ,
"reasoning" : false ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1047576 ,
"max_output_tokens" : 32768 ,
"cost" : {
"input" : 2 ,
"output" : 8 ,
"cache_read" : 0.5
} ,
"source" : "https://developers.openai.com/api/docs/models"
} ,
{
"id" : "gpt-4.1-mini" ,
"name" : "GPT-4.1 Mini" ,
"reasoning" : false ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1047576 ,
"max_output_tokens" : 32768 ,
"cost" : {
"input" : 0.4 ,
"output" : 1.6 ,
"cache_read" : 0.1
} ,
"source" : "https://developers.openai.com/api/docs/models"
} ,
{
"id" : "gpt-4o" ,
"name" : "GPT-4o" ,
"aliases" : [
"gpt-4o-2024-11-20" ,
"gpt-4o-2024-08-06"
] ,
"reasoning" : false ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 128000 ,
"max_output_tokens" : 16384 ,
"cost" : {
"input" : 2.5 ,
"output" : 10 ,
"cache_read" : 1.25
} ,
"source" : "https://developers.openai.com/api/docs/models"
} ,
{
"id" : "gpt-4o-mini" ,
"name" : "GPT-4o Mini" ,
"reasoning" : false ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 128000 ,
"max_output_tokens" : 16384 ,
"cost" : {
"input" : 0.15 ,
"output" : 0.6 ,
"cache_read" : 0.075
} ,
"source" : "https://developers.openai.com/api/docs/models"
} ,
{
"id" : "text-embedding-3-small" ,
"name" : "text-embedding-3-small" ,
"type" : "Embedding" ,
"dimension" : 1536 ,
"context_window" : 8191 ,
"cost" : {
"input" : 0.02 ,
"output" : 0
} ,
"source" : "https://developers.openai.com/api/docs/models"
} ,
{
"id" : "text-embedding-3-large" ,
"name" : "text-embedding-3-large" ,
"type" : "Embedding" ,
"dimension" : 3072 ,
"context_window" : 8191 ,
"cost" : {
"input" : 0.13 ,
"output" : 0
} ,
"source" : "https://developers.openai.com/api/docs/models"
} ,
{
"id" : "whisper-1" ,
"name" : "Whisper" ,
"type" : "ASR" ,
"source" : "https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create" ,
"compat" : {
"response_format" : "verbose_json"
}
} ,
{
"id" : "gpt-transcribe" ,
"name" : "GPT Transcribe" ,
"type" : "ASR" ,
"source" : "https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create"
} ,
{
"id" : "gpt-4o-transcribe" ,
"name" : "GPT-4o Transcribe" ,
"type" : "ASR" ,
"source" : "https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create"
} ,
{
"id" : "gpt-4o-mini-transcribe" ,
"name" : "GPT-4o mini Transcribe" ,
"type" : "ASR" ,
"source" : "https://developers.openai.com/api/reference/resources/audio/subresources/transcriptions/methods/create"
} ,
{
"id" : "text-embedding-ada-002" ,
"name" : "text-embedding-ada-002" ,
"type" : "Embedding" ,
"dimension" : 1536 ,
"context_window" : 8192 ,
"cost" : {
"input" : 0.1 ,
"output" : 0
} ,
"source" : "https://developers.openai.com/api/docs/models" ,
"compat" : {
"dimensions_field" : ""
}
}
] ,
"openrouter" : [
{
"name" : "Anthropic models (cache_control breakpoints, thinking always on)" ,
"match" : "anthropic/*" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"source" : "https://openrouter.ai/docs/guides/best-practices/reasoning-tokens" ,
"compat" : {
"cache_control_format" : "anthropic"
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"id" : "openai/gpt-5.5" ,
"name" : "GPT-5.5" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1050000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 5 ,
"output" : 30 ,
"cache_read" : 0.5
} ,
"source" : "https://openrouter.ai/docs/guides/best-practices/reasoning-tokens" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : "none" ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"id" : "openai/gpt-5.4" ,
"name" : "GPT-5.4" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1050000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 2.5 ,
"output" : 15 ,
"cache_read" : 0.25
} ,
"source" : "https://openrouter.ai/docs/guides/best-practices/reasoning-tokens" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : "none" ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"id" : "anthropic/claude-opus-5" ,
"name" : "Claude Opus 5" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 5 ,
"output" : 25 ,
"cache_read" : 0.5 ,
"cache_write" : 6.25
} ,
"source" : "https://openrouter.ai/docs/guides/best-practices/reasoning-tokens" ,
"compat" : {
"cache_control_format" : "anthropic"
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"id" : "anthropic/claude-sonnet-5" ,
"name" : "Claude Sonnet 5" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 2 ,
"output" : 10 ,
"cache_read" : 0.2 ,
"cache_write" : 2.5
} ,
"source" : "https://openrouter.ai/docs/guides/best-practices/reasoning-tokens" ,
"compat" : {
"cache_control_format" : "anthropic"
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"id" : "anthropic/claude-sonnet-4.6" ,
"name" : "Claude Sonnet 4.6" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 128000 ,
"cost" : {
"input" : 3 ,
"output" : 15 ,
"cache_read" : 0.3 ,
"cache_write" : 3.75
} ,
"source" : "https://openrouter.ai/docs/guides/best-practices/reasoning-tokens" ,
"compat" : {
"cache_control_format" : "anthropic"
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "google/gemini-3.8-flash" ,
"name" : "Gemini 3.8 Flash" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.75 ,
"output" : 3.75 ,
"cache_read" : 0.075 ,
"cache_write" : 0.041667
} ,
"source" : "https://openrouter.ai/docs/guides/best-practices/reasoning-tokens" ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "google/gemini-3.1-pro-preview" ,
"name" : "Gemini 3.1 Pro Preview" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 2 ,
"output" : 12 ,
"cache_read" : 0.2 ,
"cache_write" : 0.375
} ,
"source" : "https://openrouter.ai/docs/guides/best-practices/reasoning-tokens" ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "deepseek/deepseek-v4-pro" ,
"name" : "DeepSeek V4 Pro" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 384000 ,
"cost" : {
"input" : 1.6 ,
"output" : 3.2 ,
"cache_read" : 0.135
} ,
"source" : "https://openrouter.ai/docs/guides/best-practices/reasoning-tokens" ,
"thinking_levels" : {
"minimal" : "high" ,
"low" : "high" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"id" : "deepseek/deepseek-v4-flash" ,
"name" : "DeepSeek V4 Flash" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 384000 ,
"cost" : {
"input" : 0.07 ,
"output" : 0.14 ,
"cache_read" : 0.014
} ,
"source" : "https://openrouter.ai/docs/guides/best-practices/reasoning-tokens" ,
"thinking_levels" : {
"minimal" : "high" ,
"low" : "high" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"id" : "z-ai/glm-5.3" ,
"name" : "GLM-5.3" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1310720 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 1.4 ,
"output" : 4.4 ,
"cache_read" : 0.26
} ,
"source" : "https://openrouter.ai/docs/guides/best-practices/reasoning-tokens" ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"medium" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "moonshotai/kimi-k3" ,
"name" : "Kimi K3" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 943718 ,
"cost" : {
"input" : 3 ,
"output" : 15 ,
"cache_read" : 0.3
} ,
"source" : "https://openrouter.ai/docs/guides/best-practices/reasoning-tokens" ,
"thinking_levels" : {
"minimal" : "low" ,
"medium" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "qwen/qwen3.7-max" ,
"name" : "Qwen3.7 Max" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 1.475 ,
"output" : 4.425 ,
"cache_read" : 0.295 ,
"cache_write" : 1.84375
} ,
"source" : "https://openrouter.ai/docs/guides/best-practices/reasoning-tokens"
} ,
{
"id" : "minimax/minimax-m3" ,
"name" : "MiniMax M3" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 512000 ,
"cost" : {
"input" : 0.3 ,
"output" : 1.2 ,
"cache_read" : 0.06
} ,
"source" : "https://openrouter.ai/docs/guides/best-practices/reasoning-tokens"
} ,
{
"id" : "x-ai/grok-4.6" ,
"name" : "Grok 4.6" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 500000 ,
"max_output_tokens" : 450000 ,
"cost" : {
"input" : 2 ,
"output" : 6 ,
"cache_read" : 0.5
} ,
"source" : "https://openrouter.ai/docs/guides/best-practices/reasoning-tokens" ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"id" : "openai/text-embedding-3-small" ,
"name" : "text-embedding-3-small" ,
"type" : "Embedding" ,
"dimension" : 1536 ,
"context_window" : 8192 ,
"source" : "https://openrouter.ai/docs/api_reference/embeddings"
} ,
{
"id" : "openai/text-embedding-3-large" ,
"name" : "text-embedding-3-large" ,
"type" : "Embedding" ,
"dimension" : 3072 ,
"context_window" : 8192 ,
"source" : "https://openrouter.ai/docs/api_reference/embeddings"
} ,
{
"id" : "cohere/rerank-v3.5" ,
"name" : "Cohere Rerank v3.5" ,
"type" : "Rerank" ,
"source" : "https://openrouter.ai/docs/api/api-reference/rerank/submit-a-rerank-request"
} ,
{
"id" : "openai/whisper-large-v3" ,
"name" : "Whisper Large v3" ,
"type" : "ASR" ,
"source" : "https://openrouter.ai/docs/api/api-reference/stt/create-transcription"
}
] ,
2026-10-08 09:54:15 +00:00
"pinecone" : [
{
"id" : "bge-reranker-v2-m3" ,
"name" : "BGE Reranker v2 M3 (Pinecone)" ,
"type" : "Rerank" ,
"context_window" : 1024 ,
"source" : "https://docs.pinecone.io/reference/api/2025-10/inference/list_models" ,
"compat" : {
"max_documents" : 100 ,
"truncate" : "END"
}
} ,
{
"id" : "pinecone-rerank-v0" ,
"name" : "Pinecone Rerank v0" ,
"type" : "Rerank" ,
"context_window" : 512 ,
"source" : "https://docs.pinecone.io/reference/api/2025-10/inference/list_models" ,
"compat" : {
"max_documents" : 100 ,
"truncate" : "END"
}
}
] ,
2026-09-23 06:20:08 +00:00
"qianfan" : [
{
"id" : "ernie-5.0-thinking-preview" ,
"name" : "ERNIE 5.0 Thinking Preview" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 128000 ,
"max_output_tokens" : 65536 ,
"source" : "https://cloud.baidu.com/doc/qianfan-docs/s/Wm95lyynv"
} ,
{
"id" : "ernie-4.5-turbo-128k" ,
"name" : "ERNIE 4.5 Turbo 128K" ,
"reasoning" : false ,
"input" : [
"text"
] ,
"context_window" : 128000 ,
"max_output_tokens" : 12288 ,
"source" : "https://cloud.baidu.com/doc/qianfan-docs/s/7m95lyy43"
} ,
{
"id" : "ernie-4.5-turbo-vl-32k" ,
"name" : "ERNIE 4.5 Turbo VL 32K" ,
"reasoning" : false ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 32000 ,
"max_output_tokens" : 12288 ,
"source" : "https://cloud.baidu.com/doc/qianfan-docs/s/7m95lyy43"
} ,
{
"id" : "ernie-x1-turbo-32k" ,
"name" : "ERNIE X1 Turbo 32K" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 32000 ,
"max_output_tokens" : 16000 ,
"source" : "https://cloud.baidu.com/doc/qianfan-docs/s/7m95lyy43" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "deepseek-v3.2" ,
"name" : "DeepSeek V3.2 (Qianfan)" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 128000 ,
"max_output_tokens" : 32000 ,
"source" : "https://cloud.baidu.com/doc/qianfan-docs/s/Wm95lyynv" ,
"compat" : {
"thinking_format" : "thinking-type"
}
} ,
{
"id" : "embedding-v1" ,
"name" : "Embedding-V1" ,
"type" : "Embedding" ,
"dimension" : 384 ,
"source" : "https://cloud.baidu.com/doc/qianfan-api/s/Fm7u3ropn"
} ,
{
"id" : "bge-large-zh" ,
"name" : "BGE Large ZH" ,
"type" : "Embedding" ,
"dimension" : 1024 ,
"source" : "https://cloud.baidu.com/doc/qianfan-api/s/Fm7u3ropn"
} ,
{
"id" : "tao-8k" ,
"name" : "Tao-8K" ,
"type" : "Embedding" ,
"dimension" : 1024 ,
"source" : "https://cloud.baidu.com/doc/qianfan/s/rmh4stp0j" ,
"compat" : {
"max_batch_size" : 1
}
} ,
{
"id" : "bce-reranker-base" ,
"name" : "BCE Reranker Base" ,
"type" : "Rerank" ,
"source" : "https://cloud.baidu.com/doc/qianfan-docs/s/7m95lyy43"
}
] ,
"qiniu" : [
{
"id" : "qwen3.5-397b-a17b" ,
"name" : "Qwen3.5 397B-A17B" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 64000 ,
"source" : "https://www.qiniu.com/ai/models"
} ,
{
"id" : "z-ai/glm-5" ,
"name" : "GLM-5" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 200000 ,
"max_output_tokens" : 128000 ,
"source" : "https://www.qiniu.com/ai/models"
} ,
{
"id" : "z-ai/glm-4.7" ,
"name" : "GLM-4.7" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 200000 ,
"max_output_tokens" : 200000 ,
"source" : "https://api.qnaigc.com/v1/market/models"
} ,
{
"id" : "minimax/minimax-m2.5" ,
"name" : "MiniMax M2.5" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 204800 ,
"max_output_tokens" : 128000 ,
"source" : "https://www.qiniu.com/ai/models"
} ,
{
"id" : "doubao-seed-2.0-pro" ,
"name" : "Doubao Seed 2.0 Pro" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 128000 ,
"source" : "https://www.qiniu.com/ai/models"
} ,
{
"id" : "moonshotai/kimi-k2.5" ,
"name" : "Kimi K2.5" ,
"reasoning" : false ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 256000 ,
"source" : "https://www.qiniu.com/ai/models"
} ,
{
"id" : "xiaomi/mimo-v2-flash" ,
"name" : "MiMo V2 Flash" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 256000 ,
"cost" : {
"input" : 0.1 ,
"output" : 0.3 ,
"cache_read" : 0.01
} ,
"source" : "https://www.qiniu.com/ai/models"
} ,
{
"id" : "deepseek/deepseek-v3.2-251201" ,
"name" : "DeepSeek V3.2 (251201)" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 128000 ,
"max_output_tokens" : 32000 ,
"source" : "https://apidocs.qnaigc.com/397639742e0"
} ,
{
"id" : "deepseek-r1" ,
"name" : "DeepSeek R1" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 128000 ,
"max_output_tokens" : 32000 ,
"source" : "https://api.qnaigc.com/v1/market/models" ,
"thinking_levels" : {
"off" : null
}
} ,
{
"id" : "deepseek-v3" ,
"name" : "DeepSeek V3" ,
"reasoning" : false ,
"input" : [
"text"
] ,
"context_window" : 128000 ,
"max_output_tokens" : 16000 ,
"source" : "https://www.qiniu.com/ai/models"
}
] ,
"requesty" : [
{
"id" : "openai/gpt-6-astra" ,
"name" : "GPT-6 Astra" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1050000 ,
"max_output_tokens" : 128000 ,
"source" : "https://docs.requesty.ai/frameworks/openai" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : null ,
"minimal" : "min" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"id" : "openai/gpt-5.5" ,
"name" : "GPT-5.5" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1050000 ,
"max_output_tokens" : 128000 ,
"source" : "https://docs.requesty.ai/frameworks/openai" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : "none" ,
"minimal" : "min" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"id" : "openai/gpt-5.4" ,
"name" : "GPT-5.4" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1050000 ,
"max_output_tokens" : 128000 ,
"source" : "https://docs.requesty.ai/frameworks/openai" ,
"compat" : {
"supports_temperature" : false
} ,
"thinking_levels" : {
"off" : "none" ,
"minimal" : "min" ,
"xhigh" : "xhigh" ,
"max" : "xhigh"
}
} ,
{
"id" : "anthropic/claude-opus-5" ,
"name" : "Claude Opus 5" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 128000 ,
"source" : "https://docs.requesty.ai/frameworks/openai" ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"id" : "anthropic/claude-sonnet-5" ,
"name" : "Claude Sonnet 5" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 128000 ,
"source" : "https://docs.requesty.ai/frameworks/openai" ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"xhigh" : "xhigh" ,
"max" : "max"
}
} ,
{
"id" : "vertex/gemini-3.8-flash" ,
"name" : "Gemini 3.8 Flash (Vertex)" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"source" : "https://docs.requesty.ai/frameworks/openai" ,
"thinking_levels" : {
"off" : null ,
"minimal" : "min" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "google/gemini-3.1-pro-preview" ,
"name" : "Gemini 3.1 Pro Preview" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"source" : "https://docs.requesty.ai/frameworks/openai" ,
"thinking_levels" : {
"off" : null ,
"minimal" : "min" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "google/gemini-3.6-flash" ,
"name" : "Gemini 3.6 Flash" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"audio" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 65536 ,
"source" : "https://docs.requesty.ai/frameworks/openai" ,
"thinking_levels" : {
"off" : null ,
"minimal" : "min" ,
"xhigh" : "high" ,
"max" : "high"
}
} ,
{
"id" : "deepseek/deepseek-v4-pro-0813" ,
"name" : "DeepSeek V4 Pro" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 131072 ,
"source" : "https://docs.requesty.ai/frameworks/openai"
} ,
{
"id" : "zai/glm-5.2" ,
"name" : "GLM-5.2" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 131072 ,
"source" : "https://docs.requesty.ai/frameworks/openai"
} ,
{
"id" : "moonshot/kimi-k3" ,
"name" : "Kimi K3" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1048576 ,
"max_output_tokens" : 262144 ,
"source" : "https://docs.requesty.ai/frameworks/openai"
} ,
{
"id" : "openai/gpt-4o-transcribe" ,
"name" : "GPT-4o Transcribe" ,
"type" : "ASR" ,
"source" : "https://docs.requesty.ai/api-reference/endpoint/audio-transcriptions-create"
} ,
{
"id" : "openai/gpt-4o-mini-transcribe" ,
"name" : "GPT-4o mini Transcribe" ,
"type" : "ASR" ,
"source" : "https://docs.requesty.ai/api-reference/endpoint/audio-transcriptions-create"
} ,
{
"id" : "openai/whisper-1" ,
"name" : "Whisper" ,
"type" : "ASR" ,
"source" : "https://docs.requesty.ai/api-reference/endpoint/audio-transcriptions-create" ,
"compat" : {
"response_format" : "verbose_json"
}
}
] ,
"siliconflow" : [
{
"name" : "DeepSeek V4 family (reasoning_effort high | max)" ,
"match" : "deepseek-ai/DeepSeek-V4*" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"source" : "https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions" ,
"thinking_levels" : {
"minimal" : "high" ,
"low" : "high" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"name" : "DeepSeek V4 Pro-tier family (reasoning_effort high | max)" ,
"match" : "Pro/deepseek-ai/DeepSeek-V4*" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"source" : "https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions" ,
"thinking_levels" : {
"minimal" : "high" ,
"low" : "high" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "deepseek-ai/DeepSeek-V4-Pro" ,
"name" : "DeepSeek V4 Pro" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1049000 ,
"max_output_tokens" : 393000 ,
"cost" : {
"input" : 1.74 ,
"output" : 3.48 ,
"cache_read" : 0.145
} ,
"source" : "https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions" ,
"thinking_levels" : {
"minimal" : "high" ,
"low" : "high" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "deepseek-ai/DeepSeek-V4-Flash" ,
"name" : "DeepSeek V4 Flash" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 384000 ,
"cost" : {
"input" : 0.14 ,
"output" : 0.28 ,
"cache_read" : 0.003
} ,
"source" : "https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions" ,
"thinking_levels" : {
"minimal" : "high" ,
"low" : "high" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "zai-org/GLM-5.2" ,
"name" : "GLM-5.2" ,
"aliases" : [
"Pro/zai-org/GLM-5.2"
] ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1049000 ,
"max_output_tokens" : 262000 ,
"cost" : {
"input" : 1.4 ,
"output" : 4.4 ,
"cache_read" : 0.26
} ,
"source" : "https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions" ,
"thinking_levels" : {
"minimal" : "high" ,
"low" : "high" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "Pro/zai-org/GLM-5.1" ,
"name" : "GLM-5.1 (Pro)" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 205000 ,
"max_output_tokens" : 205000 ,
"cost" : {
"input" : 1.4 ,
"output" : 4.4 ,
"cache_read" : 0.26
} ,
"source" : "https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "Pro/zai-org/GLM-5" ,
"name" : "GLM-5 (Pro)" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 205000 ,
"max_output_tokens" : 205000 ,
"cost" : {
"input" : 1 ,
"output" : 3.2
} ,
"source" : "https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "Pro/moonshotai/Kimi-K2.6" ,
"name" : "Kimi K2.6 (Pro)" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 262000 ,
"max_output_tokens" : 262000 ,
"cost" : {
"input" : 0.95 ,
"output" : 4 ,
"cache_read" : 0.16
} ,
"source" : "https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "Pro/moonshotai/Kimi-K2.5" ,
"name" : "Kimi K2.5 (Pro)" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 262000 ,
"max_output_tokens" : 262000 ,
"cost" : {
"input" : 0.45 ,
"output" : 2.25 ,
"cache_read" : 0.07
} ,
"source" : "https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "Qwen/Qwen3.5-397B-A17B" ,
"name" : "Qwen3.5 397B-A17B" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.29 ,
"output" : 1.74
} ,
"source" : "https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "Qwen/Qwen3.5-122B-A10B" ,
"name" : "Qwen3.5 122B-A10B" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.29 ,
"output" : 2.32
} ,
"source" : "https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "Qwen/Qwen3.5-35B-A3B" ,
"name" : "Qwen3.5 35B-A3B" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.23 ,
"output" : 1.86
} ,
"source" : "https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "Qwen/Qwen3.6-35B-A3B" ,
"name" : "Qwen3.6 35B-A3B" ,
"reasoning" : false ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 65536 ,
"cost" : {
"input" : 0.23 ,
"output" : 1.86
} ,
"source" : "https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions"
} ,
{
"id" : "deepseek-ai/DeepSeek-V3.2" ,
"name" : "DeepSeek V3.2" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 164000 ,
"max_output_tokens" : 164000 ,
"cost" : {
"input" : 0.27 ,
"output" : 0.42
} ,
"source" : "https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "Pro/MiniMaxAI/MiniMax-M2.5" ,
"name" : "MiniMax M2.5 (Pro)" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 204800 ,
"max_output_tokens" : 131000 ,
"cost" : {
"input" : 0.3 ,
"output" : 1.22
} ,
"source" : "https://platform.minimax.io/docs/api-reference/text-openai-api" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "Qwen/Qwen3-VL-32B-Instruct" ,
"name" : "Qwen3 VL 32B Instruct" ,
"reasoning" : false ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 262000 ,
"max_output_tokens" : 262000 ,
"cost" : {
"input" : 0.2 ,
"output" : 0.6
} ,
"source" : "https://docs.siliconflow.cn/cn/api-reference/chat-completions/chat-completions"
} ,
{
"id" : "BAAI/bge-m3" ,
"name" : "BGE-M3" ,
"type" : "Embedding" ,
"dimension" : 1024 ,
"source" : "https://api-docs.siliconflow.cn/docs/api/embeddings-post" ,
"compat" : {
"dimensions_field" : ""
}
} ,
{
"id" : "Qwen/Qwen3-Embedding-8B" ,
"name" : "Qwen3 Embedding 8B" ,
"type" : "Embedding" ,
"dimension" : 4096 ,
"source" : "https://api-docs.siliconflow.cn/docs/api/embeddings-post"
} ,
{
"id" : "Qwen/Qwen3-Embedding-4B" ,
"name" : "Qwen3 Embedding 4B" ,
"type" : "Embedding" ,
"dimension" : 2560 ,
"source" : "https://api-docs.siliconflow.cn/docs/api/embeddings-post"
} ,
{
"id" : "Qwen/Qwen3-Embedding-0.6B" ,
"name" : "Qwen3 Embedding 0.6B" ,
"type" : "Embedding" ,
"dimension" : 1024 ,
"source" : "https://api-docs.siliconflow.cn/docs/api/embeddings-post"
} ,
{
"id" : "BAAI/bge-reranker-v2-m3" ,
"name" : "BGE Reranker v2 M3" ,
"type" : "Rerank" ,
"source" : "https://api-docs.siliconflow.cn/docs/api/rerank-post"
} ,
{
"id" : "Qwen/Qwen3-Reranker-8B" ,
"name" : "Qwen3 Reranker 8B" ,
"type" : "Rerank" ,
"source" : "https://api-docs.siliconflow.cn/docs/api/rerank-post"
} ,
{
"id" : "FunAudioLLM/SenseVoiceSmall" ,
"name" : "SenseVoice Small" ,
"type" : "ASR" ,
"source" : "https://api-docs.siliconflow.cn/docs/api/audio-transcriptions-post"
} ,
{
"id" : "TeleAI/TeleSpeechASR" ,
"name" : "TeleSpeechASR" ,
"type" : "ASR" ,
"source" : "https://api-docs.siliconflow.cn/docs/api/audio-transcriptions-post"
}
] ,
"volcengine" : [
{
"id" : "doubao-seed-2-1-pro-260915" ,
"name" : "Doubao Seed 2.1 Pro (260915)" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1024000 ,
"max_output_tokens" : 256000 ,
"source" : "https://docs.volcengine.com/docs/ark/model-list?lang=zh"
} ,
{
"id" : "doubao-seed-2-1-pro-260628" ,
"name" : "Doubao Seed 2.1 Pro" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 256000 ,
"cost" : {
"input" : 0.8906 ,
"output" : 4.45301 ,
"cache_read" : 0.17812
} ,
"source" : "https://www.volcengine.com/docs/82379/1494384"
} ,
{
"id" : "doubao-seed-2-1-turbo-260628" ,
"name" : "Doubao Seed 2.1 Turbo" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 256000 ,
"cost" : {
"input" : 0.4453 ,
"output" : 2.22651 ,
"cache_read" : 0.08906
} ,
"source" : "https://www.volcengine.com/docs/82379/1494384"
} ,
{
"id" : "doubao-seed-2-0-pro-260215" ,
"name" : "Doubao Seed 2.0 Pro" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.47499 ,
"output" : 2.37494 ,
"cache_read" : 0.095
} ,
"source" : "https://docs.volcengine.com/docs/ark/model-list?lang=zh" ,
"compat" : {
"fixed_temperature" : 1
}
} ,
{
"id" : "doubao-seed-2-0-lite-260428" ,
"name" : "Doubao Seed 2.0 Lite" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.08906 ,
"output" : 0.53436 ,
"cache_read" : 0.01781
} ,
"source" : "https://www.volcengine.com/docs/82379/1494384"
} ,
{
"id" : "doubao-seed-2-0-mini-260428" ,
"name" : "Doubao Seed 2.0 Mini" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.02969 ,
"output" : 0.29687 ,
"cache_read" : 0.00594
} ,
"source" : "https://www.volcengine.com/docs/82379/1494384"
} ,
{
"id" : "doubao-seed-2-0-code-preview-260215" ,
"name" : "Doubao Seed 2.0 Code Preview" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 262144 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.47499 ,
"output" : 2.37494 ,
"cache_read" : 0.095
} ,
"source" : "https://www.volcengine.com/docs/82379/1494384"
} ,
{
"id" : "doubao-seed-1-8-251228" ,
"name" : "Doubao Seed 1.8 (retiring)" ,
"deprecated" : true ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 32768 ,
"cost" : {
"input" : 0.11875 ,
"output" : 1.18747 ,
"cache_read" : 0.02375
} ,
"source" : "https://docs.volcengine.com/docs/ark/model-list?lang=zh"
} ,
{
"id" : "doubao-seed-1-6-251015" ,
"name" : "Doubao Seed 1.6 (retiring)" ,
"deprecated" : true ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 32768 ,
"cost" : {
"input" : 0.11875 ,
"output" : 1.18747 ,
"cache_read" : 0.02375
} ,
"source" : "https://docs.volcengine.com/docs/ark/model-list?lang=zh"
} ,
{
"id" : "doubao-seed-1-6-flash-250828" ,
"name" : "Doubao Seed 1.6 Flash (retiring)" ,
"deprecated" : true ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 32768 ,
"cost" : {
"input" : 0.02227 ,
"output" : 0.22265 ,
"cache_read" : 0.00445
} ,
"source" : "https://docs.volcengine.com/docs/ark/deep-thinking?lang=zh" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "doubao-seed-1-6-vision-250815" ,
"name" : "Doubao Seed 1.6 Vision (retiring)" ,
"deprecated" : true ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 256000 ,
"max_output_tokens" : 32768 ,
"cost" : {
"input" : 0.11875 ,
"output" : 1.18747 ,
"cache_read" : 0.02375
} ,
"source" : "https://docs.volcengine.com/docs/ark/deep-thinking?lang=zh" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "deepseek-v4-1-flash-260910" ,
"name" : "DeepSeek V4.1 Flash (Ark)" ,
"reasoning" : true ,
"input" : [
"text" ,
"image"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 393216 ,
"source" : "https://docs.volcengine.com/docs/ark/model-list?lang=zh"
} ,
{
"id" : "deepseek-v4-pro-ga-260813" ,
"name" : "DeepSeek V4 Pro (Ark)" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 393216 ,
"cost" : {
"input" : 1.3359 ,
"output" : 4.00771 ,
"cache_read" : 0.04453
} ,
"source" : "https://www.volcengine.com/docs/82379/1494384"
} ,
{
"id" : "deepseek-v4-flash-ga-260731" ,
"name" : "DeepSeek V4 Flash (Ark)" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 393216 ,
"cost" : {
"input" : 0.4453 ,
"output" : 1.3359 ,
"cache_read" : 0.01484
} ,
"source" : "https://www.volcengine.com/docs/82379/1494384"
} ,
{
"id" : "glm-5-3-flash-260828" ,
"name" : "GLM-5.3 Flash (Ark)" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.11875 ,
"output" : 0.41563 ,
"cache_read" : 0.03414
} ,
"source" : "https://docs.volcengine.com/docs/ark/deep-thinking?lang=zh" ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"low" : "low" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "glm-5-2-260617" ,
"name" : "GLM-5.2 (Ark)" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 1.18747 ,
"output" : 4.15615 ,
"cache_read" : 0.29687
} ,
"source" : "https://www.volcengine.com/docs/82379/1494384"
} ,
{
"name" : "Retired doubao-embedding text models" ,
"match" : "doubao-embedding-text*" ,
"type" : "Embedding" ,
"source" : "https://docs.volcengine.com/docs/ark/TextVectorizationAPI?lang=zh" ,
"compat" : {
"api" : "openai-embeddings" ,
"dimensions_field" : "" ,
"max_batch_size" : 4
}
} ,
{
"name" : "Retired doubao-embedding-large text models" ,
"match" : "doubao-embedding-large-text*" ,
"type" : "Embedding" ,
"source" : "https://docs.volcengine.com/docs/ark/TextVectorizationAPI?lang=zh" ,
"compat" : {
"api" : "openai-embeddings" ,
"dimensions_field" : "" ,
"max_batch_size" : 4
}
} ,
{
"id" : "doubao-embedding-vision-251215" ,
"name" : "Doubao Embedding Vision (251215)" ,
"type" : "Embedding" ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"input" : [
"text" ,
"image" ,
"video"
] ,
2026-09-23 06:20:08 +00:00
"dimension" : 2048 ,
"source" : "https://docs.volcengine.com/docs/ark/multimodal-vectorization-api?lang=zh"
} ,
{
"id" : "doubao-embedding-vision-250615" ,
"name" : "Doubao Embedding Vision" ,
"type" : "Embedding" ,
feat: index and recall images with multimodal embedding models (#3683)
* feat(models): expose embedding input modalities
Whether an embedding model maps images into the same space as text is
what will decide if a knowledge base can store image vectors. The
catalog already had the field, but most multimodal embedding models
were missing it and embedding rows never reported it.
- Catalog: declare input modalities for the Doubao and Tongyi vision
embeddings, the Aliyun multimodal / qwen-vl embedding families and
jina-embeddings-v4, as listed in each vendor's documentation. The
migration baseline changes for exactly these nine entries.
- Model responses resolve capabilities for embedding rows too, so
capabilities.input reflects the catalog merged with spec.input.
- Model editor: an "Image input" switch for embedding models. It follows
the catalog and writes spec.input only when the row differs from it;
picking another catalog model or switching vendor drops the
declaration. Model cards show the image badge for such models.
* feat(embedding): embed images with multimodal embedding models
Adds the image side of an embedder, for models that map images into the
same space as their text vectors so a text query can find an image.
- api: EmbedImage (bytes + MIME type, sent inline as base64 because the
object store is usually unreachable from the vendor) and an
ImageEmbedder implemented by all four protocols, each in the image
shape its reference documents: Ark image_url, DashScope contents[].image,
Gemini inlineData parts, and on the OpenAI shape an object keyed by the
vendor's image_field (Jina: "image"). A plain OpenAI-compatible
endpoint names no image field and takes no images.
- Settings: image_field, max_image_batch_size (default one per request),
max_image_bytes and image_mime_types, filled from vendor docs for the
DashScope multimodal models, gemini-embedding-2 and Jina.
- embedding: an optional ImageEmbedder interface reached through
AsImageEmbedder, so existing Embedder implementations and fakes are
untouched. An embedder takes images only when the catalog (or the
row's spec.input) lists image AND the endpoint can carry one. Images
are checked against the documented limits before any request, then
split at the documented images per request. The concurrency, debug
and Langfuse decorators forward it; logs and traces carry the MIME
type and size, never the bytes.
The migration baseline changes only for the entries whose resolved
embedding settings now carry image limits.
* feat(knowledge): index images by their own vector and recall them
When the knowledge base's embedding model embeds images, each image now
gets a vector of its own next to its caption and OCR chunks, so a query
can find an image by what it shows even where the caption left it out.
Ingestion
- After the caption/OCR chunks are indexed, the multimodal task embeds
the image (embedding.PrepareImage converts and shrinks it to the
vendor's documented limits) and stores it as a new image_vector chunk:
Content is the caption (OCR text when there is none) for reranking and
the answer context; its index row carries the image's vector with
SourceType ImageSourceType. Scanned PDF pages are skipped, their OCR
text serves better. A failure here is logged and never fails the task.
- The image vector gets its own chunk rather than a second index row on
the caption chunk: OpenSearch and Weaviate key documents by ChunkID,
so a second row would overwrite the caption's text vector, and copy,
move and enable/disable all follow chunk IDs.
- CompositeRetrieveEngine.BatchIndexVectors writes precomputed vectors
through each engine's normal BatchIndex, keeping row order (the
composite's de-duplication does not).
- Paths that rebuild vectors from text leave image_vector alone:
syncChunkIndex only syncs its enabled flag, updateChunkVector skips
it, and a caption edit updates its Content only.
- The multimodal task's caption/OCR index rows now set IsEnabled; only
backends with a column default were storing them as enabled.
Retrieval
- A text query scores lower against an image than against text, so when
the model embeds images the document vector search is widened by half
(capped at 500) and run at min(VectorThreshold, 0.1); each store
group's hits are then held to their own threshold before score
normalization: text at VectorThreshold, images at min(VectorThreshold,
0.1). Keyword hits on image rows are dropped, their Content being the
already-indexed caption.
- image_vector hits are searchable and merge like caption hits: parent
context is attached, and the caption is not repeated from ImageInfo.
Adds golang.org/x/image for scaling and WebP/BMP decoding.
* fix(models): report no thinking levels for embedding, rerank and ASR models
Embedding rows now carry capabilities, and the end-to-end run showed them
listing off/auto/minimal/low/medium/high: these references resolve no chat
protocol, and an empty level map reads as "every level supported". A model
without a chat protocol does not think, so its capabilities say so.
* fix(compaction): never read a cancelled turn's stream as a summary
streamSummary selects on the turn's context and the provider stream at
once. When the turn is already cancelled both are ready (providers close
the stream once their context ends), and select picks at random, so a
stopped turn could come back as a completed, partial summary with a nil
error. TestSummarizationIsNotRetriedOnceTheTurnIsCancelled caught it
intermittently in CI and reproduces under -race with several -cpu values.
Check the context before each receive and again when the stream closes.
* feat(knowledge): put image vectors behind a knowledge-base switch, off by default
Image vector indexing and recall used to turn on whenever the knowledge
base's embedding model declared image input. A model that takes images is
often chosen for text alone, so an upgrade would have added an embedding
call per image, widened vector recall 1.5x and lowered the image threshold
to 0.1 for those knowledge bases without anyone asking.
ImageProcessingConfig gains image_vector_enabled (default false; stored
JSON without the key reads as off, so existing knowledge bases stay off
with no migration). Both sides now need the switch and the model:
- indexImageVector returns before touching the model unless the KB opted
in (KnowledgeBase.IsImageVectorEnabled, which also needs vector indexing).
- applyImageRecall resolves the embedding model only when some KB in the
search opted in, and records the opted-in KBs per store group
(storeGroup.ImageKBIDs). Only those groups widen the pool and lower the
threshold; image hits of any other KB, including ones indexed before the
switch was turned off, are dropped.
The KB editor shows the switch in the image processing section, with a
warning when the selected embedding model does not declare image input;
docs describe the switch, its cost and what turning it off does.
* fix(knowledge): leave image vectors behind when cloning into a KB that is off
CloneChunk copied every chunk of the source document and then CopyIndices
for all of them, so copying a document from a knowledge base with image
vectors on into one with the switch off (same model and store) still
created image_vector chunks and their index rows, bypassing the switch
that indexImageVector honours.
Image vector chunks are now dropped from the copy when the target has not
opted in. Every engine's CopyIndices copies only the rows of chunks in the
mapping, so their index rows stay behind too.
* fix(search): refill the vector pool past stale image vectors
Image hits of a knowledge base whose switch is off were dropped only after
the engine had ranked and cut its results at TopK. Image vectors indexed
before the switch was turned off could fill that pool and push out valid
text hits: with MatchCount 5 the pool is 50, and 50 stale image rows
ranked above the text left the search empty.
No engine can filter rows by source type (Postgres and SQLite do not even
take ExcludeChunkIDs), so the exclusion cannot move into the query. When
the document vector pool comes back full and holds stale image rows, that
search alone runs again on a pool twice as large, until it holds TopK rows
that are not stale, the index runs out, or the pool reaches
maxRetrievalPoolSize (at most four extra calls from a pool of 50). The pool
is then cut back to TopK such rows, matching an engine-side exclusion
unless more than maxRetrievalPoolSize-TopK stale rows rank above the text.
* feat(i18n): translate the image vector switch and image input keys into zh-TW
The zh-TW locale arrived from main after this branch added five keys: the
knowledge base's image vector switch (label, description, unsupported-model
warning) and the embedding model's image input flag (label, description).
* fix(knowledge): leave image vectors behind when moving into a KB that is off
A reuse_vectors move relocates a document's chunks and index rows in place:
MoveKnowledgeIndices rebinds the rows by document ID and
MoveChunksByKnowledgeID rebinds the chunks. Moving a document from a
knowledge base with image vectors on into one with the switch off therefore
carried its image_vector chunks and their vectors along, the same bypass the
clone path had.
When the target has not opted in, the image_vector chunks are now deleted
during the move, their index rows first and then the chunks, so a retry
finds the chunks again rather than leaving orphaned rows. A target that
opted in still receives them unchanged.
* fix(retriever): keep image vectors out of keyword-only engines
BatchIndexVectors handed image rows to every engine of the composite,
including one that serves keyword retrieval alone (Elasticsearch v7 next to
a vector store). There the row holds nothing but the image's caption, which
the caption's own chunk already indexes, and retrieval discards every
keyword hit on it.
Image rows now go only to engines that serve vector retrieval. An engine
that serves both keeps one row for both kinds, so its keyword search still
meets them; the search side handles that.
* fix(search): refill the keyword pool past image rows
Every engine that serves both kinds of retrieval stores one row per index
entry and runs its keyword search over that row's content, so an image
vector row, whose content is its caption, is a keyword hit wherever the
caption's own chunk is. filterImageHits drops all of them, but only after
the engine has cut its ranking at TopK, so they crowded out text and caption
hits; a keyword ranking that put the image rows first came back empty.
The keyword pool is now refilled the way the vector pool is refilled past
stale image vectors: when it came back full and held image rows, the
keyword search runs again on a pool twice as large, up to
maxRetrievalPoolSize, and is cut back to TopK hits that are kept.
Leaving the rows out of the keyword index instead would mean writing them
without searchable content (Milvus and Tencent VectorDB derive a BM25
sparse vector from it, and how they take an empty one is unverified) or a
source-type filter in every engine's keyword query (ten engines, and
filterable fields that existing collections lack).
* revert: let image vectors move with the document into a KB that is off
This reverts commit e259977fe915f7d0bc30c4b02bc7af04da1c8dd4.
Deleting the image vector index rows by chunk ID before the move is not
reliable: the Weaviate and Elasticsearch v8 delete wrappers ignore partial
failures, and OpenSearch rejects more than 1000 IDs with ErrBatchTooLarge.
A partial delete followed by the chunk delete leaves index rows whose chunks
are gone, which nothing ever cleans up.
Without it, the image_vector chunks and their index rows move together
with the document. While the target's switch is off they are filtered at
query time (the pool refill keeps them from crowding out text), they are
removed with the document on delete, reparse or knowledge base delete, both
chunks and index rows by knowledge ID, and they become active again if the
target turns the switch on. The clone path keeps dropping them, since there
the rows are copied rather than moved.
* fix(search): keep the image row refill from losing hits it already had
refillPool replaced a pool with the answer to each larger search. A refill
that answered only in part (RetrieveResult.Error, swallowed into a warning
by retainPartialResults, as when some collections of the store did not
answer) could hold fewer text rows than the complete smaller pool, or none:
40 stale image rows above 10 text came back from a partial refill as the
40 image rows alone, and the search lost all 10 text hits. A refill that
failed outright failed the whole store group, discarding a first round that
had succeeded.
A refill is now best effort. A failed or incomplete refill search stops
the refill and leaves the last complete pool in place, cut back to TopK
kept rows as before, so a refill can no longer leave a search worse off
than it was without it. Merging the partial answer into the pool was not
done: its rows would need deduplicating and its ranking is cut at a
different TopK over a different set of collections, while keeping the
previous pool is exact.
* docs(knowledge): say what happens to image vectors in a KB that is off and what the refill costs
The image vector section now says that with the switch off, image vectors
that were indexed before it was turned off, or that came along when the
document was moved in from a KB that has it on, are kept but filtered at
query time, are removed when the document is deleted or reparsed or the
KB is deleted, and are recalled again once the switch is turned on; a copy
into such a KB leaves them behind.
It also states the cost of keeping dropped image rows from crowding text
out of the pools: the vector and keyword pools are searched again with
TopK doubled up to the 500 candidate cap, which adds queries for store
groups that hold such rows, and text can still be missed when more than
about 500 candidates are image rows. A failed or partial refill keeps the
previous complete pool.
* fix(search): log unexpected refill result sets, and describe the refill stop condition precisely
2026-10-08 10:19:53 +00:00
"input" : [
"text" ,
"image" ,
"video"
] ,
2026-09-23 06:20:08 +00:00
"dimension" : 2048 ,
"source" : "https://docs.volcengine.com/docs/ark/multimodal-vectorization-api?lang=zh"
} ,
{
"id" : "doubao-seed-rerank" ,
"name" : "Doubao Seed Rerank" ,
"type" : "Rerank" ,
"source" : "https://www.volcengine.com/docs/84313/1254474"
} ,
{
"id" : "base-multilingual-rerank" ,
"name" : "Base Multilingual Rerank" ,
"type" : "Rerank" ,
"source" : "https://www.volcengine.com/docs/84313/1254474"
}
] ,
"weknoracloud" : [ ] ,
"zhipu" : [
{
"id" : "glm-5.3" ,
"name" : "GLM-5.3" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 1.4 ,
"output" : 4.4 ,
"cache_read" : 0.26
} ,
"source" : "https://docs.bigmodel.cn/cn/guide/models/text/glm-5.3" ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"low" : "low" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "glm-5.3-flash" ,
"name" : "GLM-5.3 Flash" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.075 ,
"output" : 0.25 ,
"cache_read" : 0.015
} ,
"source" : "https://docs.bigmodel.cn/cn/guide/models/vlm/glm-5.3-flash" ,
"thinking_levels" : {
"off" : null ,
"minimal" : "low" ,
"low" : "low" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "glm-5.2" ,
"name" : "GLM-5.2" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 1000000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 1.4 ,
"output" : 4.4 ,
"cache_read" : 0.26
} ,
"source" : "https://docs.bigmodel.cn/cn/guide/models/text/glm-5.2" ,
"thinking_levels" : {
"low" : "low" ,
"medium" : "high" ,
"high" : "high" ,
"xhigh" : "max" ,
"max" : "max"
}
} ,
{
"id" : "glm-5.1" ,
"name" : "GLM-5.1" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 200000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 1.4 ,
"output" : 4.4 ,
"cache_read" : 0.26
} ,
"source" : "https://docs.bigmodel.cn/api-reference/模型-api/对话补全" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "glm-5" ,
"name" : "GLM-5" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 204800 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 1 ,
"output" : 3.2 ,
"cache_read" : 0.2
} ,
"source" : "https://docs.bigmodel.cn/api-reference/模型-api/对话补全" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "glm-5v-turbo" ,
"name" : "GLM-5V Turbo" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 200000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 5 ,
"output" : 22 ,
"cache_read" : 1.2
} ,
"source" : "https://docs.bigmodel.cn/api-reference/模型-api/对话补全" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "glm-4.7" ,
"name" : "GLM-4.7" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 204800 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.6 ,
"output" : 2.2 ,
"cache_read" : 0.11
} ,
"source" : "https://docs.bigmodel.cn/api-reference/模型-api/对话补全" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "glm-4.7-flash" ,
"name" : "GLM-4.7 Flash" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 200000 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0 ,
"output" : 0
} ,
"source" : "https://docs.bigmodel.cn/api-reference/模型-api/对话补全" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "glm-4.6v" ,
"name" : "GLM-4.6V" ,
"reasoning" : true ,
"input" : [
"text" ,
"image" ,
"video"
] ,
"context_window" : 128000 ,
"max_output_tokens" : 32768 ,
"cost" : {
"input" : 0.3 ,
"output" : 0.9
} ,
"source" : "https://docs.bigmodel.cn/api-reference/模型-api/对话补全" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "glm-4.6" ,
"name" : "GLM-4.6" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 204800 ,
"max_output_tokens" : 131072 ,
"cost" : {
"input" : 0.6 ,
"output" : 2.2 ,
"cache_read" : 0.11
} ,
"source" : "https://docs.bigmodel.cn/api-reference/模型-api/对话补全" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "glm-4.5-air" ,
"name" : "GLM-4.5 Air" ,
"reasoning" : true ,
"input" : [
"text"
] ,
"context_window" : 131072 ,
"max_output_tokens" : 98304 ,
"cost" : {
"input" : 0.2 ,
"output" : 1.1 ,
"cache_read" : 0.03
} ,
"source" : "https://docs.bigmodel.cn/api-reference/模型-api/对话补全" ,
"compat" : {
"supports_reasoning_effort" : false
}
} ,
{
"id" : "embedding-3" ,
"name" : "Embedding-3" ,
"type" : "Embedding" ,
"dimension" : 2048 ,
"source" : "https://docs.bigmodel.cn/api-reference/模型-api/文本嵌入" ,
"compat" : {
"max_batch_size" : 64
}
} ,
{
"id" : "embedding-2" ,
"name" : "Embedding-2" ,
"type" : "Embedding" ,
"dimension" : 1024 ,
"source" : "https://docs.bigmodel.cn/api-reference/模型-api/文本嵌入" ,
"compat" : {
"dimensions_field" : ""
}
} ,
{
"id" : "rerank" ,
"name" : "Rerank" ,
"type" : "Rerank" ,
"source" : "https://docs.bigmodel.cn/api-reference/模型-api/文本重排序"
} ,
{
"id" : "glm-asr-2512" ,
"name" : "GLM-ASR-2512 (at most 30 s per file)" ,
"type" : "ASR" ,
"source" : "https://docs.bigmodel.cn/api-reference/模型-api/语音转文本"
}
]
}
}