fix: live-API corrections — music result shapes, mesh format honesty, mesh conversion
Round 2 from live smokes on netherstorm (2026-07-14): - ACE-Step result blob is an ARRAY of objects and carries RAW control characters inside string values (literal newlines) — strict JSON rejected it. parseMusicResult sanitizes control chars (only legal inside string values in the double-encoded blob) and accepts array or object shapes. Regression test uses the live payload shape. - Hunyuan3D GenerationRequest has NO output-format field (the documented type param is fiction) — it always returns GLB. Results are now labelled by sniffed magic bytes, never by the requested format. - NEW meshgen.Converter/ConverterProvider optional surface + llamaswap impl over the mediautils shim POST /v1/convert_mesh — the STL hop for the printer pipeline. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
@@ -150,3 +150,23 @@ type Provider interface {
|
||||
// backend verbatim; no catalog validation).
|
||||
MeshModel(id string, opts ...ModelOption) (Model, error)
|
||||
}
|
||||
|
||||
// Converter re-encodes a mesh between containers (GLB/STL/OBJ). A separate
|
||||
// optional surface because conversion typically runs on a DIFFERENT backend
|
||||
// than generation (the reference host converts on its mediautils shim —
|
||||
// Hunyuan3D's live server always emits GLB regardless of the requested
|
||||
// format).
|
||||
type Converter interface {
|
||||
// Convert returns the mesh re-encoded in the given format.
|
||||
Convert(ctx context.Context, mesh Mesh, format string) (*Result, error)
|
||||
}
|
||||
|
||||
// ConverterProvider mints Converters bound to one backend.
|
||||
type ConverterProvider interface {
|
||||
// Name is the registry identifier for the provider.
|
||||
Name() string
|
||||
|
||||
// MeshConverter returns a Converter bound to the given id (passed
|
||||
// through to the backend verbatim; no catalog validation).
|
||||
MeshConverter(id string) (Converter, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user