style: apply ruff auto-fix

- Auto-formatted code with ruff format
- Applied ruff linting fixes with --fix

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2026-02-23 20:23:06 +00:00
parent 044da0ff47
commit 724d7d870f
3 changed files with 14 additions and 4 deletions
+2 -2
View File
@@ -38,8 +38,8 @@ class Settings(BaseSettings):
# Portkey AI gateway settings (used when ai_provider="portkey")
# See https://portkey.ai for setup instructions
portkey_api_key: Optional[str] = None
portkey_virtual_key: Optional[str] = None # Routes to a specific provider via Portkey vault
portkey_config: Optional[str] = None # Portkey Config ID for advanced routing rules
portkey_virtual_key: Optional[str] = None # Routes to a specific provider via Portkey vault
portkey_config: Optional[str] = None # Portkey Config ID for advanced routing rules
portkey_base_url: str = "https://api.portkey.ai/v1"
# Azure OpenAI API version (used when ai_provider="azure")
+12 -1
View File
@@ -19,11 +19,11 @@ from app.utils.ai_provider import (
get_ai_provider,
)
# ---------------------------------------------------------------------------
# Helpers
# ---------------------------------------------------------------------------
def _make_openai_response(content: str) -> MagicMock:
"""Build a minimal mock that looks like an openai ChatCompletion response."""
msg = SimpleNamespace(content=content)
@@ -55,6 +55,7 @@ def _make_none_content_response() -> MagicMock:
# _require_text_content helper
# ---------------------------------------------------------------------------
@pytest.mark.unit
class TestRequireTextContent:
"""Tests for the _require_text_content guard helper."""
@@ -77,6 +78,7 @@ class TestRequireTextContent:
# Abstract base class
# ---------------------------------------------------------------------------
@pytest.mark.unit
class TestAIProviderABC:
"""Verify that AIProvider cannot be instantiated directly."""
@@ -100,6 +102,7 @@ class TestAIProviderABC:
# OpenAIProvider
# ---------------------------------------------------------------------------
@pytest.mark.unit
class TestOpenAIProvider:
"""Tests for OpenAIProvider."""
@@ -181,6 +184,7 @@ class TestOpenAIProvider:
# AzureOpenAIProvider
# ---------------------------------------------------------------------------
@pytest.mark.unit
class TestAzureOpenAIProvider:
"""Tests for AzureOpenAIProvider."""
@@ -222,6 +226,7 @@ class TestAzureOpenAIProvider:
# AnthropicProvider
# ---------------------------------------------------------------------------
@pytest.mark.unit
class TestAnthropicProvider:
"""Tests for AnthropicProvider."""
@@ -274,6 +279,7 @@ class TestAnthropicProvider:
# GeminiProvider
# ---------------------------------------------------------------------------
@pytest.mark.unit
class TestGeminiProvider:
"""Tests for GeminiProvider."""
@@ -312,6 +318,7 @@ class TestGeminiProvider:
# OllamaProvider
# ---------------------------------------------------------------------------
@pytest.mark.unit
class TestOllamaProvider:
"""Tests for OllamaProvider."""
@@ -361,6 +368,7 @@ class TestOllamaProvider:
# OpenRouterProvider
# ---------------------------------------------------------------------------
@pytest.mark.unit
class TestOpenRouterProvider:
"""Tests for OpenRouterProvider."""
@@ -394,6 +402,7 @@ class TestOpenRouterProvider:
# PortkeyProvider
# ---------------------------------------------------------------------------
@pytest.mark.unit
class TestPortkeyProvider:
"""Tests for PortkeyProvider."""
@@ -485,6 +494,7 @@ class TestPortkeyProvider:
# LiteLLMProvider
# ---------------------------------------------------------------------------
@pytest.mark.unit
class TestLiteLLMProvider:
"""Tests for LiteLLMProvider."""
@@ -566,6 +576,7 @@ class TestLiteLLMProvider:
# get_ai_provider factory function
# ---------------------------------------------------------------------------
@pytest.mark.unit
class TestGetAIProvider:
"""Tests for the get_ai_provider factory function."""
-1
View File
@@ -12,7 +12,6 @@ from app.tasks.check_credentials import (
get_failure_state,
save_failure_state,
sync_test_azure_connection,
sync_test_ai_provider_connection,
sync_test_openai_connection,
unwrap_decorated_function,
)