Repository navigation
feat: add MiniMax H3 image generation and editing APIs - #23
Merged
Merged
Conversation
Accept validated inline image references and route H3 requests through native MiniMax generation and editing APIs. Preserve provider usage separately from retail image billing, avoid automatic image retries, and include MiniMax in enclave egress.
Resolve GO-2026-6859 by using the patched Go toolchain in the module, CI, and Docker builds. Refresh the pinned enclave builder digest and documented minimum version.
Discover H3 token prices, validate its three usage dimensions, and return metering charge receipts with idempotent image results. Preserve fixed per-image models and reject missing or inconsistent token usage.
hcastc00
added a commit
that referenced
this pull request
Nov 11, 2026
Use MiniMax H3 for image generation and editing. Remove the legacy request translator, fixed-image pricing contract and unreachable generic image path; require validated token usage for every successful image request.
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.
Add paid image generation and reference-image editing through MiniMax H3, with validated provider token usage for retail billing and provider-cost accounting.
Behavior
POST /v1/images/generationsand JSONPOST /v1/images/edits; advertise supported image endpoints, three retail token rates and maximum charge in model discovery.nexus_billing, including account surcharge. Idempotent replays return the original result and receipt without charging again. Preserve fractional ceiling precision in discovery.api.minimax.ioin the measured enclave egress manifest on vsock port 8453.Validation
go test ./...passed, with additional tests for H3 generation without references, unsupported model rejection and required token pricing/ceiling.nitro_enclavecross-builds passed.Deployment and limits
Companion Nexus PR #157 contains H3-only migrations, billing, admin pricing and the user interface. Production remains at schema 33 with no image models/usage, so its unreleased migrations 034–037 omit legacy fields and seeds directly.
Deploy the gateway before activating H3. Deploy the companion services/UIs and migrations, enter verified provider costs and review retail prices before activation. Production enclave use needs a new enclave release and matching parent-proxy MiniMax route.
Idempotency is process-local: results are cached for 15 minutes within 256 MiB and keys for 24 hours. Evicted results are refused rather than regenerated, but restarts/multiple replicas lack durable deduplication. Disconnecting or stopping waiting does not cancel the provider operation. MiniMax may bill a failed/timed-out operation without a successful retail result. Prompt masking does not anonymize reference-image pixels.