feat(system): S68 bonus: commons datetime deprecation fix + HERALD update (#163)
* feat(system): STATUS.md update Co-Authored-By: @devpulse <devpulse@aipass> * feat(system): S68 night shift: test log isolation + audit fixes (zero scanner output) Co-Authored-By: @devpulse <devpulse@aipass> * feat(system): S68 bonus: commons datetime deprecation fix + HERALD update Co-Authored-By: @devpulse <devpulse@aipass> --------- Co-authored-by: @devpulse <devpulse@aipass>
This commit is contained in:
@@ -48,6 +48,7 @@ GENERATION_ENDPOINT = f"{OPENROUTER_BASE_URL}/generation"
|
||||
|
||||
# Default configuration values
|
||||
DEFAULT_GENERATION_CHECK_DELAY = 2 # seconds to wait before querying metrics
|
||||
DEFAULT_REQUEST_TIMEOUT = 30 # seconds for HTTP request timeout
|
||||
|
||||
|
||||
# =============================================
|
||||
@@ -148,7 +149,7 @@ def get_generation_metrics(generation_id: str, api_key: str) -> Optional[Dict[st
|
||||
GENERATION_ENDPOINT,
|
||||
params={"id": generation_id},
|
||||
headers=headers,
|
||||
timeout=30
|
||||
timeout=DEFAULT_REQUEST_TIMEOUT
|
||||
)
|
||||
|
||||
# Check response status
|
||||
|
||||
@@ -140,10 +140,13 @@ def validate_key(args: List[str]):
|
||||
|
||||
def list_providers():
|
||||
"""Orchestrate list providers workflow"""
|
||||
from aipass.api.apps.handlers.config.provider import PROVIDER_DEFAULTS
|
||||
|
||||
header("Available Providers")
|
||||
console.print()
|
||||
|
||||
console.print(" - openrouter")
|
||||
for provider_name in sorted(PROVIDER_DEFAULTS):
|
||||
console.print(f" - {provider_name}")
|
||||
console.print()
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,14 @@
|
||||
# =============================================
|
||||
|
||||
"""Shared pytest fixtures for api tests"""
|
||||
import os
|
||||
import tempfile
|
||||
|
||||
# Redirect prax logs to temp directory during tests
|
||||
# Must be set before any prax imports to catch logger initialization
|
||||
if "AIPASS_TEST_LOG_DIR" not in os.environ:
|
||||
os.environ["AIPASS_TEST_LOG_DIR"] = tempfile.mkdtemp(prefix="aipass_test_logs_")
|
||||
|
||||
import importlib
|
||||
import logging
|
||||
import sys
|
||||
|
||||
Reference in New Issue
Block a user