Repository navigation
Let an agent ask for a sprite sheet that keeps its background - #11
Merged
Merged
Conversation
The App and the public API accept options.background, but this server's schema set additionalProperties: false, so an agent could not send it and spriteCreditPrice could only quote the transparent tier. A kept-background sheet is a flat plain_frame_cents per frame with no tier, about half the transparent price, so quoting the tier also over-capped max_credits. A spelled-out background: "remove" is normalised off the wire, because the server fingerprints the options it receives and the default is what an omitted field already means; passing it through would split one job into two idempotency identities. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
What
options.backgroundis live in the App and the public API (GET /v1/capabilitiesnow advertisessprite_pricing.plain_frame_cents: 7), but this server could not pass it on: theoptionsschema setsadditionalProperties: false, sobackgroundwas rejected before it reached the gateway, andspriteCreditPriceonly knew the transparent tier.background: "remove" | "keep"in theoptionsschema and theManagedExecuteInputtype, with a description that says whatkeepcosts and when not to use it.spriteCreditPrice(frameCount, background):keepis a flat 7 cents a frame with no tier, so 12 frames quote 5.0 credits instead of 9.9. Quoting the tier for a kept sheet also over-cappedmax_credits.validateSpriteInputrejects an unknown value before any dispatch.background: "remove"is normalised off the wire. The server fingerprints the options it receives, andremoveis exactly what an absent field already means, so passing it through would split one job into two idempotency identities.dreamlayer_generate/dreamlayer_capabilitiesdescriptions now cover the mode, and mention that a frame that will not cut out is retried nearby and can ship with its background rather than failing the sheet.Verification
pnpm test67/67. The five price cases, the wire-normalisation case and the dispatch case were each confirmed to fail with the change reverted (6 failures), so they test the behaviour and not themselves.Not verified: no paid sprite job was run against a live provider.
🤖 Generated with Claude Code