Conversation
Agent-Logs-Url: https://github.com/hoootan/flowforge/sessions/1cfc6501-ad98-42cd-b4d4-805a6959b14e Co-authored-by: hoootan <15173179+hoootan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix lint error in CI workflow
Fix AI service lint regression in CI by restoring top-level import order and lazy LiteLLM call path
Mar 30, 2026
There was a problem hiding this comment.
Pull request overview
Fixes a CI lint failure in the AI service by restoring top-level import ordering and ensuring LiteLLM calls consistently go through the module’s lazy-loader path.
Changes:
- Moves
get_settingsinto the module’s top-level import block to resolveE402(import not at top of file). - Replaces direct
litellm.acompletion(...)usage incomplete_streamwith_get_litellm().acompletion(...)to match the existing lazy-load/cache pattern.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
CI lint was failing in
server/src/flowforge_server/services/ai.pydue to a non-top-level import (E402) and a directlitellmreference that bypassed the file’s lazy-loader pattern. This PR applies a minimal correction to align the module with existing import/lazy-load conventions.Import ordering cleanup
get_settingsinto the module import block so all imports are defined at top level.Lazy-loaded LiteLLM usage consistency
litellm.acompletion(...)usage with_get_litellm().acompletion(...)instream_completion, matching the existing lazy import/cache mechanism used elsewhere in the file.Net effect