-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
🐼 feat: Add Flux Image Generation Tool #6147
Conversation
…ns in AgentClient
…ing, use theme selectors
🙌 Awesome, thanks Danny! |
Why having flux restricted to cloud based solution ? Could it be possible to have it for on prem ? Having the model name configurable would be great, we would be able to run schnell or dev version. Thanks anyway |
@menardorama The model name is configurable already. As for on-prem, you'd need to be more specific. Last I checked, the only way to run Flux locally was through Stable Diffusion or a similar tool, and Stable Diffusion is available through a plugin already. |
Well flux git repo tells you to run flux using tensorRT without any explanations. As we have spare A40 I wanted to selfhost directly the solution. If I see the env setting for API ENDPOINT, even if availables endpoints are listed, I don't understand how you can configure it.... |
@menardorama the endpoint and the base url are two different things. The endpoints are what you called model names: The base url is what allows you to change the server that the plugin hits. It looks like Danny made this configurable, so that adding I think you are on your own for figuring out how to get the Flux model working self-hosted, although Stable Diffusion isn't a bad place to start. |
Yes you're right, that was a bad shortcut.... I have already saw how to configure FLUX_API_BASE_UR in this PR but my point is that it seems there is no env variable for the endpoint (aka URI). |
The tool was only tested for the BFL API directly. No other APIs were tested. |
@menardorama the tool allows the LLM to choose the endpoint. See
As is currently implemented, the options are:
Just specify in your chat which one you would like to see used. |
Summary
Originally #5410
Thank you @leondape @jmaddington
• Implemented a new FluxAPI tool that supports both standard and finetuned image generation endpoints, including polling for results and local file saving.
• Updated .env.example and the manifest to include Flux configuration and proper authentication instructions.
• Integrated FluxAPI into the tool registry and updated the image generation configuration in the data provider.
Other changes
• Refactored the Image component by adding a className prop to enable customizable theme styling in Chat message attachments.
• Adjusted logging in AgentClient to warn on aborted operations for clearer error handling.
• Enhanced BaseClient tests to verify conversation persistence and removed an unused mock in FakeClient initialization for cleaner CI runs.
Change Type
Testing
I tested the Flux API integration by simulating calls with valid credentials and verifying the complete image generation flow, including result polling and file saving. I manually verified that images render correctly in chat messages with the new className prop and confirmed that the adjusted logging in AgentClient behaves as expected. All unit and integration tests passed locally.
Checklist