cf ai run prints {} for models that return binary output (text-to-speech audio)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 65/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- node.js, typescript
Direzione di ricerca
Start by tracing the cf ai run command to where it reads and formats the API response, then check how the CLI handles content types and stdout. Reproduce with the text-to-speech command in the issue and compare its response handling with the REST API's audio/mpeg body. Done when non-JSON response bytes can be retrieved as described and JSON responses still work.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
cf ai run with a text-to-speech model prints {} and exits 0. The audio the model returned is dropped, so there's no way to get it from the CLI.
$ cf ai run @cf/deepgram/aura-2-en --text "Hello there." --encoding mp3 > out.mp3; echo "exit $?"
exit 0
$ xxd out.mp3
00000000: 7b7d 0a {}.
The same request sent straight to the REST API (POST /accounts/{account_id}/ai/run/@cf/deepgram/aura-2-en with {"text": "...", "speaker": "athena", "encoding": "mp3"}) returns 200 with content-type: audio/mpeg and the MP3 bytes. So it looks like the CLI JSON-parses or serializes every response, and a binary body turns into {}.
Expected
When the response isn't JSON (audio/*, image/*, application/octet-stream), write the raw bytes to stdout (or to a file given with --output FILE), and refuse with a clear message when stdout is a terminal. Failing that, at least exit non-zero rather than print {} with success.
This affects @cf/deepgram/aura-1, @cf/deepgram/aura-2-en, @cf/deepgram/aura-2-es and likely the image-generation models too.
Environment
cf 1.0.0-beta.20, Node v26.12.1, Linux aarch64, signed in with cf auth login (OAuth).
- Lingua principale
- TypeScript
- Stelle
- 960
- Fork
- 62
- Merge medio
- 17h 15m
- PR unite (30g)
- 194
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudflare/cf
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cloudflare/cf#344 ·
I maintainer di solito rispondono entro 1 giorno
-
upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudflare/cf#262 ·
I maintainer di solito rispondono entro 1 giorno
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` templateForse già presa @jamesopstad l’ha presa 17 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudflare/cf#223 · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cloudflare/cf#179 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
cloudflare/cf#458 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cloudflare/cf
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Automattic/data-liberation-agent#1115 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Enhance blog readabilityApertaCSS enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
pychess/pychess-variants#2448 ·
I maintainer di solito rispondono entro 1 giorno
-
[architect] Stale planning/scratch files at repo root (COMPONENT_SPLIT_SUMMARY.md etc.) describe already-completed workForse già presa @hivecommons-hive l’ha presa oggi. Apertaagent/architect architecture help wanted stage/040-covered-by-pr tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
kubestellar/console#24716 ·
I maintainer di solito rispondono entro 1 giorno
-
helm-knative-apply.sh fails with Helm 4Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea: triage theme: undefined
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
jhipster/generator-jhipster#35895 ·
I maintainer di solito rispondono entro 1 giorno