Skip to content

feat(ApiService.test): add tests for Anthropic API client integration… #8211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

DeJeune
Copy link
Collaborator

@DeJeune DeJeune commented Jul 16, 2025

… and response handling

  • Introduced mock implementation for AnthropicAPIClient to simulate completions and response transformations.
  • Added test cases to validate the streaming of chunks with correct types and content for the Anthropic model.
  • Enhanced existing tests to ensure compatibility with both Gemini and Anthropic API clients.

What this PR does

添加测试用例

… and response handling

- Introduced mock implementation for AnthropicAPIClient to simulate completions and response transformations.
- Added test cases to validate the streaming of chunks with correct types and content for the Anthropic model.
- Enhanced existing tests to ensure compatibility with both Gemini and Anthropic API clients.
@DeJeune DeJeune marked this pull request as draft July 16, 2025 13:47
DeJeune added 4 commits July 17, 2025 02:59
…reaming support

- Added new test cases for streaming responses from the Anthropic API client, validating chunk types and content.
- Refactored existing tests to differentiate between non-streaming and streaming chunk generators.
- Updated mock implementations to support both streaming and non-streaming scenarios for comprehensive testing.
@DeJeune DeJeune marked this pull request as ready for review July 17, 2025 16:55
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.

1 participant