test: migrate src.models bare imports + PROVIDERS/Metadata sub-imports to direct subsystems

Removed 18 unused 'from src import models' imports. Migrated the
explicit sub-imports:
- 'from src.models import PROVIDERS' -> 'from src.ai_client import PROVIDERS'
  (test_minimax_provider x2, test_deepseek_infra)
- 'from src.models import Metadata' -> 'from src.type_aliases import Metadata'
  (test_project_manager_tracks, test_track_state_persistence, test_track_state_schema)

Kept the 2 'import src.models as models' in test_provider_curation +
test_providers_source_of_truth (they verify the backward-compat shim
still re-exports PROVIDERS) and the 2 self-tests
(test_models_no_top_level_pydantic + test_models_no_top_level_tomli_w)
that exercise the shim's no-leak invariants.
This commit is contained in:
ed
2026-07-05 20:12:17 -04:00
parent bd6fc3e259
commit 6a3c142bfa
21 changed files with 56 additions and 27 deletions
-1
View File
@@ -1,7 +1,6 @@
import pytest
import os
from unittest.mock import MagicMock, patch
from src import models
from src.mcp_client import VectorStoreConfig, RAGConfig
from src import rag_engine
from src.rag_engine import RAGEngine, BaseEmbeddingProvider, LocalEmbeddingProvider, GeminiEmbeddingProvider