qishibo/AnotherRedisDesktopManager · warning

Vector dimension must be ${this.dim}

Error message

Vector dimension must be ${this.dim}

What it means

The parsed vector's length differs from the vector-dim reported by VINFO for this set. Redis vector sets require every element's dimension to match the set's; the client blocks the mismatch before sending VADD (the server would otherwise reject it). The expected dim is interpolated into the message.

Source

Thrown at src/components/contents/KeyContentVector.vue:358

        }).catch((e) => {
          this.$message.error(e.message);
        });
      }
    },
    editLine() {
      const before = this.beforeEditItem;
      const element = (this.editLineItem.element || '').trim();
      const vector = this.parseVectorText(this.editLineItem.vectorText);
      const attrs = (this.editLineItem.attrs || '').trim();

      if (!element) {
        return this.$message.error('Element is required');
      }
      if (!vector || !vector.length) {
        return this.$message.error('Vector is required');
      }
      if (this.dim && vector.length !== this.dim) {
        return this.$message.error(`Vector dimension must be ${this.dim}`);
      }
      if (attrs && !this.$util.isJson(attrs)) {
        return this.$message.error('Attributes must be valid JSON');
      }

      this.editDialog = false;

      const vaddArgs = [this.redisKey, 'VALUES', vector.length, ...vector, element];
      // must match existing set quant-type, otherwise: ERR asked quantization mismatch
      const quantOpt = this.getQuantOption();
      quantOpt && vaddArgs.push(quantOpt);

      // set attributes
      attrs && vaddArgs.push('SETATTR', attrs);

      this.client.call('VADD', ...vaddArgs).then(() => {
        if (this.isEdit) {
          this.$message.success({ message: this.$t('message.modify_success'), duration: 1000 });

View on GitHub (pinned to c149855106)

Solutions

  1. Re-copy the full embedding and count components against the dim hint in the header
  2. Regenerate the embedding with the model whose dimension matches the set
  3. If the model changed permanently, create a new vector set with the new dimension
Defensive patterns

Strategy: validation

Validate before calling

const dim = Number(info['vector-dim']);
if (dim && vector.length !== dim) {
  return this.$message.error(`Vector has ${vector.length} components; set requires ${dim}`);
}

Type guard

const matchesDim = (vector, dim) => !dim || vector.length === dim;

Prevention

When it happens

Trigger: Pasting a 1536-dim embedding into a 768-dim set; dropping or adding one component when copying; switching embedding models without recreating the set.

Common situations: Model upgrades (e.g. text-embedding dims 384 -> 768); manual copy-paste truncation; mixing embeddings from two models in one key.

Related errors


AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22). Data as JSON: /api/errors/1019d9d2a5bfcb2e. Report an issue: GitHub.