Skip to content

Conversation

@Mewyk
Copy link
Owner

@Mewyk Mewyk commented Jan 1, 2026

No description provided.

Copilot AI review requested due to automatic review settings January 1, 2026 17:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR represents a significant refactoring to improve API clarity and consistency in the CivitaiSharp SDK. The changes rename key builder classes and methods to better reflect their purpose, unify naming conventions across the codebase, and improve developer experience.

Summary: The PR renames TextToImageBuilder to ImageGenerationBuilder to support both text-to-image and image-to-image generation modes. Key method renamings include WithPromptWithPositivePrompt, WithCfgScaleWithConfigurationScale, WithSizeWithDimensions, and WithModelWithAir for better clarity. Properties in ImageMeta and ImageJobParams were also renamed to follow C# naming conventions. Additionally, the PR adds comprehensive webhook documentation and Discord community links.

Key Changes:

  • Renamed builder classes and methods for improved clarity and consistency (e.g., TextToImageBuilderImageGenerationBuilder, WithPromptWithPositivePrompt)
  • Moved image-to-image parameters (SourceImageUrl, DenoisingStrength) from ImageJobParams to ImageGenerationJobRequest level for better API design
  • Updated all documentation, examples, and tests to reflect new naming conventions

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
Tests/CivitaiSharp.Sdk.Tests/Request/ImageJobParamsBuilderTests.cs Updated test names and assertions to use new method and property names
Sdk/Services/ICoverageService.cs Improved parameter naming from models/model to airIdentifiers/air for clarity
Sdk/Services/CoverageService.cs Implemented parameter naming improvements and error message updates
Sdk/Request/JobsBuilder.cs Updated method name from CreateTextToImage() to CreateImage() with expanded documentation
Sdk/Request/ImageJobParamsBuilder.cs Renamed methods and properties, removed image-to-image specific parameters
Sdk/Request/ImageGenerationBuilder.cs Renamed class from TextToImageBuilder, added new image-to-image parameters
Sdk/Models/Jobs/ImageJobParams.cs Renamed properties with detailed remarks explaining JSON property mappings
Sdk/Models/Jobs/ImageGenerationJobRequest.cs Renamed class, added image-to-image parameters with documentation
Sdk/Models/Jobs/BatchJobRequest.cs Updated to use new ImageGenerationJobRequest type
Sdk/Json/SdkJsonContext.cs Updated JSON serialization context for renamed types
Sdk/Http/SdkJsonTypeResolver.cs Updated type resolver for renamed request type
README.md, README.ja.md, README.es-AR.md, NUGET.md Updated all examples and added Discord community links
Documentation/Guides/*.md Updated all guides with new API names and added webhook documentation
Core/Models/ImageMeta.cs Renamed properties for clarity with detailed remarks
CONTRIBUTING.md Updated example code to reflect new naming conventions
Comments suppressed due to low confidence (1)

Documentation/Guides/sdk-jobs.md:632

  • The example shows outdated property names in the manual construction. Line 630 uses Model but should be Air, and line 631 uses Prompt but should be PositivePrompt to match the actual API as shown in the ImageGenerationJobRequest and ImageJobParams classes.
var request = new ImageGenerationJobRequest
{
    Model = model,
    Params = new ImageJobParams { Prompt = "landscape" }
};

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Repository owner deleted a comment from Copilot AI Jan 1, 2026
Repository owner deleted a comment from Copilot AI Jan 1, 2026
Repository owner deleted a comment from Copilot AI Jan 1, 2026
Repository owner deleted a comment from Copilot AI Jan 1, 2026
Repository owner deleted a comment from Copilot AI Jan 1, 2026
Repository owner deleted a comment from Copilot AI Jan 1, 2026
Repository owner deleted a comment from Copilot AI Jan 1, 2026
Repository owner deleted a comment from Copilot AI Jan 1, 2026
Repository owner deleted a comment from Copilot AI Jan 1, 2026
Repository owner deleted a comment from Copilot AI Jan 1, 2026
@Mewyk Mewyk merged commit 1764bcf into alpha Jan 1, 2026
1 check passed
@Mewyk Mewyk deleted the development branch January 1, 2026 19:20
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.

2 participants