redis / redis/redis-vl-python

Improve provider-specific errors in vectorizer _set_model_dims()

Open
#485 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
427
Forks
101
Avg merge
6d 3h
Merged PRs (30d)
20

Description

Summary

Replace generic fallback exceptions in vectorizer _set_model_dims() with provider-specific, actionable errors.

Level: Beginner

Current State

  • Several vectorizer implementations catch broad Exception with TODO comments.
  • Resulting messages are vague and slow down troubleshooting.

Proposed Change

  • Update _set_model_dims() error handling in:
    • redisvl/utils/vectorize/text/openai.py
    • redisvl/utils/vectorize/text/cohere.py
    • redisvl/utils/vectorize/text/mistral.py
    • redisvl/utils/vectorize/text/azureopenai.py
    • redisvl/utils/vectorize/text/huggingface.py
    • redisvl/utils/vectorize/bedrock.py
    • redisvl/utils/vectorize/vertexai.py
    • redisvl/utils/vectorize/voyageai.py
  • Catch known provider/network/auth cases and include remediation hints.

Definition of Done

  • TODO fallback comments are removed.
  • Errors include provider/model context and useful next-step guidance.
  • Existing tests pass; add targeted tests where needed.

Out of Scope

  • Refactoring vectorizer architecture or retry policy behavior.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the _set_model_dims() implementations and TODO fallback paths in the eight listed provider files, then inspect the existing vectorizer tests before running them. Done means removing those TODO fallbacks, adding provider/model context and actionable guidance for known provider, network, and authentication cases, and keeping existing tests passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.