Skip to content

tests: add unit tests for GeminiChatProvider with mocked client#3044

Merged
Salazareo merged 1 commit into
mainfrom
DS/2961
May 9, 2026
Merged

tests: add unit tests for GeminiChatProvider with mocked client#3044
Salazareo merged 1 commit into
mainfrom
DS/2961

Conversation

@Salazareo
Copy link
Copy Markdown
Member

Mocks the OpenAI SDK at the module boundary (Gemini speaks the OpenAI-compat dialect at the v1beta/openai endpoint), boots a real PuterServer for the wired MeteringService, and exercises construction, model catalog/resolution, request shape (max_completion_tokens rename, cache_control stripping, stream_options gating), non-stream + streaming output (cached-token splitting in the metered usage shape), error mapping, and moderation.

closes #2961

Mocks the OpenAI SDK at the module boundary (Gemini speaks the
OpenAI-compat dialect at the v1beta/openai endpoint), boots a real
PuterServer for the wired MeteringService, and exercises construction,
model catalog/resolution, request shape (max_completion_tokens rename,
cache_control stripping, stream_options gating), non-stream + streaming
output (cached-token splitting in the metered usage shape), error
mapping, and moderation.

closes #2961
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 39.74%
⬆️ +0.16%
7024 / 17674
🔵 Statements 38.9%
⬆️ +0.14%
7412 / 19051
🔵 Functions 42.59%
⬆️ +0.40%
1272 / 2986
🔵 Branches 28.67%
⬆️ +0.12%
4026 / 14040
File CoverageNo changed files found.
Generated in workflow #104 for commit f3485c8 by the Vitest Coverage Report Action

@Salazareo Salazareo merged commit 4bcfe6c into main May 9, 2026
4 checks passed
@Salazareo Salazareo deleted the DS/2961 branch May 10, 2026 21:29
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.

[Tests] Add unit tests for GeminiChatProvider with mocked client

1 participant