Repository navigation
fix(skills): re-call partner_generate on a bounce only for the same product and shape - #50
Conversation
…roduct and shape Run a run_template the bounce names instead of re-calling, skip a same-provider suggestion that changes the product or shape (t2v for i2v/r2v/flf2v, sound effects for speech), and ask when the bounce lists several slugs or tiers with no clear match. Ports the narrower clauses the server's own routing bullet already carries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Starting review at 4128978. |
|
Approving at 4128978. Checked: read the six command changes against the base, the server's template redirects and tier guidance, and the bundled template names; nothing run. ~82k effective tokens for this review (229k raw; cache reads weighted 0.1x, cache writes 1.25-2x) |
ELI5
When an agent guesses the wrong name for a paid AI model, the service replies with a close match, and the agent was told to retry with it. That retry can quietly charge the user for a different kind of output than they asked for, like a text-only video when they gave a reference image, or sound effects when they wanted speech. This change tells the agent to retry only when the suggestion is really the same thing, to use the recommended template when the service names one, and to ask when several priced options are listed.
What
Rewrites the guess-and-bounce re-call sentence in the generate-audio/image/video slash commands (
claude-code/commands/) and their legacy copies (skills/) so apartner_generatere-call now requires all of these:run_template("served by the bundled template … Do not retry this slug"), run that template and don't re-call.-t2vsuggestion is not a retry for an-i2v/-r2v/-flf2vrequest, and a sound-effects slug is not a retry for speech. In those cases use the family's ownapi_*template (found withsearch_templates), or ask.params.modeltiers. Pick the one that matches the request. If none clearly does, ask (tiers are priced differently).params: {"model": "<tier>"}on the named slug. Say which slug or tier you switched to.The sentences that follow it are unchanged: the "bounces twice → unknown model" rule, the "ranked by token overlap … stop and ask" rule, and the
submit_batch"resend only the bounced item" rule.The MiniMax/Hailuo note in
skills/comfy-generate-video.mdnow re-calls the suggestedminimax/hailuo-03-t2vonly for a text-to-video request. For r2v/flf2v it points torun_templatewithapi_minimax_h3_r2v/api_minimax_h3_flf2v.This ports the two narrower clauses the MCP server's own routing instructions already carry ("unless the bounce names a run_template for the product", "several tiers listed → pick the one matching the user's request, or ask"). Prose only; no server change.
Why the wording is true
These are server bounce replies observed with an in-process probe of the server's unknown-model message builder:
minimax/hailuo-03-r2v/-flf2v/-i2v→Did you mean: minimax/hailuo-03-t2v?(same provider, different shape).kling/kling-v3-i2v→Did you mean: kling/kling-v3-t2v, kling/kling-3.0-turbo-t2v?elevenlabs/eleven_v3→Did you mean: elevenlabs/sound-generation?(speech → sound effects).elevenlabs/text-to-speech→ namesrun_template({ name: "api_elevenlabs_text_to_speech" })plus "Do not retry this slug".xai/grok-imagine-image-quality/vertexai/nano-banana→ several slugs and/or a tier menu.I checked the quoted phrases ("is served by the bundled template", "Do not retry this slug", "Did you mean:") against the server source on its current main. All three
api_*template ids above are in the server's bundled template catalog.Testing
diffof skills line 5 against commands line 9 is empty for audio and image.git diff --statshows one changed line per file, and two inskills/comfy-generate-video.md(the Step 0 line plus the MiniMax bullet).claude plugin validate ./claude-code: passed.provider prefix,still a `minimax/`) outside the edited files finds nothing.Judgment calls
main. The legacyskills/comfy-generate-video.mdStep 0 bullet uses different surrounding prose ("so guessing costs one call — re-call once with the named slug …"). I swapped in the same new clause in both files, kept the surrounding text, and did not force the two lines into alignment. Aligning them would rewrite unrelated legacy prose. The new clause is byte-identical in all six files.skills/copy.claude-code/commands/generate-video.mdhas no "re-call with that slug if it is still aminimax/one" sentence (its MiniMax notes are structured differently), so there was nothing to patch there.params.model.Provenance
main(with fix(generate-video): retire the Sora routing example, add a retired-family redirect #32's video-routing changes); both video files keep fix(generate-video): retire the Sora routing example, add a retired-family redirect #32's new partner-bullet scope, OSS-only bullet and Retired paragraph alongside this clausepartner_generate/search_templatescall against Comfy Cloudmain; see Judgment calls)skills/, because the commands file has no equivalent sentenceResidual
claude-code/skills/generate-{audio,image,video}/SKILL.md, which carry the older "Re-call once, and only when a suggestion keeps the provider prefix of the slug you guessed" sentence. It has not merged, so those three files are not in this PR. Whichever lands second should port this same clause into them.partner_generate,search_templatesorrun_templatecalls). It is grounded in the server source and the recorded bounce replies above.data/skills.jsonregenerates fromskills/on its scheduled refresh. It was deliberately not edited by hand.