Skip to content

[bot] Instrument fastembed (1,514,406 weekly downloads) #695

Description

@braintrust-bot
<!-- library-gap-audit: fastembed-py -->

Gap

fastembed (Qdrant's ONNX-based embeddings library) has no Braintrust instrumentation in this repo. It exposes a distinct top-level execution API — TextEmbedding, SparseTextEmbedding, ImageEmbedding, and LateInteractionTextEmbedding classes, each with an .embed() / .query_embed() / .rerank() method that runs local ONNX inference — and is one of the most widely used embeddings-execution libraries in the Python generative-AI ecosystem, especially in RAG pipelines.

This is distinct from the embeddings surfaces already instrumented in this repo (openai, cohere, google_genai, mistral, huggingface_hub, transformers) — fastembed has its own independent client/model API and does not route through any of those SDKs.

Weekly downloads: 1,514,406 (as of 2026-08-17; source: https://pypistats.org/api/packages/fastembed/recent)

Braintrust docs status: not_found — checked https://www.braintrust.dev/docs/integrations; FastEmbed/Qdrant embeddings are not listed among the supported integrations or SDK/provider grids. The page's only guidance for unlisted providers is to use the generic AI Proxy or request an integration.

Upstream sources:

Local repo files inspected (confirming no existing instrumentation):

  • py/src/braintrust/integrations/ (recursive listing) — no fastembed directory among adk, agentscope, agno, ai_sdk, anthropic, autogen, bedrock_runtime, claude_agent_sdk, cohere, crewai, cursor_sdk, dspy, google_genai, huggingface_hub, instructor, langchain, litellm, livekit_agents, llamaindex, mistral, openai, openai_agents, openrouter, pipecat, pydantic_ai, strands, temporal, transformers
  • py/src/braintrust/wrappers/*.py — no fastembed wrapper
  • py/pyproject.toml [tool.braintrust.matrix] and [tool.braintrust.vendor-packages] — no fastembed entry
  • py/noxfile.py — no fastembed test session
  • Repo-wide case-insensitive grep for fastembed — no matches outside this issue's own research

Suggested instrumentation: wrap TextEmbedding.embed() / .query_embed() (and the sparse/image/late-interaction variants) similarly to the existing embeddings-execution wrappers, capturing model name, input count/size, and output vectors/metadata as span data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions