Skip to content

Refactor/fix archetecture mistakes - #31

Merged
vitchenkokir merged 4 commits into
mainfrom
refactor/fix-archetecture-mistakes
Aug 16, 2026
Merged

Refactor/fix archetecture mistakes#31
vitchenkokir merged 4 commits into
mainfrom
refactor/fix-archetecture-mistakes

Conversation

@vitchenkokir

Copy link
Copy Markdown
Collaborator

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

Testing

  • All existing tests pass (uv run pytest)
  • New tests added for new functionality
  • Manual testing performed

Checklist

  • Code follows the style guidelines (uv run ruff check, uv run ruff format, uv run mypy)
  • Self-review completed
  • Comments added for complex logic
  • Documentation updated (if needed)
  • No new warnings generated

Related Issues

Fixes #

Screenshots (if applicable)

Additional Notes

- Aggregate each feature's sub-routers behind a single package-level router
  (coding, interview, platform, question_voice, speech, theory) and mount
  them uniformly in app/main.py
- Refactor SpeechRuntimeCoordinator to delegate STT/TTS loading to dedicated
  backend abstractions (SttModelLoader, TtsEngine) under app/speech/domain
- Update gateways, transcriber resolver, tests, and docs accordingly
- Move the add-model flow (form validation, connection probe, catalog
  persistence, error handling) out of the config router into
  AddLLMModelUseCase under app/platform/use_cases
- Wire the use case through DI (AddLLMModelUseCaseDep) with the config and
  catalog services injected as dependencies
- Slim down the add_llm_model handler to transport and rendering only
- Fix dead mocks in config tests that patched LLMCatalogService via
  app.platform.api.config instead of the real app.platform.queries.config_form
…equired in probe

Pass NewLLMModel as a whole into AddLLMModelUseCase.execute instead of threading individual form fields, and fail the catalog probe early when a model requires an API key but none was provided.
Narrow request.app.state.speech_runtime via isinstance so the dependency returns SpeechRuntimeCoordinator instead of Any.
@vitchenkokir
vitchenkokir merged commit 15a400a into main Aug 16, 2026
1 check passed
@vitchenkokir
vitchenkokir deleted the refactor/fix-archetecture-mistakes branch August 16, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant