Add image-gen module: Spring AI ImageModel options on the wire, a moderation gate, and safe storage of generated images in MinIO (sniffed content type, byte and pixel caps, server-chosen keys, capped URL fetcher); per-provider cost table dated 2026-10-28. ImageModel and ModerationModel are hand-written fakes; MinIO is real via Testcontainers; no image provider called.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7rnC7jppGGdHGESvy
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
# Spring AI 2.0.2 image classes (read from the jars)
|
||||
|
||||
interface : org.springframework.ai.image.ImageModel
|
||||
single method : [call]
|
||||
request : org.springframework.ai.image.ImagePrompt
|
||||
OpenAI : org.springframework.ai.openai.OpenAiImageModel
|
||||
Stability AI : org.springframework.ai.stabilityai.StabilityAiImageModel
|
||||
moderation interface : org.springframework.ai.moderation.ModerationModel
|
||||
moderation OpenAI : org.springframework.ai.openai.OpenAiModerationModel
|
||||
|
||||
portable ImageOptions getters : [getHeight, getModel, getN, getResponseFormat, getStyle, getWidth]
|
||||
OpenAiImageOptions getters : [getApiKey, getBaseUrl, getCredential, getCustomHeaders, getDeploymentName, getHeight, getMaxRetries, getMicrosoftDeploymentName, getMicrosoftFoundryServiceVersion, getModel, getN, getOrganizationId, getProxy, getQuality, getResponseFormat, getSize, getStyle, getTimeout, getUser, getWidth, isGitHubModels, isMicrosoftFoundry]
|
||||
StabilityAiImageOptions : [getCfgScale, getClipGuidancePreset, getHeight, getModel, getN, getResponseFormat, getSampler, getSeed, getSteps, getStyle, getStylePreset, getWidth]
|
||||
GoogleGenAiImageOptions : [getAspectRatio, getHeight, getImageSize, getLabels, getMaxOutputTokens, getModel, getN, getOutputCompressionQuality, getOutputMimeType, getPersonGeneration, getResponseFormat, getSafetyFilterLevel, getSeed, getStyle, getTemperature, getTopK, getTopP, getWidth]
|
||||
|
||||
OpenAiImageOptions.DEFAULT_IMAGE_MODEL = gpt-image-1-mini
|
||||
OpenAiModerationOptions.DEFAULT_MODERATION_MODEL = omni-moderation-latest
|
||||
OpenAiImageOptions has a getModeration() : false
|
||||
ModerationMessage getters : [getText] (text only, no media)
|
||||
Stability default engine / base URL : stable-diffusion-v1-6 @ https://api.stability.ai/v1
|
||||
GoogleGenAiImageModelName : [gemini-2.5-flash-image, gemini-3-pro-image, gemini-3.1-flash-image]
|
||||
Google SafetyFilterLevel : [BLOCK_LOW_AND_ABOVE, BLOCK_MEDIUM_AND_ABOVE, BLOCK_ONLY_HIGH, BLOCK_NONE, SAFETY_FILTER_LEVEL_UNSPECIFIED]
|
||||
Google PersonGeneration : [DONT_ALLOW, ALLOW_ADULT, ALLOW_ALL, PERSON_GENERATION_UNSPECIFIED]
|
||||
AbstractOpenAiOptions.DEFAULT_MAX_RETRIES (image options extend it) = 3
|
||||
portable builder gives : DefaultImageModelOptions
|
||||
Reference in New Issue
Block a user