Skip to content

[DOCS] Document the language field on POST /v1/audio/speech #628

Closed

Description

@inference-gateway-maintainer

Summary

The gateway's /v1/audio/speech endpoint gained an optional, non-standard language field (ISO 639-1 code, default en) in inference-gateway/inference-gateway#582. The local speech engine (local/qwen3-tts) validates it against the ten Qwen3-TTS codes (zh, en, de, it, pt, es, ja, ko, fr, ru) and passes it to llama-tts --tts-lang; proxied providers receive it byte-for-byte. The endpoint's existing documentation (from the local speech engine ticket #626) does not mention the new field yet.

Affected pages: the speech/audio endpoint reference and any local speech engine (local/qwen3-tts) page that documents request fields.

Related: inference-gateway/inference-gateway#577 (feature), inference-gateway/inference-gateway#582 (implementation PR), inference-gateway/schemas#193 (schema field).

Acceptance Criteria

  • The /v1/audio/speech reference documents the optional language field (ISO 639-1, default en, forwarded to providers as-is).
  • The local speech engine docs state the supported Qwen3-TTS codes and that unsupported codes return a 400 naming the set.
  • An example request with model: local/qwen3-tts and language: de is included.

Activity

  1. added
    documentation
    on Sep 1, 2026
  2. moved this to Todo in 2026on Sep 1, 2026
  3. edenreich commented on Sep 1, 2026

    @edenreich
    Contributor

    @infer Can you work on this? use /ponytail:ponytail

  4. added theissue type on Sep 1, 2026
  5. inference-gateway-maintainer commented on Sep 1, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Model: ollama_cloud/glm-5.3-flash · View Job

    Todos

    Pull Request

    #629

    ✅ Infer Result: Success

    Done. PR: #629 (ready for review, board item in QA).

    What changed (2 files, +5/-2):

    • api-reference.md (Audio API):
      • Added a language row to the CreateSpeechRequest fields table: optional, ISO 639-1, default en, forwarded to providers as-is, flagged as a non-standard extension.
      • Local speech engine (local/qwen3-tts) section now states the ten supported Qwen3-TTS codes (zh, en, de, it, pt, es, ja, ko, fr, ru), that the value reaches llama-tts --tts-lang, and that unsupported codes return 400 Bad Request naming the supported set.
      • The existing local engine curl example now uses model: local/qwen3-tts with language: de (and German input text so the example stays coherent) - covers the third acceptance criterion without adding a duplicate example block.
    • cli-text-to-speech.md: added language to the one-line field list for /v1/audio/speech so the cross-reference stays accurate.

    All three acceptance criteria met. bun run lint:md, bun run format:check, and bun run build pass. Skipped: a separate "supported languages" table for proxied providers - the schema only validates locally, so the table row plus local-engine note is sufficient.

    Model: ollama_cloud/glm-5.3-flash · Exit Code: 0 · Duration: 1m 55s

    Tokens: 561,115 in · 5,044 out · 566,159 total (17 requests)

    Tool calls: 27 total · 100% success rate

    Traces
    Session: 1788272556-cdb9a650
    
    session (headless, success)                                                  1m47s
    ├── chat ollama_cloud/glm-5.3-flash                                           3.2s
    │   ╰── POST /v1/chat/completions [inference-gateway]                         3.2s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.2s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]               3.2s
    │               ╰── POST /v1/chat/completions [inference-gateway]             3.2s [error: *errors.errorString]
    ├── execute_tool Read call_pj9b134j                                          244µs
    ├── execute_tool Read call_kcu0l80z                                          171µs
    ├── chat ollama_cloud/glm-5.3-flash                                           6.3s
    │   ╰── POST /v1/chat/completions [inference-gateway]                         6.3s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     6.3s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]               6.3s
    │               ╰── POST /v1/chat/completions [inference-gateway]             6.3s [error: *errors.errorString]
    ├── execute_tool Grep call_jrdd4xxw                                            7ms
    ├── execute_tool Bash call_tobg4mmk                                          466ms
    ├── execute_tool Bash call_q4gpmlqf                                           70ms
    ├── chat ollama_cloud/glm-5.3-flash                                           2.2s
    │   ╰── POST /v1/chat/completions [inference-gateway]                         2.1s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.1s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]               2.1s
    │               ╰── POST /v1/chat/completions [inference-gateway]             2.1s [error: *errors.errorString]
    ├── execute_tool Read call_sklwvfm0                                          195µs
    ├── execute_tool Bash call_ik62habs                                           1.8s
    ├── execute_tool Bash call_52sev0rl                                           1.4s
    ├── chat ollama_cloud/glm-5.3-flash                                          15.5s
    │   ╰── POST /v1/chat/completions [inference-gateway]                        15.5s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    15.5s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]              15.5s
    │               ╰── POST /v1/chat/completions [inference-gateway]            15.5s [error: *errors.errorString]
    ├── execute_tool MultiEdit call_8tc54phi                                     753µs
    ├── execute_tool Bash call_kfmweoin                                          690ms
    ├── chat ollama_cloud/glm-5.3-flash                                           3.2s
    │   ╰── POST /v1/chat/completions [inference-gateway]                         3.2s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.2s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]               3.2s
    │               ╰── POST /v1/chat/completions [inference-gateway]             3.2s [error: *errors.errorString]
    ├── execute_tool TodoWrite call_e2iodw1k                                      72µs
    ├── execute_tool Edit call_khvotl21                                          288µs
    ├── chat ollama_cloud/glm-5.3-flash                                           2.0s
    │   ╰── POST /v1/chat/completions [inference-gateway]                         2.0s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.0s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]               2.0s
    │               ╰── POST /v1/chat/completions [inference-gateway]             2.0s [error: *errors.errorString]
    ├── execute_tool Bash call_3q2h8rgr                                           4.1s
    ├── chat ollama_cloud/glm-5.3-flash                                           2.4s
    │   ╰── POST /v1/chat/completions [inference-gateway]                         2.4s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.4s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]               2.4s
    │               ╰── POST /v1/chat/completions [inference-gateway]             2.4s [error: *errors.errorString]
    ├── execute_tool Bash call_86bx6qkr                                           1.5s
    ├── chat ollama_cloud/glm-5.3-flash                                           1.5s
    │   ╰── POST /v1/chat/completions [inference-gateway]                         1.5s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     1.5s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]               1.5s
    │               ╰── POST /v1/chat/completions [inference-gateway]             1.5s [error: *errors.errorString]
    ├── execute_tool Bash call_4evknxwz                                           3.8s
    ├── chat ollama_cloud/glm-5.3-flash                                           1.8s
    │   ╰── POST /v1/chat/completions [inference-gateway]                         1.7s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     1.7s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]               1.7s
    │               ╰── POST /v1/chat/completions [inference-gateway]             1.7s [error: *errors.errorString]
    ├── execute_tool Bash call_qtkq7v2z                                          20.3s
    ├── chat ollama_cloud/glm-5.3-flash                                           3.4s
    │   ╰── POST /v1/chat/completions [inference-gateway]                         3.4s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.4s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]               3.4s
    │               ╰── POST /v1/chat/completions [inference-gateway]             3.4s [error: *errors.errorString]
    ├── execute_tool TodoWrite call_x6rynhvg                                      60µs
    ├── execute_tool Bash call_h3ox577q                                            5ms
    ├── chat ollama_cloud/glm-5.3-flash                                           2.2s
    │   ╰── POST /v1/chat/completions [inference-gateway]                         2.1s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.1s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]               2.1s
    │               ╰── POST /v1/chat/completions [inference-gateway]             2.1s [error: *errors.errorString]
    ├── execute_tool Bash call_plggv6xn                                            7ms
    ├── chat ollama_cloud/glm-5.3-flash                                           4.9s
    │   ╰── POST /v1/chat/completions [inference-gateway]                         4.9s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     4.9s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]               4.9s
    │               ╰── POST /v1/chat/completions [inference-gateway]             4.9s [error: *errors.errorString]
    ├── execute_tool Write call_u4mbx757                                         879µs
    ├── execute_tool Bash call_ayj2ca0k                                           1.9s
    ├── chat ollama_cloud/glm-5.3-flash                                           6.2s
    │   ╰── POST /v1/chat/completions [inference-gateway]                         6.2s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     6.2s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]               6.2s
    │               ╰── POST /v1/chat/completions [inference-gateway]             6.2s [error: *errors.errorString]
    ├── execute_tool Bash call_35as164y                                           2.1s
    ├── chat ollama_cloud/glm-5.3-flash                                           3.4s
    │   ╰── POST /v1/chat/completions [inference-gateway]                         3.3s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.3s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]               3.3s
    │               ╰── POST /v1/chat/completions [inference-gateway]             3.3s [error: *errors.errorString]
    ├── execute_tool Bash call_qhvai5ui                                           1.3s
    ├── execute_tool Bash call_9r6dn1xu                                          719ms
    ├── chat ollama_cloud/glm-5.3-flash                                           1.9s
    │   ╰── POST /v1/chat/completions [inference-gateway]                         1.9s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     1.8s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]               1.8s
    │               ╰── POST /v1/chat/completions [inference-gateway]             1.8s [error: *errors.errorString]
    ├── execute_tool Bash call_hny9zjgl                                            4ms
    ├── execute_tool Bash call_hvygjyzq                                          431ms
    ├── chat ollama_cloud/glm-5.3-flash                                           2.6s
    │   ╰── POST /v1/chat/completions [inference-gateway]                         2.6s
    │       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.6s [error: *errors.errorString]
    │           ╰── POST /proxy/:provider/*path [inference-gateway]               2.6s
    │               ╰── POST /v1/chat/completions [inference-gateway]             2.6s [error: *errors.errorString]
    ├── execute_tool TodoWrite call_43tuydqj                                      59µs
    ╰── chat ollama_cloud/glm-5.3-flash                                           3.5s
        ╰── POST /v1/chat/completions [inference-gateway]                         3.4s
            ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.4s [error: *errors.errorString]
                ╰── POST /proxy/:provider/*path [inference-gateway]               3.4s
                    ╰── POST /v1/chat/completions [inference-gateway]             3.4s [error: *errors.errorString]
    
    Stats
    Tool Calls
    
    ╭───────────┬───────┬───────┬────────╮
    │ Tool      │ Calls │ Fail% │ Avg    │
    ├───────────┼───────┼───────┼────────┤
    │ Bash      │ 17    │ 0%    │ 2391ms │
    │ Read      │ 3     │ 0%    │ 0ms    │
    │ TodoWrite │ 3     │ 0%    │ 0ms    │
    │ Grep      │ 1     │ 0%    │ 7ms    │
    │ Edit      │ 1     │ 0%    │ 0ms    │
    │ MultiEdit │ 1     │ 0%    │ 0ms    │
    │ Write     │ 1     │ 0%    │ 0ms    │
    ╰───────────┴───────┴───────┴────────╯
    
    Token Usage
    
    ╭────────────────────────────┬────────┬────────┬────────────┬────────┬──────╮
    │ Model                      │ Prompt │ Cached │ Completion │ Total  │ Cost │
    ├────────────────────────────┼────────┼────────┼────────────┼────────┼──────┤
    │ ollama_cloud/glm-5.3-flash │ 561115 │ 0      │ 5044       │ 566159 │ -    │
    ╰────────────────────────────┴────────┴────────┴────────────┴────────┴──────╯
    
    Sessions
    
    ╭───────────┬──────────┬──────────╮
    │ Execution │ Mode     │ Sessions │
    ├───────────┼──────────┼──────────┤
    │ headless  │ headless │ 1        │
    ╰───────────┴──────────┴──────────╯
    

    Triggered by edenreich · Infer Action · OSS

  6. moved this from Todo to In progress in 2026on Sep 1, 2026
  7. moved this from In progress to QA in 2026on Sep 1, 2026
  8. moved this from QA to Done in 2026on Sep 1, 2026
  9. inference-gateway-releaser commented on Sep 22, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.14 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions