Phase 4.5: Extract all remaining admin endpoints from orchestrator#572
Merged
Phase 4.5: Extract all remaining admin endpoints from orchestrator#572
Conversation
Phase 4.5 of orchestrator decomposition (Strangler Fig): Extract 17 unique endpoints into 3 new routers: - modules/speech/router_voices.py: voice selection + test (4 endpoints) - modules/llm/router_models.py: HuggingFace model management (10 endpoints) - modules/monitoring/router_logs.py: log viewing + SSE streaming (3 endpoints) Remove 35 dead duplicate endpoints that were shadowed by module routers: - 25 LLM endpoints (duplicated in modules/llm/router.py) - 6 monitoring endpoints (duplicated in modules/monitoring/router_monitor.py) - 6 services endpoints (duplicated in modules/speech/router_services.py) Also removed: 18 dead Pydantic models, get_current_tts_service() helper, and 16 unused imports (time, Dict, List, Depends, HTTPException, FileResponse, StreamingResponse, BaseModel, User, get_current_user, require_permission, PROVIDER_TYPES, async_audit_logger, get_model_manager, get_service_manager, get_system_monitor). Orchestrator: 2471 → 1121 lines (-1350, -55%) Zero inline @app endpoints remain — only startup/shutdown + static files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The final (and largest) step of orchestrator endpoint extraction. All 52 inline
@appendpoints removed.Extracted 17 unique endpoints into 3 new routers:
modules/speech/router_voices.py— voice selection + test (/admin/voices,/admin/voice,/admin/voice/test), 4 endpointsmodules/llm/router_models.py— HuggingFace model management (/admin/models/*), 10 endpointsmodules/monitoring/router_logs.py— log viewing + SSE streaming (/admin/logs/*), 3 endpointsRemoved 35 dead duplicate endpoints:
modules/llm/router.py)modules/monitoring/router_monitor.py)modules/speech/router_services.py)Also cleaned up:
get_current_tts_service()helper@appendpointsorchestrator.py now contains only: imports, middleware setup, router registration, global service variables, startup/shutdown lifecycle, and static file serving.
Test plan
ruff checkpasses on all changed filesruff format --checkpassespytest tests/— all 65 tests pass@app.get/post/put/deleteendpoints remain/admin/voicesreturns voice list/admin/models/listreturns models/admin/logsreturns log listCloses #550
🤖 Generated with Claude Code