Skip to content

v0.9.20.1: Embedding Model Selection & Auto-Detection

Latest

Choose a tag to compare

@maximilien maximilien released this 11 Feb 19:58

πŸš€ weave-mcp v0.9.20.1: Embedding Model Selection & Auto-Detection

This patch release completes Phase 0: OSS Embedding Support by adding embedding model selection and auto-detection features.

✨ New Features

1. create_collection - Embedding Model Selection

Now supports explicit embedding model selection:

{
  "tool": "create_collection",
  "arguments": {
    "name": "articles",
    "type": "text",
    "embedding_model": "sentence-transformers/all-mpnet-base-v2"
  }
}

Features:

  • New embedding_model parameter (preferred over legacy vectorizer)
  • Auto-detects dimensions from model registry for known models
  • Validates embedding models against the registry (16+ models)
  • Returns dimensions in response for transparency
  • Backward compatible with vectorizer parameter

Response includes:

{
  "name": "articles",
  "embedding_model": "sentence-transformers/all-mpnet-base-v2",
  "dimensions": 768,
  "status": "created"
}

2. query_documents - Auto-Detection

Query responses now include embedding model information:

{
  "results": [...],
  "count": 5,
  "collection": "articles",
  "query": "machine learning",
  "embedding_model": "sentence-transformers/all-mpnet-base-v2",
  "dimensions": 768
}

Benefits:

  • Know which embedding model is being used for queries
  • Verify model consistency across operations
  • Better debugging and transparency

3. count_documents - Embedding Info

Count responses now include embedding model details:

{
  "collection": "articles",
  "count": 1234,
  "embedding_model": "sentence-transformers/all-mpnet-base-v2",
  "dimensions": 768
}

🎯 Use Cases

Create collection with OSS model:

{
  "tool": "create_collection",
  "arguments": {
    "name": "docs",
    "type": "text",
    "embedding_model": "ollama/nomic-embed-text"
  }
}

Query and see which model is used:

{
  "tool": "query_documents",
  "arguments": {
    "collection": "docs",
    "query": "search terms"
  }
}
// Response includes: "embedding_model": "ollama/nomic-embed-text"

List available models:

{
  "tool": "list_embedding_models",
  "arguments": {}
}

πŸ”§ Technical Details

  • Model Registry Integration: Validates models against weave-cli's model registry
  • Auto-Dimension Detection: Automatically determines vector dimensions for known models
  • Backward Compatibility: Legacy vectorizer parameter still works
  • Error Handling: Gracefully handles unknown models with warnings

πŸ“¦ What's Included

All features from v0.9.20, plus:

  • βœ… Embedding model parameter in create_collection
  • βœ… Auto-detection in query_documents
  • βœ… Auto-detection in count_documents
  • βœ… Dimension information in responses
  • βœ… Model validation against registry

πŸ™ Credits

Built with weave-cli v0.9.20


πŸ€– Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com