Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion dev-tools/mcp-mock-server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from pathlib import Path
from typing import Any


# Global storage for captured headers (last request)
last_headers: dict[str, str] = {}
request_log: list = []
Expand Down
1 change: 0 additions & 1 deletion src/app/endpoints/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
from utils.types import TurnSummary, content_to_str
from authorization.azure_token_manager import AzureEntraIDManager


logger = logging.getLogger("app.endpoints.handlers")
router = APIRouter(tags=["query"])

Expand Down
1 change: 0 additions & 1 deletion src/quota/quota_limiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
from quota.connect_pg import connect_pg
from quota.connect_sqlite import connect_sqlite


logger = get_logger(__name__)


Expand Down
1 change: 0 additions & 1 deletion src/utils/mcp_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from configuration import AppConfig


logger = logging.getLogger("app.endpoints.dependencies")


Expand Down
1 change: 0 additions & 1 deletion tests/e2e/features/steps/llm_query_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from behave.runner import Context
from tests.e2e.utils.utils import replace_placeholders


DEFAULT_LLM_TIMEOUT = 60


Expand Down
1 change: 0 additions & 1 deletion tests/integration/endpoints/test_rlsapi_v1_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
from tests.unit.utils.auth_helpers import mock_authorization_resolvers
from utils.suid import check_suid


# ==========================================
# Shared Fixtures
# ==========================================
Expand Down
1 change: 0 additions & 1 deletion tests/unit/app/endpoints/test_a2a.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
from configuration import AppConfig
from models.config import Action


# User ID must be proper UUID
MOCK_AUTH = (
"00000001-0001-0001-0001-000000000001",
Expand Down
1 change: 0 additions & 1 deletion tests/unit/app/endpoints/test_streaming_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
from tests.unit.utils.auth_helpers import mock_authorization_resolvers
from utils.token_counter import TokenCounter


# Note: content_delta module doesn't exist in llama-stack-client 0.3.x
# These are mock classes for backward compatibility with Agent API tests
# pylint: disable=too-few-public-methods,redefined-builtin
Expand Down
1 change: 0 additions & 1 deletion tests/unit/authentication/test_api_key_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

"""Unit tests for functions defined in authentication/api_key_token.py"""


import pytest
from fastapi import HTTPException, Request
from pydantic import SecretStr
Expand Down
1 change: 0 additions & 1 deletion tests/unit/cache/test_postgres_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from cache.cache_error import CacheError
from cache.postgres_cache import PostgresCache


USER_ID_1 = suid.get_suid()
USER_ID_2 = suid.get_suid()
CONVERSATION_ID_1 = suid.get_suid()
Expand Down
1 change: 0 additions & 1 deletion tests/unit/models/rlsapi/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
RlsapiV1Terminal,
)


# ---------------------------------------------------------------------------
# Fixtures
# ---------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion tests/unit/models/rlsapi/test_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
)
from models.responses import AbstractSuccessfulResponse


# ---------------------------------------------------------------------------
# Fixtures
# ---------------------------------------------------------------------------
Expand Down
72 changes: 24 additions & 48 deletions tests/unit/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,7 @@ def test_load_proper_configuration(tmpdir: Path) -> None:
"""Test loading proper configuration from YAML file."""
cfg_filename = tmpdir / "config.yaml"
with open(cfg_filename, "w", encoding="utf-8") as fout:
fout.write(
"""
fout.write("""
name: foo bar baz
service:
host: localhost
Expand All @@ -268,8 +267,7 @@ def test_load_proper_configuration(tmpdir: Path) -> None:
user_data_collection:
feedback_enabled: false
mcp_servers: []
"""
)
""")

cfg = AppConfig()
cfg.load_configuration(str(cfg_filename))
Expand All @@ -283,8 +281,7 @@ def test_load_configuration_with_mcp_servers(tmpdir: Path) -> None:
"""Test loading configuration from YAML file with MCP servers."""
cfg_filename = tmpdir / "config.yaml"
with open(cfg_filename, "w", encoding="utf-8") as fout:
fout.write(
"""
fout.write("""
name: test service
service:
host: localhost
Expand All @@ -305,8 +302,7 @@ def test_load_configuration_with_mcp_servers(tmpdir: Path) -> None:
- name: git-server
provider_id: custom-git-provider
url: https://git.example.com/mcp
"""
)
""")

cfg = AppConfig()
cfg.load_configuration(str(cfg_filename))
Expand Down Expand Up @@ -447,8 +443,7 @@ def test_load_configuration_with_customization_system_prompt_path(tmpdir: Path)

cfg_filename = tmpdir / "config.yaml"
with open(cfg_filename, "w", encoding="utf-8") as fout:
fout.write(
f"""
fout.write(f"""
name: test service
service:
host: localhost
Expand All @@ -472,8 +467,7 @@ def test_load_configuration_with_customization_system_prompt_path(tmpdir: Path)
customization:
disable_query_system_prompt: true
system_prompt_path: {system_prompt_filename}
"""
)
""")

cfg = AppConfig()
cfg.load_configuration(str(cfg_filename))
Expand All @@ -487,8 +481,7 @@ def test_load_configuration_with_customization_system_prompt(tmpdir: Path) -> No
"""Test loading configuration from YAML file with system_prompt in the customization."""
cfg_filename = tmpdir / "config.yaml"
with open(cfg_filename, "w", encoding="utf-8") as fout:
fout.write(
"""
fout.write("""
name: test service
service:
host: localhost
Expand All @@ -512,8 +505,7 @@ def test_load_configuration_with_customization_system_prompt(tmpdir: Path) -> No
customization:
system_prompt: |-
this is system prompt in the customization section
"""
)
""")

