Skip to content

Conversation

@khoroshevskyi
Copy link
Member

Changes:

  • Fixed and updated vector search

TODO:

  • Update the version of pephub in the __version__.py file
  • Update the changelog

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR releases version 0.15.4 with significant updates to the vector search functionality, including updated dependency versions, refactored Qdrant integration, and improved search result handling.

Key changes:

  • Lowered search score threshold from 0.65/0.72 to 0.15 to return more permissive search results
  • Refactored Qdrant client initialization from dependency injection to singleton pattern with better error handling
  • Updated Python runtime from 3.10 to 3.13 and switched to uv for faster dependency installation
  • Enhanced namespace search results with additional metadata (project counts)

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
pephub/_version.py Version bumped from 0.15.3 to 0.15.4
web/package.json Frontend version updated to 0.15.4
web/src/hooks/queries/useSearch.ts Lowered default score threshold from 0.65 to 0.15 for more permissive search
web/src/components/search/search-results.tsx Added NamespaceHit type definition and enhanced display with project counts
pephub/const.py Updated default Qdrant score threshold to 0.15
pephub/routers/models.py Added SearchReturnModel using ScoredPoint for standardized search responses
pephub/routers/api/v1/search.py Refactored search endpoint to use query_points API and SearchReturnModel
pephub/dependencies.py Refactored Qdrant initialization from dependency to singleton with improved connection handling
requirements/requirements-all.txt Updated minimum versions for qdrant-client and fastembed; switched numpy from <2.0.0 to >2.0.0
deployment/dockerhub/primary.Dockerfile Updated Python base image to 3.13, added uv for dependency installation, updated authors
deployment/dockerhub/dev.Dockerfile Updated Python base image to 3.13, added uv for dependency installation
.github/workflows/deploy-api.yml Upgraded ECS deploy action from v1 to v2
.github/workflows/deploy-api-dev.yml Upgraded ECS deploy action from v1 to v2
Comments suppressed due to low confidence (1)

pephub/dependencies.py:101

  • Print statement may execute during import.
print(os.getenv("HF_MODEL", DEFAULT_HF_MODEL))

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

fastembed
numpy<2.0.0
fastembed>=0.7.4
numpy>2.0.0
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The constraint numpy>2.0.0 requires versions greater than 2.0.0, excluding 2.0.0 itself. This appears to be a significant change from the previous numpy<2.0.0 constraint. Verify that all dependent packages (especially fastembed and qdrant-client) are compatible with numpy 2.x, as this is a major version change with breaking changes.

Suggested change
numpy>2.0.0
numpy<2.0.0

Copilot uses AI. Check for mistakes.
)

# sentence_transformer model
print(os.getenv("HF_MODEL", DEFAULT_HF_MODEL))
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug print statement left in production code. This should be removed or converted to proper logging using _LOGGER_PEPHUB for consistency with the rest of the codebase.

Suggested change
print(os.getenv("HF_MODEL", DEFAULT_HF_MODEL))
_LOGGER_PEPHUB.info(f"Using HF_MODEL: {os.getenv('HF_MODEL', DEFAULT_HF_MODEL)}")

Copilot uses AI. Check for mistakes.
namespace_hits=namespaces,
limit=limit,
offset=offset,
total=len(vector_results),
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The total field is set to len(vector_results), which only reflects the number of results returned in this page (limited by limit parameter), not the total number of matching results. This could mislead clients about the actual total count of search results. Consider using a count query or a different approach to determine the true total count of matching results.

Copilot uses AI. Check for mistakes.
return (
<div className="text-muted d-flex flex-column align-items-center justify-content-center py-4">
<p className="mb-1">No namespaces found :(</p>
<p className="mb-1">No namespaces with current query, and offset(</p>
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar error in the message: should be "No namespaces found with current query and offset" instead of "No namespaces with current query, and offset(". The opening parenthesis at the end appears to be a typo.

Suggested change
<p className="mb-1">No namespaces with current query, and offset(</p>
<p className="mb-1">No namespaces found with current query and offset</p>

Copilot uses AI. Check for mistakes.
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 8, 2025

Deploying pephub-ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3334c50
Status: ✅  Deploy successful!
Preview URL: https://e616ef64.pephub.pages.dev
Branch Preview URL: https://dev.pephub.pages.dev

View logs

@khoroshevskyi khoroshevskyi merged commit 97d6b96 into master Dec 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants