-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Add UpscaleMode/upscale to image requests; add bytedance-seedreamv4 #68
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
Conversation
WalkthroughAdds a new UpscaleMode enum and optional upscale field to GenerateImageRequest and ProcessImageRequest. Extends TransformModel enum with bytedance-seedreamv4. All edits are additive in src/libs/Recraft/openapi.yaml and adjust request payload schemas. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant API as Recraft API
participant IMG as Image Service
Note over C,API: New optional "upscale" parameter (UpscaleMode)
C->>API: GenerateImageRequest / ProcessImageRequest<br/>[prompt/assets, transformModel, upscale?]
API->>IMG: Process image with parameters<br/>[transformModel, upscale?]
alt upscale provided
Note over IMG: Apply 4MP/16MP upscaling
else no upscale
Note over IMG: Standard processing
end
IMG-->>API: Processed image
API-->>C: Response payload
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
src/libs/Recraft/openapi.yaml (3)
465-466: Wrap $ref so descriptions/examples aren’t dropped by generatorsMany OAS generators ignore sibling fields on $ref. Wrap in allOf to safely attach docs and an example.
- upscale: - $ref: '#/components/schemas/UpscaleMode' + upscale: + allOf: + - $ref: '#/components/schemas/UpscaleMode' + description: Optional post‑generation upscaling mode; when omitted, no upscaling is applied. + example: upscale4mp
738-739: Clarify applicability to specific endpoints and wrap $refProcessImageRequest is used by ops like removeBackground/vectorize, which may ignore upscale. Document behavior and use allOf to preserve docs in SDKs.
- upscale: - $ref: '#/components/schemas/UpscaleMode' + upscale: + allOf: + - $ref: '#/components/schemas/UpscaleMode' + description: Optional upscaling; applied only by endpoints that support upscaling. Safe to include; ignored otherwise. + example: upscale16mp
888-891: Add schema‑level description and per‑value hintsExpose intent in SDKs and docs; optional x‑enum descriptions help clients choose wisely.
- UpscaleMode: - enum: + UpscaleMode: + description: Upscaling target for output images (approximate megapixel goals). + x-enumDescriptions: + - Upscale to roughly 4 MP; faster/cheaper. + - Upscale to roughly 16 MP; higher quality/cost. + enum: - upscale4mp - upscale16mp
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (18)
src/libs/Recraft/Generated/Recraft..JsonSerializerContext.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.IImageClient.CreativeUpscale.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.IImageClient.CrispUpscale.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.IImageClient.GenerateImage.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.IImageClient.RemoveBackground.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.IImageClient.VectorizeImage.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.ImageClient.CreativeUpscale.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.ImageClient.CrispUpscale.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.ImageClient.GenerateImage.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.ImageClient.RemoveBackground.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.ImageClient.VectorizeImage.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.JsonConverters.UpscaleMode.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.JsonConverters.UpscaleModeNullable.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.JsonSerializerContextTypes.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.Models.GenerateImageRequest.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.Models.ProcessImageRequest.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.Models.TransformModel.g.csis excluded by!**/generated/**src/libs/Recraft/Generated/Recraft.Models.UpscaleMode.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/Recraft/openapi.yaml(3 hunks)
🔇 Additional comments (1)
src/libs/Recraft/openapi.yaml (1)
886-887: New model value requires server‑side allowlists/mappingsopenapi.yaml and the generated client include "bytedance-seedreamv4", but no allowlist/whitelist/supported-models/feature-flag entries were found in the repo — confirm server-side enums, routing, and quota/feature flags accept "bytedance-seedreamv4" to avoid 400/500.
Locations:
- src/libs/Recraft/openapi.yaml (TransformModel enum — includes bytedance-seedreamv4)
- src/libs/Recraft/Generated/Recraft.Models.TransformModel.g.cs (ToValueString/ToEnum mappings include bytedance-seedreamv4)
Summary by CodeRabbit