feat(catalogs): derive the video generation operation - #105
Merged
Conversation
A provider that generates a video answers with a job rather than a video, so a consumer submits, polls, and collects. Nothing in the catalog named that route, and thirteen video-output offerings published no operation at all. Add ProviderOperationVideosGenerations and one entry in the media operation table. The derivation and the fact-consistency rule both read that table, so text in and video out with the video-gen tag now both publishes the operation and refuses a model that claims the tag without the modalities. Delete the hand-written video case in validateModelFactConsistency: the table rule requires an exact output set where the old case required only presence, so one statement now decides both what Starmap publishes and what it refuses. Also route the per-second price. DeepInfra reports one output_seconds field whatever the model produced, and the acquisition path recorded it under audio_gen unconditionally, so video_gen existed in the schema and was never populated. Key the field on the declared output modality, which is already normalized when pricing runs, and migrate the seven persisted model files that carry a price. The other six video models report none. Claude-Session: https://claude.ai/code/session_0131AtNgj1Qagv2csZGuxPFM
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
Thirteen video-output offerings in the shipped catalog published no operation at all. A consumer that wanted to generate a video had no route to call and no price field to read.
This change adds
videos-generationsto the provider operation vocabulary and one entry to the media operation table. The derivation and the fact-consistency rule both read that table, so text in and video out with thevideo-gentag now publishes the operation, and a model that claims the tag without the modalities fails validation.Why the hand-written case goes away
validateModelFactConsistencycarried avideo-gencase that required video output to be present. The table rule requires the output set to be exactly[video]and the input to containtext. The table rule is strictly stronger, so deleting the hand-written case loses nothing and keeps one statement per fact.The price was landing in the wrong field
DeepInfra reports one
output_secondsprice whatever the model produced, and the acquisition path recorded it underaudio_genunconditionally.video_genexisted in the schema and was never populated, so a consumer pricing a video job would have read an audio field.applyGeneratedSecondPricenow keys the field on the model's declared output modality. Modalities are normalized before pricing runs (applyProviderFeatures→normalizeOperationalModalities→applyProviderPricing), so the decision reads authoritative data. The seven persisted model files that carry a price move fromaudio_gentovideo_gen, so the shipped catalog is right today rather than after the next refresh. The other six video models report no price.Evidence
go test ./...make lintverify-catalog-dependency-direction.shverify-catalog-package-ownership.shverify-catalog-performance.shverify-go-file-sizes.shverify-package-layout.shverify-pure-go.shverify-consumer-deps.shverify-action-pins.shverify-provider-fixture-drift.shTestEveryPublishedMediaOperationMatchesItsDefinitioncross-checks the shipped catalog against the canonical table and now expects 13 offerings undervideos-generations.TestTheResidualOfferingsAreRealtimeAlonereplaces the video-and-realtime residual test: the residual is 3 realtime offerings and nothing else.TestAPerSecondPriceLandsUnderTheOperationTheOutputNamesholds the price routing, including the undeclared-output case that still falls to audio.The pinned consumer artifact digest moves to
f2110d24e0e54364f23a399decd1b518c2ada0602c517e03c57dd5b5a6a275f8because the catalog payload changed.https://claude.ai/code/session_0131AtNgj1Qagv2csZGuxPFM