HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.
Python agent-apiagent-frameworkagent-harnessai-agentsai-infrastructurecoding-agentconformance-testingdeepseek-harnessharness-engineeringhermesllmopen-protocolopen-sourceopen-standardpi-coding-agentself-hosteduhpunified-apiunified-harness-protocolunified-interface
fix(media): seedance renders at the tier it was measured at, not a computed frame
richard-epsilladad819a4a405
diff --git a/gateway/media_catalog.json b/gateway/media_catalog.jsonindex 70493e2a..5533bcc7 100644--- a/gateway/media_catalog.json+++ b/gateway/media_catalog.json@@ -52,8 +52,7 @@"shape": "vercel-video","params": ["prompt",- "duration",- "size"+ "duration"],"in": ["text"@@ -66,7 +65,7 @@"duration_observed_s": 5.056,"latency_s": 116.0,"usd": 0.5182759,- "measured": "verified e2e 2026-08-16 against the live gateway on the Future HR key: asked for 5 s at 480p and got back a presigned url to a 3,617,186 byte mp4, 854x480, h264 with an aac track it was not asked for. It HONOURS duration (5 asked, 5.056 delivered), unlike the tokenrouter seedance entry. Cost is the gateway's own number from providerMetadata.gateway.cost, not an estimate: $0.5182759 for those 48,437 completion tokens. Took 116 s inside the submit, so it is synchronous and never enters the poll walk.",+ "measured": "verified e2e 2026-08-16 against the live gateway on the Future HR key: asked for 5 s at 480p and got back a presigned url to a 3,617,186 byte mp4, 854x480, h264 with an aac track it was not asked for. It HONOURS duration (5 asked, 5.056 delivered), unlike the tokenrouter seedance entry. Cost is the gateway's own number from providerMetadata.gateway.cost, not an estimate: $0.5182759 for those 48,437 completion tokens. Took 116 s inside the submit, so it is synchronous and never enters the poll walk. It takes a NAMED resolution tier, not WxH, and seedance-2.5 publishes only 480p and 720p. Declaring `size` as a tunable let the chain compute an arithmetic frame for the asked aspect (896x504 for 16:9 off this entry's own numbers), which the provider refused outright \u2014 the first live run through the kit fell back to the relay because of it. Nothing was billed: a refusal is free. `size` is therefore NOT a tunable here; the shape is fixed at the one tier that was verified, and a request for another aspect skips this candidate with a reason rather than being silently reframed.","verification": "verified"},{diff --git a/gateway/media_plane.py b/gateway/media_plane.pyindex 4a105324..fd9a4883 100644--- a/gateway/media_plane.py+++ b/gateway/media_plane.py@@ -714,10 +714,18 @@ def build_submit(cand: dict, base_url: str, params: dict) -> Submit:secs = take("duration", params.get("seconds"))if secs is not None:body["duration"] = int(secs) if float(secs).is_integer() else float(secs)- size = take("size", asked_size)- if size is not None:- # This endpoint takes a named resolution, not WxH: 854x480 came back for "480p".- body["resolution"] = _VERCEL_RES.get(size, size)+ # The tier is this candidate's OWN verified resolution, not the caller's frame. This+ # endpoint accepts named tiers ("480p") and refuses a WxH, and each model publishes+ # only some of them — so a size computed for an aspect arrives as a frame the provider+ # has never heard of. A candidate that takes no `size` tunable therefore renders at+ # exactly the tier it was measured at, and one asked for a shape it cannot hold is+ # skipped upstream by can_serve rather than reframed here.+ tier = _VERCEL_RES.get(str(cand.get("resolution") or ""))+ asked = take("size", asked_size) # only when the entry declares `size`+ if asked is not None:+ tier = _VERCEL_RES.get(asked, tier)+ if tier:+ body["resolution"] = tierimg = take("image", params.get("image"))if img is not None:body["image"] = img