Add seedream tools - #483
Open
ikohu-66 wants to merge 3 commits into
Open
Conversation
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.
Summary
Add Seedream V5 image generation tool with comprehensive test suite and UTF-8 encoding fix
This PR introduces the Seedream V5 image generation tool via fal.ai API, featuring:
Why: Seedream V5 excels at generating images with accurate text rendering, structured designs, and dense layouts — capabilities missing from existing image generation tools.
Changes
🆕 New Files
tools/graphics/seedream_image.py(258 lines)square,square_hd,landscape_4_3,portrait_4_3,auto_1K,auto_2K, etc.)tests/tools/test_seedream_image.py(442 lines)Unit tests (262 lines): Fully mocked HTTP responses, <1s execution time
TestMultiOutputRegression: Ensures all requested images are returned (critical for billing accuracy)TestCostEstimation: Parameterized tests for all 8 size/quantity combinationsTestAsyncPolling: IN_PROGRESS → COMPLETED state transitionsTestValidation: Empty prompt, missing API key scenariosTestMetadata: Response data completeness validationIntegration tests (180 lines): Real API calls requiring
FAL_KEYTestSeedreamImageRealAPI: 8 real-world scenarios\xff\xd8, PNG header\x89PNG)FAL_KEYenvironment variable is not setTesting
✅ Platform Tested
✅ Edge Cases Tested
FAL_KEY→ Tool status = UNAVAILABLEauto_2KChecklist