cfg = AppConfig()
cfg.load_configuration(str(cfg_filename))
Expand All @@ -532,8 +524,7 @@ def test_configuration_with_profile_customization(tmpdir: Path) -> None:
expected_prompts = expected_profile.get_prompts()
cfg_filename = tmpdir / "config.yaml"
with open(cfg_filename, "w", encoding="utf-8") as fout:
fout.write(
"""
fout.write("""
name: test service
service:
host: localhost
Expand All @@ -550,8 +541,7 @@ def test_configuration_with_profile_customization(tmpdir: Path) -> None:
feedback_enabled: false
customization:
profile_path: tests/profiles/test/profile.py
"""
)
""")

cfg = AppConfig()
cfg.load_configuration(str(cfg_filename))
Expand All @@ -575,8 +565,7 @@ def test_configuration_with_all_customizations(tmpdir: Path) -> None:

cfg_filename = tmpdir / "config.yaml"
with open(cfg_filename, "w", encoding="utf-8") as fout:
fout.write(
f"""
fout.write(f"""
name: test service
service:
host: localhost
Expand All @@ -595,8 +584,7 @@ def test_configuration_with_all_customizations(tmpdir: Path) -> None:
profile_path: tests/profiles/test/profile.py
system_prompt: custom prompt
system_prompt_path: {system_prompt_filename}
"""
)
""")

cfg = AppConfig()
cfg.load_configuration(str(cfg_filename))
Expand All @@ -614,8 +602,7 @@ def test_configuration_with_sqlite_conversation_cache(tmpdir: Path) -> None:
"""Test loading configuration from YAML file with conversation cache configuration."""
cfg_filename = tmpdir / "config.yaml"
with open(cfg_filename, "w", encoding="utf-8") as fout:
fout.write(
"""
fout.write("""
name: test service
service:
host: localhost
Expand All @@ -634,8 +621,7 @@ def test_configuration_with_sqlite_conversation_cache(tmpdir: Path) -> None:
type: "sqlite"
sqlite:
db_path: ":memory:"
"""
)
""")

cfg = AppConfig()
cfg.load_configuration(str(cfg_filename))
Expand All @@ -653,8 +639,7 @@ def test_configuration_with_in_memory_conversation_cache(tmpdir: Path) -> None:
"""Test loading configuration from YAML file with conversation cache configuration."""
cfg_filename = tmpdir / "config.yaml"
with open(cfg_filename, "w", encoding="utf-8") as fout:
fout.write(
"""
fout.write("""
name: test service
service:
host: localhost
Expand All @@ -673,8 +658,7 @@ def test_configuration_with_in_memory_conversation_cache(tmpdir: Path) -> None:
type: "memory"
memory:
max_entries: 42
"""
)
""")

cfg = AppConfig()
cfg.load_configuration(str(cfg_filename))
Expand All @@ -692,8 +676,7 @@ def test_configuration_with_quota_handlers_no_storage(tmpdir: Path) -> None:
"""Test loading configuration from YAML file with quota handlers configuration."""
cfg_filename = tmpdir / "config.yaml"
with open(cfg_filename, "w", encoding="utf-8") as fout:
fout.write(
"""
fout.write("""
name: test service
service:
host: localhost
Expand Down Expand Up @@ -723,8 +706,7 @@ def test_configuration_with_quota_handlers_no_storage(tmpdir: Path) -> None:
scheduler:
# scheduler ticks in seconds
period: 1
"""
)
""")

cfg = AppConfig()
cfg.load_configuration(str(cfg_filename))
Expand All @@ -746,8 +728,7 @@ def test_configuration_with_quota_handlers(tmpdir: Path) -> None:
"""Test loading configuration from YAML file with quota handlers configuration."""
cfg_filename = tmpdir / "config.yaml"
with open(cfg_filename, "w", encoding="utf-8") as fout:
fout.write(
"""
fout.write("""
name: test service
service:
host: localhost
Expand Down Expand Up @@ -779,8 +760,7 @@ def test_configuration_with_quota_handlers(tmpdir: Path) -> None:
scheduler:
# scheduler ticks in seconds
period: 1
"""
)
""")

cfg = AppConfig()
cfg.load_configuration(str(cfg_filename))
Expand Down Expand Up @@ -813,8 +793,7 @@ def test_load_configuration_with_azure_entra_id(tmpdir: Path) -> None:
"""Return Azure Entra ID configuration when provided in configuration."""
cfg_filename = tmpdir / "config.yaml"
with open(cfg_filename, "w", encoding="utf-8") as fout:
fout.write(
"""
fout.write("""
name: test service
service:
host: localhost
Expand All @@ -833,8 +812,7 @@ def test_load_configuration_with_azure_entra_id(tmpdir: Path) -> None:
tenant_id: tenant
client_id: client
client_secret: secret
"""
)
""")

cfg = AppConfig()
cfg.load_configuration(str(cfg_filename))
Expand All @@ -850,8 +828,7 @@ def test_load_configuration_with_incomplete_azure_entra_id_raises(tmpdir: Path)
"""Raise error if Azure Entra ID block is incomplete in configuration."""
cfg_filename = tmpdir / "config.yaml"
with open(cfg_filename, "w", encoding="utf-8") as fout:
fout.write(
"""
fout.write("""
name: test service
service:
host: localhost
Expand All @@ -869,8 +846,7 @@ def test_load_configuration_with_incomplete_azure_entra_id_raises(tmpdir: Path)
azure_entra_id:
tenant_id: tenant
client_id: client
"""
)
""")

cfg = AppConfig()
with pytest.raises(ValidationError):
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_llama_stack_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
InferenceConfiguration,
)


# =============================================================================
# Test construct_vector_dbs_section
# =============================================================================
Expand Down
Loading