Files
helexa/data
grenadeandClaude Opus 5.5 106345495a
CI / Classify changes (push) Successful in 9s
CI / Web (lint + typecheck + i18n + build) (push) Skipped
CI / Config consistency (push) Successful in 7s
CI / Format (push) Successful in 6s
CI / Clippy (push) Successful in 3m48s
CI / Test (push) Successful in 8m32s
CI / CUDA type-check (push) Successful in 19m20s
CI / Build cortex SRPM (push) Skipped
CI / Build neuron SRPM (push) Skipped
CI / Publish cortex to COPR (push) Skipped
CI / Publish neuron to COPR (push) Skipped
CI / Bump version in source (push) Skipped
CI / Classify changes (pull_request) Successful in 11s
CI / Config consistency (pull_request) Successful in 20s
CI / Format (pull_request) Successful in 9s
CI / Web (lint + typecheck + i18n + build) (pull_request) Successful in 2m38s
CI / Clippy (pull_request) Failing after 10m49s
CI / CUDA type-check (pull_request) Successful in 21m39s
CI / Test (pull_request) Failing after 25m3s
CI / Build cortex SRPM (pull_request) Skipped
CI / Build neuron SRPM (pull_request) Skipped
CI / Publish cortex to COPR (pull_request) Skipped
CI / Publish neuron to COPR (pull_request) Skipped
CI / Bump version in source (pull_request) Skipped
feat(audio): async audio generation job API across neuron, cortex and router (#382)
Music renders take seconds to minutes, so /v1/audio/generations is a job
API rather than a request/response endpoint:

  POST   /v1/audio/generations               submit -> 202 + job
  GET    /v1/audio/generations               the caller's jobs
  GET    /v1/audio/generations/{id}          poll
  GET    /v1/audio/generations/{id}/content  the rendered audio
  DELETE /v1/audio/generations/{id}          cancel

cortex owns the job. It validates against the model's advertised limits,
reserves budget, queues the job behind a fleet-wide concurrency bound, and
dispatches it to a neuron serving the model. A busy model (429/503) is
waited on without spending an attempt; a failing node is retried up to
max_attempts. Records and audio are written under [audio_jobs] dir, so the
job list and finished results survive a restart, and unfinished jobs are
re-queued (with a fresh reservation) at startup. Finished jobs expire after
retention_hours. Jobs belong to the submitting account; anonymous jobs are
reachable by id only and never listed.

neuron renders one generation per call, synchronously, on the same path.
The response body is the audio and the metadata rides in the
x-helexa-audio-result header, so long songs need no base64 envelope. The
harness seam (CandleHarness::audio_generation) answers wrong_modality or
model_not_found until the ACE-Step engine lands (#383).

The router dispatches submissions by capacity like any inference call, and
answers job calls by asking each cortex until one does not 404, since a job
id carries no hint of its cortex. Listings merge across cortexes.

Model limits (duration range, vocals, sample rate, max steps) are declared
per catalogue profile ([models.audio]) and advertised in /v1/models, so
clients can build their forms from them. Metering settles audio-seconds
through a placeholder token bridge until #386 moves rates into the
database. helexa-bench chat scenarios skip audio models, and the cortex
unit gains StateDirectory=cortex for the job store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ohK2pULMVJctL5B1Gixdp
2026-10-17 14:20:01 +03:00
..