Code refactoring: Import depth cleaning - #640
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the import architecture and AI provider integrations. Specifically, it flattens the eager import graph in app.py by moving blueprint imports and registrations into a local _register_blueprints function. Additionally, it consolidates the Ollama provider transport into the OpenAI-compatible transport (tasks/ai/providers/openai.py), removing the standalone ollama.py file and updating the corresponding unit tests and import architecture checks. Feedback on these changes includes a recommendation to defensively check that the Ollama tool call arguments are a dictionary to prevent potential AttributeError crashes, and a suggestion to move the module-level import of run_due_cron_jobs in app.py to a local scope to fully flatten the eager import graph.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|



This PR is a code refactoring to improve code maintainability by:
PR test builds:
ghcr.io/neptunehub/audiomuse-ai:pr-640ghcr.io/neptunehub/audiomuse-ai:pr-640-nvidiaghcr.io/neptunehub/audiomuse-ai:pr-640-noavx2