Skip to content

Conversation

Pouyanpi
Copy link
Collaborator

@Pouyanpi Pouyanpi commented Oct 10, 2025

Added mock-based unit tests for external embedding providers (Cohere and OpenAI) to enable testing without API credentials.

To unblock merging:

#1305

and later:
#1304
#692

Add comprehensive mock-based unit tests for Cohere and OpenAI embedding
providers that run without requiring API credentials. Tests cover:

- Provider initialization with known/unknown models
- Sync and async encoding methods
- Custom parameters (input_type, api_key)
- ImportError handling
- All predefined model configurations

These tests complement existing live integration tests and enable
consistent
CI/CD testing without external API dependencies.
@Pouyanpi Pouyanpi requested a review from cparisien October 10, 2025 16:07
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link

@Copilot 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 adds comprehensive mock-based unit tests for external embedding providers (Cohere and OpenAI) to enable testing functionality without requiring API credentials.

  • Adds test coverage for both Cohere and OpenAI embedding model providers with complete mocking
  • Tests initialization, encoding operations, error handling, and version compatibility
  • Validates behavior for both known and unknown models with proper dimension detection

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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