mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-20 06:19:51 +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:
co-authored by
Claude Sonnet 4.6
parent
174c17cec1
commit
ce59e6f00a
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user