From 5e09b3ffcbd59836632cb3839492c691b86ed3d4 Mon Sep 17 00:00:00 2001 From: privatedeskai Date: Wed, 2 Sep 2026 14:26:34 -0700 Subject: [PATCH] fix(providers): fix the 3 CI checks still failing on SAGG PR lint: the real cause was never F401 (that step already passed) - it was scripts/test_quality_gate.py's TQ003 rule, which flags sys.path.insert as unnecessary since pytest's rootdir handling and the installed package already make litellm importable. Removed it along with the now-unneeded os/sys imports and the __main__ block that depended on it, matching test_scx_ai_provider.py's cleaner convention. Confirmed directly: scripts/check_test_quality.py now reports 0 violations on this file (it still reports 2 on test_xiaomi_mimo.py, the template this was built from - grandfathered only because it predates the gate). code-quality: check_provider_folders_documented.py requires every litellm/llms/openai_like/providers.json entry to have a matching entry in provider_endpoints_support.json. sagg had none. Added one, chat_completions only (the only endpoint actually verified in this PR's own proof of fix) - confirmed the check now passes, and fails again with the exact expected error when the entry is removed. osv-scan: not caused by this PR. Zero dependency/lockfile files are touched anywhere in this diff. Cross-checked two other open, unrelated PRs against the same base branch: one also failed osv-scan in the same time window this PR's check ran, the other two (scanned ~4.5 hours later) both passed - a transient, time-bound, repo-wide/base-branch issue, not something this PR introduced or can fix. --- provider_endpoints_support.json | 16 ++++++++ .../llms/openai_like/test_sagg_provider.py | 37 ------------------- 2 files changed, 16 insertions(+), 37 deletions(-) diff --git a/provider_endpoints_support.json b/provider_endpoints_support.json index 7c7d508856f..feb10c8622e 100644 --- a/provider_endpoints_support.json +++ b/provider_endpoints_support.json @@ -2191,6 +2191,22 @@ "interactions": true } }, + "sagg": { + "display_name": "SAGG (`sagg`)", + "url": "https://docs.litellm.ai/docs/providers/sagg", + "endpoints": { + "chat_completions": true, + "messages": false, + "responses": false, + "embeddings": false, + "image_generations": false, + "audio_transcriptions": false, + "audio_speech": false, + "moderations": false, + "batches": false, + "rerank": false + } + }, "searxng": { "display_name": "SearXNG (`searxng`)", "url": "https://docs.litellm.ai/docs/search/searxng", diff --git a/tests/test_litellm/llms/openai_like/test_sagg_provider.py b/tests/test_litellm/llms/openai_like/test_sagg_provider.py index 7eef238c02b..da76601da56 100644 --- a/tests/test_litellm/llms/openai_like/test_sagg_provider.py +++ b/tests/test_litellm/llms/openai_like/test_sagg_provider.py @@ -5,13 +5,6 @@ SAGG (https://api.privatedeskai.com) is an OpenAI-compatible LLM inference gateway with automatic multi-provider failover. """ -import os -import sys - -# Add workspace to path -workspace_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../..")) -sys.path.insert(0, workspace_path) - import litellm @@ -91,33 +84,3 @@ class TestSaggProviderConfig: assert result["max_tokens"] == 100 assert "max_completion_tokens" not in result assert result["temperature"] == 0.7 - - -if __name__ == "__main__": - print("Testing SAGG Provider...") - - test_config = TestSaggProviderConfig() - - print("\n1. Testing provider in list...") - test_config.test_sagg_in_provider_list() - print(" ✓ sagg in provider list") - - print("\n2. Testing JSON config...") - test_config.test_sagg_json_config_exists() - print(" ✓ sagg JSON config loaded") - - print("\n3. Testing provider resolution...") - test_config.test_sagg_provider_resolution() - print(" ✓ Provider resolution works") - - print("\n4. Testing router configuration...") - test_config.test_sagg_router_config() - print(" ✓ Router configuration works") - - print("\n5. Testing parameter mapping...") - test_config.test_sagg_parameter_mapping() - print(" ✓ Parameter mapping works") - - print("\n" + "=" * 50) - print("✓ All configuration tests passed!") - print("=" * 50)