Skip to content

Fix/import#26

Merged
Iamsdt merged 5 commits intomainfrom
fix/import
Apr 6, 2026
Merged

Fix/import#26
Iamsdt merged 5 commits intomainfrom
fix/import

Conversation

@Iamsdt
Copy link
Copy Markdown
Collaborator

@Iamsdt Iamsdt commented Apr 6, 2026

This pull request makes significant changes to the codebase to improve modularity, update imports for a reorganized AgentFlow structure, and enhance configuration and error handling. The most important updates include refactoring imports to match the new AgentFlow package layout, cleaning up legacy compatibility code, updating configuration management (especially for JWT and media settings), and adding startup cleanup for temporary media cache entries.

Key changes:

1. AgentFlow Import Refactoring

  • Updated imports throughout the codebase to use the new agentflow.core, agentflow.storage, and related submodules instead of the old flat agentflow.* structure. This affects routers, services, schemas, and utility modules, ensuring compatibility with the reorganized AgentFlow library. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

2. Media Handling and Compatibility Cleanup

  • Removed the legacy media/_compat.py file and related aliasing logic, standardizing on DocumentHandling.FORWARD_RAW and updating all references accordingly. [1] [2] [3] [4]
  • Moved media utility modules from media/ to src/app/utils/media/, reflecting a clearer project structure. [1] [2]

3. Configuration and Settings Improvements

  • Added explicit JWT configuration fields (JWT_SECRET_KEY, JWT_ALGORITHM) to the main Settings class, and refactored JWT authentication code to use these settings instead of environment variables. [1] [2] [3] [4] [5]
  • Updated BaseSettings subclasses to use model_config = ConfigDict(extra="allow") for Pydantic v2 compatibility, replacing the old Config inner class. [1] [2]

4. Error Handling and Logging Enhancements

  • Added specific error handling for UnsupportedMediaInputError in the graph service, returning a 422 HTTP error with a clear message.
  • Improved logging setup in main.py and added a startup routine to clean up expired temporary media cache entries, with robust error handling and informative log messages. [1] [2] [3] [4]

5. Coverage and Testing Configuration

  • Updated .coveragerc to reflect the new agentflow_cli source directory, improved omit patterns, and added support for multiple source paths and better reporting of missing lines.

These changes collectively modernize the codebase, improve maintainability, and ensure compatibility with the latest AgentFlow and Pydantic versions.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@Iamsdt Iamsdt merged commit 7c28d55 into main Apr 6, 2026
2 checks passed
@Iamsdt Iamsdt deleted the fix/import branch April 6, 2026 17:06
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