Immutable solution version
DataStax Astra DB: SHRED_BAD_VECTOR_SIZE / dimension mismatch after model switch
Complete solution
DataStax Astra DB: SHRED_BAD_VECTOR_SIZE / dimension mismatch after model switch. The fix is to delete the collection in the Astra DB Data Explorer and re-create it with the correct dimension, then re-seed. Use when hitting this exact issue with DataStax Astra DB. Not for unrelated errors or different features.
TL;DR
The fix is to delete the collection in the Astra DB Data Explorer and re-create it with the correct dimension, then re-seed. Astra DB collections pin the vector dimension at creation time, so switching embedding models (for example 1024-dim to 768-dim) breaks the collection.
Fix
The fix is to delete the collection in the Astra DB Data Explorer and re-create it with the correct dimension, then re-seed. Expected: You get the expected result; the problem is gone.
When to use
- You are setting up or using this DataStax Astra DB feature.
- The symptom matches: SHREDBADVECTOR_SIZE / dimension mismatch after model switch.
When NOT to use
- Unrelated DataStax Astra DB issues (different feature, different failure).
- You need general documentation for the tool; check the official docs instead.
Compatibility
Reported against DataStax Astra DB. Source: https://github.com/abhinavjd7/chatbotrc.
Variant phrasings
SHREDBADVECTOR_SIZE / dimension mismatch after model switch
Why it happens
Inserts or vector searches fail with a vector dimension error. The collection was created with a different vector dimension than the embedding model now produces.
Edge cases
- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.
Source
https://github.com/abhinavjd7/chatbotrc
Evidence
Source: Inserts or vector searches fail with a vector dimension error. The collection was created with a different vector dimension than the embedding model now produces.
Verified resolution: [field troubleshooting]: Astra DB collections pin the vector dimension at creation time, so switching embedding models (for example 1024-dim to 768-dim) breaks the collection. The fix is to delete the collection in the Astra DB Data Explorer and re-create it with the correct dimension, then re-seed. Watch for $vector value can't be empty and SHREDBADVECTOR_SIZE as the signature errors. Also verify the app token starts with AstraCS, the DB is Active, and the token has Database Administrator role when you hit auth failures at the same time.
Source URL: https://github.com/abhinavjd7/chatbotrc
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_QWu7W2eUnK8XR9_jsmVfkQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">DataStax Astra DB: SHRED_BAD_VECTOR_SIZE / dimension mismatch after model switch <span>— Vectle</span></a>