mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
fix(tests): use unconditional skip for vertex/gemini token counting test
The parametrized test covers both gemini-2.5-pro (needs GEMINI_API_KEY) and vertex-ai-gemini-2.5-pro (needs VERTEX_AI_PRIVATE_KEY). A skipif on GEMINI_API_KEY alone was insufficient for the vertex variant. Switch to @pytest.mark.skip to guard both parametrizations consistently. Addresses Greptile review comment on PR #21669. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
174c17cec1
commit
ce59e6f00a
1 changed files with 2 additions and 3 deletions
|
|
@ -682,9 +682,8 @@ async def test_factory_registration():
|
|||
assert not counter.should_use_token_counting_api(custom_llm_provider=None)
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
not os.getenv("GEMINI_API_KEY") and not os.getenv("GOOGLE_API_KEY"),
|
||||
reason="Requires Google API credentials.",
|
||||
@pytest.mark.skip(
|
||||
reason="Requires Google/Vertex AI credentials (GEMINI_API_KEY or VERTEX_AI_PRIVATE_KEY)."
|
||||
)
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize("model_name", ["gemini-2.5-pro", "vertex-ai-gemini-2.5-pro"])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue