Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🖼️ refactor: Enhance Env Extraction & Agent Image Handling #6131

Merged
merged 6 commits into from
Mar 1, 2025

Conversation

danny-avila
Copy link
Owner

Summary

I refactored the environment variable extraction logic and unit tests while enhancing agent-specific image handling for generated images in both Stable DiffusionAPI and DALL-E integrations.

  • Refactored StdioOptionsSchema to transform env variables using the new extractEnvVariable function from a dedicated utils module.
  • Moved environment extraction logic from parsers to utils to avoid circular dependencies and improve clarity.
  • Added comprehensive unit tests for env variable processing in mcp and data-provider, and removed deprecated tests.
  • Updated the backend review workflow to run unit tests for the librechat-mcp package.
  • Enhanced StableDiffusionAPI by adding agent-specific return values and a display message for generated images.
  • Improved DALL-E integration by incorporating proxy support for image fetching, adjusting logging placement, and updating agent image output format using nanoid.

Change Type:

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules

@danny-avila danny-avila merged commit 7f6b32f into main Mar 1, 2025
7 checks passed
@danny-avila danny-avila deleted the feat/image-gen branch March 1, 2025 12:51
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