Skip to content

feat(tts): add opt-in TextToSpeech tool with local Qwen3-TTS synthesis - #1118

Merged
edenreich merged 26 commits into
mainfrom
fix/issue-1115
Aug 30, 2026
Merged

edenreich merged 26 commits into
mainfrom
fix/issue-1115

Conversation

@inference-gateway-maintainer

@inference-gateway-maintainer inference-gateway-maintainer Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #1115

Summary

Adds speech synthesis as a sibling of the existing speech-to-text feature, in two modes: text to speech (text in, WAV out, stock voice) and voice to voice (text in plus a short reference WAV, spoken in the cloned voice). Exposed as an opt-in agent tool - when text_to_speech.enabled is false (the default) the tool is not registered and its definition never reaches the tools payload sent to the LLM, so it costs zero prompt tokens.

The engine chosen for the first iteration is Qwen3-TTS via llama.cpp's llama-tts (one of the issue's candidates and now llama.cpp's flagship TTS demo): a standalone local binary, GGUF models in the same ecosystem as whisper.cpp, and --tts-speaker-file for zero-shot voice cloning. No CGO is added to the infer binary - everything shells out, mirroring internal/audio's existing approach, with model auto-download into ~/.infer/models/tts and ffmpeg-based reference-sample normalization reusing the package's converter building blocks and prebuilt-ffmpeg download from stt-binaries.

Changes

  • config/config.go: new TextToSpeechConfig section (enabled, engine, model, auto_download, output_dir, binary_path, models_dir, timeout, ffmpeg_path) with ResolveOutputDir (default ~/.infer/tts), engine validation in Config.Validate (qwen3-tts only for now), defaults, and an IsApprovalRequired case. All fields are env-overridable via the existing viper layer (INFER_TEXT_TO_SPEECH_*).
  • config/prompts.go: default TextToSpeech tool description (overridable via prompts.yaml).
  • internal/audio/synthesizer.go: Synthesizer with Synthesize(ctx, text, voiceSamplePath, outPath) - resolves the binary (explicit path, PATH, ~/.infer/bin), ensures models, normalizes the voice sample to 16kHz mono WAV capped at 30s via ffmpeg (with a too-short guard), and invokes llama-tts -m <backbone> -mm <mmproj> -p <text> [--tts-speaker-file <sample>] -o <out>. Missing binary/ffmpeg/model yield actionable install errors. Also exports WAVDurationSeconds so callers can report audio duration without external tools.
  • internal/audio/ttsmodel.go: TTSModelManager downloading the backbone and mmproj GGUFs (default preset Qwen3-TTS-12Hz-1.7B-Base-Q4_K_M + its Q8_0 mmproj; q8/bf16 presets or explicit <backbone>[,<mmproj>].gguf filenames) from ggml-org/Qwen3-TTS-12Hz-1.7B-Base-GGUF into ~/.infer/models/tts, temp-file + rename, honoring auto_download: false for manually placed models.
  • internal/agent/tools/text_to_speech.go: TextToSpeech tool following the ImageGenerationTool shape - text required, optional voice_sample (sandbox-validated, must exist and be readable) and output_path (write-validated); IsEnabled requires the feature flag and a supported engine; result reports the WAV path, duration, and whether the voice was cloned.
  • internal/agent/tools/registry.go: registers the tool only when text_to_speech.enabled is true, on top of the per-tool IsEnabled gate.
  • docs/text-to-speech.md: setup, config, model table, cloning guidance, troubleshooting (mirrors docs/speech-to-text.md); plus a tools-reference entry and cspell words.
  • Tests: synthesizer with a fake command runner (stock + cloned voice arg assertions, binary/model missing errors, WAV duration parsing), tool validation/execution/formatting with a fake synthesizer, registry gating (tool absent from the tools payload when disabled), config defaults, and INFER_TEXT_TO_SPEECH_* env overrides.

Acceptance criteria notes

  • Tool absent from the LLM payload when disabled: enforced twice (registry registers only when cfg.TextToSpeech.Enabled; GetToolDefinitions filters by IsEnabled()), pinned by TestTextToSpeechTool_RegistryGating.
  • Model auto-download and caching under ~/.infer/models/tts (or models_dir); auto_download: false with a manually placed model works. Binary auto-download applies "where applicable": llama-tts is looked up on PATH or via binary_path (the STT binary release does not ship a llama-tts asset yet; the resolver will pick one up automatically if it is added), while ffmpeg is auto-downloaded into ~/.infer/bin as a last resort.
  • No docs ticket for the CLI repo itself: docs ship in this PR (docs/text-to-speech.md + docs/tools-reference.md); surfacing the feature in the org docs site is tracked in [DOCS] Document the TextToSpeech agent tool (text-to-speech and voice cloning) docs#592.

Mirror the speech-to-text architecture: a text_to_speech config section (disabled by default, env-overridable via INFER_TEXT_TO_SPEECH_*), an audio.Synthesizer that shells out to a local llama.cpp llama-tts binary running Qwen3-TTS GGUF models (stock voice, or zero-shot voice cloning from a reference WAV normalized via ffmpeg), and a TextToSpeech agent tool registered only when enabled so the tool definition never reaches the LLM payload otherwise.
Comment thread internal/audio/synthesizer.go Fixed
Comment thread internal/audio/synthesizer.go Fixed
…ults; add docs

docs/text-to-speech.md mirrors speech-to-text.md (prerequisites, config, models, troubleshooting), tools-reference gains a TextToSpeech entry, cspell gains gguf/mmproj. Tests: synthesizer with a fake command runner (stock + cloned voice arg assertions, binary/model missing errors, WAV duration parsing), tool validation/execution/formatting with a fake synthesizer, registry gating (tool absent from the payload when disabled), config defaults, and INFER_TEXT_TO_SPEECH_* env overrides.
edenreich and others added 3 commits August 28, 2026 17:39
…ed in path expression'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ed in path expression'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ed in path expression'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Comment thread internal/audio/synthesizer.go Fixed
edenreich and others added 2 commits August 28, 2026 17:42
…ed in path expression'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ed in path expression'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ed in path expression'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ed in path expression'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@edenreich

edenreich commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

@infer Can you address all the failing issues in the CI? also review any other places - the code produced by you initially was not secure and Github Action bot suggested many fixes. use /ponytail:ponytail /go /go-concurrency

If the skill instructions or the AGENTS.md needs to be updated with the new adjusted rules then please document these.

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor Author

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

Todos

  • Investigate CodeQL alerts (2 high, path expression) and lint failure
  • Fix lint (nestif) + CodeQL: sanitize paths via filepath.Base at tool boundary, single resolver helpers
  • Remove synthesizer's redundant/broken output-dir containment (tool owns path policy)
  • Update tests + docs for bare-filename path contract
  • Review other security-sensitive spots in the new TTS code (fmt-chunk alloc bound, symlink escape)
  • Document adjusted rules in AGENTS.md Security Gotchas
  • Run task precommit:run, commit and push
  • Verify CI green (CodeQL + lint + full pipeline)

Pull Request

#1118

✅ Infer Result: Success

All CI checks are green. Let me close out the todo list:

All CI checks are green. Final summary:

CI fixed - all checks pass

CodeQL, lint, build, build-macos, e2e, postgres, test, and vet all pass on commit dfe2cb7 (pushed to fix/issue-1115).

Root causes and fixes

CodeQL (2 high, go/path-injection) - The taint source is json.Unmarshal of the LLM's tool-call arguments in llm_tool_service.go. The seven prior Copilot autofix rounds failed because custom guards (ValidatePathInSandbox, filepath.Clean, filepath.Rel containment, prefix checks) do not break CodeQL's taint tracking. The working fix, applied once at the tool boundary where Validate and Execute both route through:

  • resolveSamplePath / resolveOutputPath reduce every LLM-supplied path to a bare file name via filepath.Base (the query's documented sanitizer) joined onto a trusted directory: voice_sample resolves inside the working directory, output_path inside the configured output dir (default ~/.infer/tts, configurable). Absolute paths, separators, and .. are still rejected with actionable errors, and the sample is filepath.EvalSymlinks-resolved and re-validated before opening so a planted symlink can't escape the sandbox.
  • Removed the synthesizer's out-dir containment the autofixes had added: it didn't satisfy CodeQL and actually rejected the tool's own default flow (tool writes to ~/.infer/tts while the synthesizer compared against CWD when output_dir was unset). Path policy now lives in one place, the tool.
  • Behavior change (more restrictive, documented): output_path is now a bare file name inside the output dir rather than an arbitrary sandbox path - a TTS tool has no business writing arbitrary sandbox locations.

lint - nestif complexity at text_to_speech.go:81: fixed by extracting the per-argument resolution into the two helper methods, which also deduplicated the four repeated error-result blocks into a failure helper.

Security review of the rest of the new code

  • WAVDurationSeconds allocated up to 4 GiB from a hostile fmt-chunk header; now bounded (real chunks are 16-40 bytes).
  • Config-sourced paths (binary_path, ffmpeg_path, model names) match the untouched STT baseline (model.go/convert.go, zero nolint on main) - CodeQL does not flag viper-config flows here; left consistent.
  • Known ceiling, not this PR: sandbox validation across all file tools is string-based, so a pre-planted symlink is a systemic bypass shared with Read/Edit/Delete; fixing it belongs in ValidatePathInSandbox itself (needs care around symlinked sandbox roots like macOS /tmp), worth a follow-up issue.

Documentation

As requested, the adjusted rule is now documented in AGENTS.md - Security Gotchas: LLM-supplied tool paths must be reduced with filepath.Base onto a trusted directory at the tool boundary; custom guards don't satisfy CodeQL; resolve symlinks when the file pre-exists. Tests updated for the new contract, including traversal/absolute/nested rejection cases pinning the sandbox behavior.

Model: ollama_cloud/glm-5.3-flash · Exit Code: 0 · Duration: 19m 52s

Tokens: 5,406,823 in · 39,129 out · 5,445,952 total (51 requests)

Tool calls: 75 total · 100% success rate

Traces
Session: 1787935695-e3b9ba7e

session (headless, success)                                                 19m44s
├── chat ollama_cloud/glm-5.3-flash                                           2.9s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.9s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.9s [error: *errors.errorString]
├── execute_tool Read call_ha9xenp7                                          258µs
├── execute_tool Read call_nz136w89                                          324µs
├── execute_tool Bash call_gzi9supr                                           10ms
├── chat ollama_cloud/glm-5.3-flash                                           1.6s
│   ╰── POST /v1/chat/completions [inference-gateway]                         1.6s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     1.6s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               1.6s
│               ╰── POST /v1/chat/completions [inference-gateway]             1.6s [error: *errors.errorString]
├── execute_tool Read call_ja1pvuoi                                          205µs
├── execute_tool Bash call_bmm5y4wa                                           1.1s [error: tool_error]
├── chat ollama_cloud/glm-5.3-flash                                           3.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.0s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.0s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.0s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.0s [error: *errors.errorString]
├── execute_tool TodoWrite call_wijkypx4                                      85µs
├── chat ollama_cloud/glm-5.3-flash                                           1.8s
│   ╰── POST /v1/chat/completions [inference-gateway]                         1.8s
│       ╰── 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 Memory call_ctu6xgbq                                        128µs
├── execute_tool Bash call_l6hkcuc6                                           1.3s
├── chat ollama_cloud/glm-5.3-flash                                           2.5s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.5s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.5s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.5s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.5s [error: *errors.errorString]
├── execute_tool Bash call_f33s4dn3                                            4ms
├── 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 Read call_h8zp3llc                                          300µs
├── execute_tool Read call_7fcy2egk                                          231µs
├── chat ollama_cloud/glm-5.3-flash                                          26.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                        26.0s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    26.0s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              26.0s
│               ╰── POST /v1/chat/completions [inference-gateway]            26.0s [error: *errors.errorString]
├── execute_tool Bash call_d4il9709                                            5ms
├── execute_tool Bash call_z0bmbhgx                                            5ms
├── chat ollama_cloud/glm-5.3-flash                                           1.4s
│   ╰── POST /v1/chat/completions [inference-gateway]                         1.4s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     1.4s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               1.4s
│               ╰── POST /v1/chat/completions [inference-gateway]             1.4s [error: *errors.errorString]
├── execute_tool Bash call_nh8kjgzo                                            5ms
├── execute_tool Bash call_1ofu0315                                            5ms
├── chat ollama_cloud/glm-5.3-flash                                           2.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         1.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     1.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               1.9s
│               ╰── POST /v1/chat/completions [inference-gateway]             1.9s [error: *errors.errorString]
├── execute_tool Memory call_u88r3neh                                        111µs
├── execute_tool Bash call_dq3p4meb                                            6ms
├── chat ollama_cloud/glm-5.3-flash                                           2.2s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.2s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.2s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.2s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.2s [error: *errors.errorString]
├── execute_tool Memory call_4lwnet6g                                        132µs
├── execute_tool Bash call_z0rhuxwu                                            6ms
├── chat ollama_cloud/glm-5.3-flash                                          22.6s
│   ╰── POST /v1/chat/completions [inference-gateway]                        22.5s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    22.5s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              22.5s
│               ╰── POST /v1/chat/completions [inference-gateway]            22.5s [error: *errors.errorString]
├── execute_tool Grep call_7b67hytv                                           12ms
├── execute_tool Read call_08yjajgw                                          175µs
├── chat ollama_cloud/glm-5.3-flash                                           2.3s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.3s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.3s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.3s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.3s [error: *errors.errorString]
├── execute_tool Grep call_ckium9zf                                            5ms
├── execute_tool Grep call_c7oj8plt                                          538µs
├── chat ollama_cloud/glm-5.3-flash                                           2.3s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.3s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.3s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.3s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.3s [error: *errors.errorString]
├── execute_tool Read call_sk3eg8n8                                          241µs
├── execute_tool Read call_pu2zwa9e                                          240µs
├── chat ollama_cloud/glm-5.3-flash                                           7.8s
│   ╰── POST /v1/chat/completions [inference-gateway]                         7.8s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     7.8s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               7.8s
│               ╰── POST /v1/chat/completions [inference-gateway]             7.8s [error: *errors.errorString]
├── execute_tool Read call_njpskdto                                          186µs
├── execute_tool Bash call_sup87yd5                                            5ms
├── chat ollama_cloud/glm-5.3-flash                                           3.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.0s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.0s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.0s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.0s [error: *errors.errorString]
├── execute_tool WebFetch call_5d1m2zud                                       30ms
├── chat ollama_cloud/glm-5.3-flash                                          31.4s
│   ╰── POST /v1/chat/completions [inference-gateway]                        31.4s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    31.4s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              31.4s
│               ╰── POST /v1/chat/completions [inference-gateway]            31.4s [error: *errors.errorString]
├── execute_tool Grep call_6vaojw6d                                          494ms
├── execute_tool Read call_sw5mb68d                                          168µs
├── chat ollama_cloud/glm-5.3-flash                                           9.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         9.0s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     9.0s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               9.0s
│               ╰── POST /v1/chat/completions [inference-gateway]             9.0s [error: *errors.errorString]
├── execute_tool Read call_lvg4evw4                                          239µs
├── chat ollama_cloud/glm-5.3-flash                                          53.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                        53.0s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    52.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              52.9s
│               ╰── POST /v1/chat/completions [inference-gateway]            52.9s [error: *errors.errorString]
├── chat ollama_cloud/glm-5.3-flash                                           2.9s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.9s
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.9s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.9s
├── execute_tool Grep call_kao1iwhy                                          356ms
├── execute_tool Grep call_ls0r1n89                                          507µs
├── chat ollama_cloud/glm-5.3-flash                                           2.8s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.8s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.8s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.8s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.8s [error: *errors.errorString]
├── execute_tool Grep call_c0anq0yq                                            2ms
├── chat ollama_cloud/glm-5.3-flash                                           1.7s
│   ╰── POST /v1/chat/completions [inference-gateway]                         1.6s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     1.6s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               1.6s
│               ╰── POST /v1/chat/completions [inference-gateway]             1.6s [error: *errors.errorString]
├── execute_tool Read call_qecus1i3                                          198µs
├── execute_tool Read call_dc8fnucn                                          225µs
├── chat ollama_cloud/glm-5.3-flash                                           6.5s
│   ╰── POST /v1/chat/completions [inference-gateway]                         6.5s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     6.4s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               6.4s
│               ╰── POST /v1/chat/completions [inference-gateway]             6.4s [error: *errors.errorString]
├── execute_tool Read call_o5humxj2                                          238µs
├── chat ollama_cloud/glm-5.3-flash                                          24.5s
│   ╰── POST /v1/chat/completions [inference-gateway]                        24.5s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    24.5s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              24.5s
│               ╰── POST /v1/chat/completions [inference-gateway]            24.5s [error: *errors.errorString]
├── execute_tool TodoWrite call_rhulubf0                                      70µs
├── chat ollama_cloud/glm-5.3-flash                                          10.6s
│   ╰── POST /v1/chat/completions [inference-gateway]                        10.6s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    10.6s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              10.6s
│               ╰── POST /v1/chat/completions [inference-gateway]            10.6s [error: *errors.errorString]
├── execute_tool MultiEdit call_av4zbu4a                                     486µs
├── chat ollama_cloud/glm-5.3-flash                                           3.6s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.6s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.5s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.5s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.5s [error: *errors.errorString]
├── execute_tool Read call_39g9c3g0                                          212µs
├── chat ollama_cloud/glm-5.3-flash                                           3.7s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.6s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.6s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.6s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.6s [error: *errors.errorString]
├── execute_tool MultiEdit call_ns14ww1p                                     397µs
├── chat ollama_cloud/glm-5.3-flash                                           3.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.0s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.9s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.9s [error: *errors.errorString]
├── execute_tool Read call_a23jhcny                                          189µs
├── execute_tool Edit call_v0ct6u7z                                          472µs
├── chat ollama_cloud/glm-5.3-flash                                           8.4s
│   ╰── POST /v1/chat/completions [inference-gateway]                         8.3s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     8.3s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               8.3s
│               ╰── POST /v1/chat/completions [inference-gateway]             8.3s [error: *errors.errorString]
├── execute_tool MultiEdit call_kuypveaz                                     409µs
├── 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 Bash call_ksm3gil3                                          1m16s
├── chat ollama_cloud/glm-5.3-flash                                           2.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         1.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     1.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               1.9s
│               ╰── POST /v1/chat/completions [inference-gateway]             1.9s [error: *errors.errorString]
├── execute_tool Grep call_5duc0v1d                                          390µs
├── execute_tool Read call_sr83aqcg                                          197µs
├── chat ollama_cloud/glm-5.3-flash                                           2.2s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.2s
│       ╰── 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_jn2uvl6s                                          213µs
├── chat ollama_cloud/glm-5.3-flash                                           4.4s
│   ╰── POST /v1/chat/completions [inference-gateway]                         4.4s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     4.4s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               4.4s
│               ╰── POST /v1/chat/completions [inference-gateway]             4.4s [error: *errors.errorString]
├── execute_tool Edit call_t6bltscl                                          509µs
├── chat ollama_cloud/glm-5.3-flash                                           3.6s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.5s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.5s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.5s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.5s [error: *errors.errorString]
├── execute_tool Edit call_pnrfmyj3                                          342µs
├── 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 Bash call_qxreoq07                                          1m16s
├── chat ollama_cloud/glm-5.3-flash                                           9.8s
│   ╰── POST /v1/chat/completions [inference-gateway]                         9.7s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     9.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               9.7s
│               ╰── POST /v1/chat/completions [inference-gateway]             9.7s [error: *errors.errorString]
├── execute_tool Grep call_owk2anvq                                          618µs
├── execute_tool Grep call_klhzbkbj                                          369µs
├── chat ollama_cloud/glm-5.3-flash                                           2.5s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.5s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.5s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.5s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.5s [error: *errors.errorString]
├── execute_tool Read call_8z4ck6c3                                          218µs
├── execute_tool Read call_ne910v8a                                          208µs
├── chat ollama_cloud/glm-5.3-flash                                          40.8s
│   ╰── POST /v1/chat/completions [inference-gateway]                        40.8s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    40.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              40.7s
│               ╰── POST /v1/chat/completions [inference-gateway]            40.7s [error: *errors.errorString]
├── execute_tool Edit call_p8t7t89y                                          431µs
├── execute_tool Edit call_3kphx112                                          445µs
├── chat ollama_cloud/glm-5.3-flash                                           2.7s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.7s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.7s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.7s [error: *errors.errorString]
├── execute_tool Grep call_0owaoe92                                          349µs
├── execute_tool Bash call_ooqdyzoi                                          21.3s
├── chat ollama_cloud/glm-5.3-flash                                           3.2s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.1s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.1s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.1s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.1s [error: *errors.errorString]
├── execute_tool Read call_lhn72ldf                                          180µs
├── chat ollama_cloud/glm-5.3-flash                                           3.8s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.7s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.7s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.7s [error: *errors.errorString]
├── execute_tool Edit call_b02erofe                                          401µs
├── chat ollama_cloud/glm-5.3-flash                                           6.5s
│   ╰── POST /v1/chat/completions [inference-gateway]                         6.5s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     6.4s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               6.4s
│               ╰── POST /v1/chat/completions [inference-gateway]             6.4s [error: *errors.errorString]
├── execute_tool Memory call_k5hna2t9                                         1.3s
├── execute_tool Bash call_t1s16kyi                                           10ms
├── chat ollama_cloud/glm-5.3-flash                                           3.6s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.6s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.5s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.5s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.5s [error: *errors.errorString]
├── execute_tool TodoWrite call_zfh5kxbl                                      75µ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]     1.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               1.9s
│               ╰── POST /v1/chat/completions [inference-gateway]             1.9s [error: *errors.errorString]
├── execute_tool Bash call_trwwimaj                                          22.9s
├── chat ollama_cloud/glm-5.3-flash                                           2.5s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.5s
│       ╰── 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_0gn1xtfn                                          1m29s [error: tool_error]
├── chat ollama_cloud/glm-5.3-flash                                           5.7s
│   ╰── POST /v1/chat/completions [inference-gateway]                         5.6s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     5.6s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               5.6s
│               ╰── POST /v1/chat/completions [inference-gateway]             5.6s [error: *errors.errorString]
├── execute_tool Bash call_0vc91kam                                           13ms
├── chat ollama_cloud/glm-5.3-flash                                          10.9s
│   ╰── POST /v1/chat/completions [inference-gateway]                        10.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    10.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              10.9s
│               ╰── POST /v1/chat/completions [inference-gateway]            10.9s [error: *errors.errorString]
├── execute_tool Bash call_08q1kw02                                           5.1s
├── chat ollama_cloud/glm-5.3-flash                                           2.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         1.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     1.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               1.9s
│               ╰── POST /v1/chat/completions [inference-gateway]             1.9s [error: *errors.errorString]
├── execute_tool Bash call_bmun170v                                           1.4s
├── chat ollama_cloud/glm-5.3-flash                                           4.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         4.0s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     4.0s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               4.0s
│               ╰── POST /v1/chat/completions [inference-gateway]             4.0s [error: *errors.errorString]
├── chat ollama_cloud/glm-5.3-flash                                           2.3s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.3s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.3s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.3s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.3s [error: *errors.errorString]
├── chat ollama_cloud/glm-5.3-flash                                           4.3s
│   ╰── POST /v1/chat/completions [inference-gateway]                         4.3s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     4.3s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               4.3s
│               ╰── POST /v1/chat/completions [inference-gateway]             4.3s [error: *errors.errorString]
├── execute_tool Wait call_3yve537c                                          8m13s
├── chat ollama_cloud/glm-5.3-flash                                           8.3s
│   ╰── POST /v1/chat/completions [inference-gateway]                         8.2s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     8.2s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               8.2s
│               ╰── POST /v1/chat/completions [inference-gateway]             8.2s [error: *errors.errorString]
├── execute_tool TodoWrite call_4baw7j84                                      74µs
╰── chat ollama_cloud/glm-5.3-flash                                           8.3s
    ╰── POST /v1/chat/completions [inference-gateway]                         8.3s
        ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     8.2s [error: *errors.errorString]
            ╰── POST /proxy/:provider/*path [inference-gateway]               8.2s
                ╰── POST /v1/chat/completions [inference-gateway]             8.2s [error: *errors.errorString]
Stats
Tool Calls

╭───────────┬───────┬───────┬──────────╮
│ Tool      │ Calls │ Fail% │ Avg      │
├───────────┼───────┼───────┼──────────┤
│ Read      │ 21    │ 0%    │ 0ms      │
│ Bash      │ 20    │ 10%   │ 14712ms  │
│ Grep      │ 11    │ 0%    │ 79ms     │
│ Edit      │ 6     │ 0%    │ 0ms      │
│ TodoWrite │ 4     │ 0%    │ 0ms      │
│ Memory    │ 4     │ 0%    │ 329ms    │
│ MultiEdit │ 3     │ 0%    │ 0ms      │
│ WebFetch  │ 1     │ 0%    │ 30ms     │
│ Wait      │ 1     │ 0%    │ 492635ms │
╰───────────┴───────┴───────┴──────────╯

Token Usage

╭────────────────────────────┬─────────┬────────┬────────────┬─────────┬──────╮
│ Model                      │ Prompt  │ Cached │ Completion │ Total   │ Cost │
├────────────────────────────┼─────────┼────────┼────────────┼─────────┼──────┤
│ ollama_cloud/glm-5.3-flash │ 5491324 │ 0      │ 47321      │ 5538645 │ -    │
╰────────────────────────────┴─────────┴────────┴────────────┴─────────┴──────╯

Sessions

╭───────────┬──────────┬──────────╮
│ Execution │ Mode     │ Sessions │
├───────────┼──────────┼──────────┤
│ headless  │ headless │ 1        │
╰───────────┴──────────┴──────────╯

Triggered by edenreich · Infer Action · OSS

inference-gateway-maintainer Bot and others added 3 commits August 28, 2026 16:59
…boundary

CodeQL's go/path-injection taint tracks through custom guards (sandbox checks, filepath.Clean/Rel containment), so the previous autofixes never silenced the two high alerts. Both LLM-supplied paths are now reduced to a bare file name via filepath.Base (the query's documented sanitizer) and joined onto a trusted directory: voice_sample resolves inside the working directory, output_path inside the configured output dir. Absolute paths, separators and .. stay rejected with actionable errors, the sample is symlink-resolved and re-validated before opening, and WAVDurationSeconds bounds the fmt-chunk allocation.

Also flattens Validate into resolveSamplePath/resolveOutputPath helpers (fixes the nestif lint failure), drops the synthesizer's redundant out-dir containment that rejected the default ~/.infer/tts flow, and documents the pattern in AGENTS.md Security Gotchas.
@edenreich

Copy link
Copy Markdown
Contributor

@infer Can you address this comment? #1115 (comment)

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor Author

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

Todos

  • Identify the exact comment 5458413311 and the ask
  • Read ttsmodel.go, model.go (STT), synthesizer.go and existing tests
  • Shared helpers: downloadToFile (CL-verified) + cachedModelStale (HEAD size check)
  • Wire into TTSModelManager.ensureFile and ModelManager.EnsureModel
  • Tests: stale cache re-fetch, incomplete download rejected, offline trust
  • Docs: one-line troubleshooting note (TTS + STT)
  • Run task precommit:run; commit and push

Pull Request

#1118

✅ Infer Result: Success

All done - branch is clean and everything is pushed. Here's the summary.

Addressed: m13v's review on #1115 - "the acceptance criteria catch a missing model but not a half-downloaded one"

The finding: ensureFile/EnsureModel treated any file present in the models cache as valid, so a truncated GGUF (interrupted manual fetch, early-close response, partial copy) would be handed to the engine forever - a retryable network failure turned permanent. The fix makes the cache self-validating so a bad download re-fetches instead.

What changed (commit a06babb7, pushed to fix/issue-1115)

  • internal/audio/download.go (new): the download-and-cache logic both model managers previously duplicated, now shared:
    • downloadToFile - keeps the existing temp-file + rename (an interrupted fetch never lands at the final path) and adds a verification of the received byte count against the response Content-Length, so a silently truncated response is never cached either.
    • cachedModelStale - a cheap HEAD probe compares the cached file's size with the server's Content-Length; a mismatch drops the cache entry and re-downloads it. This directly implements "a bad download re-fetches instead of failing synthesis forever", and catches corrupt entries regardless of how they got there (manual curl, older tool, disk hiccup).
    • Failure-safe semantics: when the size cannot be determined (offline, non-200, missing Content-Length), the cache is trusted - a probe outage must not turn a cached model into a mandatory download; and auto_download: false models are never re-fetched behind the user's back. Same-size corruption is out of scope, noted with a ponytail: comment naming the upgrade path (HF's tree API exposes lfs.oid for a real sha256 if ever needed).
  • internal/audio/ttsmodel.go and model.go: both ensureFile/EnsureModel now route the cache-hit path through the staleness check and both download methods were deleted in favour of the shared helper (the same hole existed in the whisper manager, so it's fixed at the root instead of only on the TTS path - net -91 lines, no behavior change for offline/manual flows).
  • Tests: TestEnsureModelsRefetchesTruncatedBackbone (TTS, pins the exact review scenario), TestEnsureModelRefetchesTruncatedCache (whisper), TestDownloadToFileRejectsIncompleteDownload (short body vs Content-Length never reaches the cache and leaves no temp file), and a table test for cachedModelStale including the offline-trusts-cache case.
  • Docs: one troubleshooting bullet each in docs/text-to-speech.md and docs/speech-to-text.md describing the automatic re-fetch and the manual escape hatch.

On the comment's mention of Validate(): model integrity is enforced at execution time (EnsureModels runs before llama-tts and now validates the cache); the tool's Validate intentionally does not trigger downloads, which would be a surprising side effect for a validation call.

Verification

  • task test (full suite) green; go test ./internal/audio/ -race clean; task precommit:run (mod tidy, mocks, fmt, lint:imports, golangci-lint 0 issues, markdownlint) passes; commit hook re-ran clean.
  • No new dependencies, no new config surface, no release steps (semantic-release handles the release from the commit message).

One caveat: raw gh api calls are blocked by the CI bash sandbox, so I confirmed which comment to address via the allow-listed gh issue view --json timeline instead of fetching #issuecomment-5458413311 by ID - it is m13v's 22:27 review comment (edenreich's "I'll have a look" reply follows it), which is what this change implements.

All work is complete and pushed. Final summary:

Addressed: m13v's review on #1115 - "the acceptance criteria catch a missing model but not a half-downloaded one"

The finding: the model cache's exists-check trusted any file on disk, so a truncated GGUF (interrupted manual fetch, early-close response, partial copy) would be handed to llama-tts forever - a retryable network failure turned permanent. Fixed in commit a06babb7, pushed to fix/issue-1115 (PR #1118 updated automatically).

Changes:

  • internal/audio/download.go (new) - the download/caching logic both managers previously duplicated, now shared:
    • downloadToFile: keeps temp-file + rename and adds a byte-count verification against the response Content-Length so a silently truncated response is never cached.
    • cachedModelStale: a cheap HEAD probe compares the cached file's size with the server's Content-Length; a mismatch drops the entry and re-downloads. Unknown sizes (offline, non-200, no Content-Length) keep trusting the cache; auto_download: false models are never re-fetched behind the user's back. Same-size corruption is out of scope, marked with a ponytail: comment naming the upgrade path (HF tree API lfs.oid sha256 if ever needed).
  • internal/audio/ttsmodel.go + model.go: both the TTS and the whisper manager route cache hits through the staleness check; both download methods deleted in favour of the shared helper (root-cause fix, net -91 lines, no change for offline/manual flows).
  • Tests pinning the scenario: TestEnsureModelsRefetchesTruncatedBackbone (TTS), TestEnsureModelRefetchesTruncatedCache (whisper), TestDownloadToFileRejectsIncompleteDownload, and a cachedModelStale table test including the offline case.
  • Docs: one troubleshooting bullet each in docs/text-to-speech.md and docs/speech-to-text.md.
  • On the Validate() remark: integrity is enforced at execution time (EnsureModels runs before synthesis and now validates the cache); validation intentionally never triggers downloads.

Verification: full task test green, go test ./internal/audio/ -race clean, task precommit:run green (fmt, imports, golangci-lint 0 issues, markdownlint); git status clean and branch in sync with origin.

Model: ollama_cloud/glm-5.3-flash · Exit Code: 0 · Duration: 12m 23s

Tokens: 3,358,186 in · 39,090 out · 3,397,276 total (37 requests)

Tool calls: 50 total · 100% success rate

Traces
Session: 1787962109-d65e8fc4

session (headless, success)                                                 12m16s
├── chat ollama_cloud/glm-5.3-flash                                           4.6s
│   ╰── POST /v1/chat/completions [inference-gateway]                         4.6s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     4.6s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               4.6s
│               ╰── POST /v1/chat/completions [inference-gateway]             4.6s [error: *errors.errorString]
├── execute_tool Read call_2kxr7q0a                                          210µs
├── execute_tool Bash call_ta7z8nv6                                          543ms
├── chat ollama_cloud/glm-5.3-flash                                           4.8s
│   ╰── POST /v1/chat/completions [inference-gateway]                         4.8s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     4.8s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               4.8s
│               ╰── POST /v1/chat/completions [inference-gateway]             4.8s [error: *errors.errorString]
├── execute_tool Read call_hr7vmyuz                                          164µs
├── chat ollama_cloud/glm-5.3-flash                                          15.1s
│   ╰── POST /v1/chat/completions [inference-gateway]                        15.1s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    15.1s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              15.1s
│               ╰── POST /v1/chat/completions [inference-gateway]            15.1s [error: *errors.errorString]
├── execute_tool TodoWrite call_3exqrofv                                      70µs
├── execute_tool Bash call_ht3kmzen                                          291ms
├── chat ollama_cloud/glm-5.3-flash                                           7.7s
│   ╰── POST /v1/chat/completions [inference-gateway]                         7.7s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     7.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               7.7s
│               ╰── POST /v1/chat/completions [inference-gateway]             7.7s [error: *errors.errorString]
├── execute_tool Read call_3d9wh53o                                          258µs
├── execute_tool Bash call_u7ui592s                                          320ms
├── chat ollama_cloud/glm-5.3-flash                                          17.9s
│   ╰── POST /v1/chat/completions [inference-gateway]                        17.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    17.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              17.9s
│               ╰── POST /v1/chat/completions [inference-gateway]            17.9s [error: *errors.errorString]
├── execute_tool Read call_3x7as0mk                                          173µs
├── execute_tool Bash call_ypu0hn9d                                           67ms
├── chat ollama_cloud/glm-5.3-flash                                          51.7s
│   ╰── POST /v1/chat/completions [inference-gateway]                        51.7s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    51.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              51.7s
│               ╰── POST /v1/chat/completions [inference-gateway]            51.7s [error: *errors.errorString]
├── execute_tool Read call_dkk4aspd                                          185µs
├── execute_tool Read call_7d426yu9                                          202µs
├── chat ollama_cloud/glm-5.3-flash                                          1m23s
│   ╰── POST /v1/chat/completions [inference-gateway]                        1m23s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    1m23s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              1m23s
│               ╰── POST /v1/chat/completions [inference-gateway]            1m23s [error: *errors.errorString]
├── chat ollama_cloud/glm-5.3-flash                                           2.7s
│   ╰── 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 Read call_ppie7jaf                                          223µs
├── execute_tool Read call_gldjuet8                                          145µs
├── chat ollama_cloud/glm-5.3-flash                                          58.2s
│   ╰── POST /v1/chat/completions [inference-gateway]                        58.2s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    58.2s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              58.2s
│               ╰── POST /v1/chat/completions [inference-gateway]            58.2s [error: *errors.errorString]
├── execute_tool TodoWrite call_wvtzwbh8                                      73µs
├── execute_tool Write call_0by3onac                                         680µs
├── chat ollama_cloud/glm-5.3-flash                                           8.6s
│   ╰── POST /v1/chat/completions [inference-gateway]                         8.6s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     8.6s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               8.6s
│               ╰── POST /v1/chat/completions [inference-gateway]             8.6s [error: *errors.errorString]
├── execute_tool Read call_rnc6sfwo                                          164µs
├── chat ollama_cloud/glm-5.3-flash                                           4.5s
│   ╰── POST /v1/chat/completions [inference-gateway]                         4.4s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     4.4s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               4.4s
│               ╰── POST /v1/chat/completions [inference-gateway]             4.4s [error: *errors.errorString]
├── execute_tool Edit call_ijatmhig                                          287µs
├── chat ollama_cloud/glm-5.3-flash                                          33.2s
│   ╰── POST /v1/chat/completions [inference-gateway]                        33.2s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    33.1s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              33.1s
│               ╰── POST /v1/chat/completions [inference-gateway]            33.1s [error: *errors.errorString]
├── execute_tool MultiEdit call_6utxmgwu                                     313µs
├── execute_tool MultiEdit call_4sieezho                                     308µs
├── chat ollama_cloud/glm-5.3-flash                                          27.9s
│   ╰── POST /v1/chat/completions [inference-gateway]                        27.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    27.8s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              27.8s
│               ╰── POST /v1/chat/completions [inference-gateway]            27.8s [error: *errors.errorString]
├── execute_tool Write call_qcmklvor                                         699µs
├── chat ollama_cloud/glm-5.3-flash                                          25.4s
│   ╰── POST /v1/chat/completions [inference-gateway]                        25.4s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    25.3s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              25.3s
│               ╰── POST /v1/chat/completions [inference-gateway]            25.3s [error: *errors.errorString]
├── execute_tool Write call_gpvi7twi                                         816µs
├── chat ollama_cloud/glm-5.3-flash                                          28.7s
│   ╰── POST /v1/chat/completions [inference-gateway]                        28.7s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    28.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              28.7s
│               ╰── POST /v1/chat/completions [inference-gateway]            28.7s [error: *errors.errorString]
├── execute_tool Write call_1a28sse7                                         705µs
├── chat ollama_cloud/glm-5.3-flash                                           3.8s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.8s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.8s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.8s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.8s [error: *errors.errorString]
├── execute_tool Read call_k5fhefd0                                          187µs
├── chat ollama_cloud/glm-5.3-flash                                          24.9s
│   ╰── POST /v1/chat/completions [inference-gateway]                        24.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    24.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              24.9s
│               ╰── POST /v1/chat/completions [inference-gateway]            24.9s [error: *errors.errorString]
├── execute_tool MultiEdit call_00qk8bu4                                     303µs
├── execute_tool MultiEdit call_f50pxw5e                                     283µs
├── 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 Bash call_pz0cpi85                                          16.8s
├── chat ollama_cloud/glm-5.3-flash                                           2.8s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.8s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.7s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.7s [error: *errors.errorString]
├── execute_tool Bash call_4c7b7p9v                                          390ms
├── chat ollama_cloud/glm-5.3-flash                                           6.4s
│   ╰── POST /v1/chat/completions [inference-gateway]                         6.4s
│       ╰── 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 TodoWrite call_5d4ltkec                                      72µs
├── execute_tool Bash call_o32gvort                                          1m19s [error: tool_error]
├── chat ollama_cloud/glm-5.3-flash                                           3.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.9s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.9s [error: *errors.errorString]
├── execute_tool Bash call_6g4ewiz1                                           2.1s
├── chat ollama_cloud/glm-5.3-flash                                           2.3s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.2s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.2s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.2s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.2s [error: *errors.errorString]
├── execute_tool Bash call_argssdbu                                           5.7s
├── chat ollama_cloud/glm-5.3-flash                                           3.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.9s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.9s [error: *errors.errorString]
├── execute_tool Grep call_1q15venb                                            2ms
├── 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 Grep call_i4g4kqv9                                            2ms
├── 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 Read call_y7gimssn                                          177µs
├── chat ollama_cloud/glm-5.3-flash                                           8.5s
│   ╰── POST /v1/chat/completions [inference-gateway]                         8.5s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     8.5s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               8.5s
│               ╰── POST /v1/chat/completions [inference-gateway]             8.5s
├── execute_tool Grep call_e74w7owv                                          364µs
├── chat ollama_cloud/glm-5.3-flash                                           3.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.9s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.9s [error: *errors.errorString]
├── execute_tool Read call_gjam7cj1                                          144µs
├── chat ollama_cloud/glm-5.3-flash                                           8.7s
│   ╰── POST /v1/chat/completions [inference-gateway]                         8.7s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     8.6s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               8.6s
│               ╰── POST /v1/chat/completions [inference-gateway]             8.6s [error: *errors.errorString]
├── execute_tool Edit call_5977aeie                                          341µs
├── execute_tool Edit call_35l1xbz3                                          407µs
├── chat ollama_cloud/glm-5.3-flash                                           3.6s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.6s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.6s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.6s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.6s [error: *errors.errorString]
├── execute_tool Bash call_1c2cfrda                                           5.1s
├── chat ollama_cloud/glm-5.3-flash                                           2.9s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.8s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.8s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.8s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.8s [error: *errors.errorString]
├── execute_tool Bash call_pxn216i1                                          1m24s
├── 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_alnpewus                                           11ms
├── execute_tool Bash call_5xvscn9x                                          23.9s
├── chat ollama_cloud/glm-5.3-flash                                           4.8s
│   ╰── POST /v1/chat/completions [inference-gateway]                         4.7s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     4.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               4.7s
│               ╰── POST /v1/chat/completions [inference-gateway]             4.7s [error: *errors.errorString]
├── execute_tool Bash call_ppyodh7y                                           11ms
├── chat ollama_cloud/glm-5.3-flash                                           3.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.0s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.0s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.0s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.0s [error: *errors.errorString]
├── execute_tool Bash call_rb0lskwg                                           5.1s
├── chat ollama_cloud/glm-5.3-flash                                           3.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.9s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.9s [error: *errors.errorString]
├── execute_tool Bash call_189gml62                                           1.5s
├── chat ollama_cloud/glm-5.3-flash                                           7.4s
│   ╰── POST /v1/chat/completions [inference-gateway]                         7.3s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     7.3s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               7.3s
│               ╰── POST /v1/chat/completions [inference-gateway]             7.3s [error: *errors.errorString]
├── execute_tool Bash call_owvcdzn2                                            9ms
├── chat ollama_cloud/glm-5.3-flash                                           5.2s
│   ╰── POST /v1/chat/completions [inference-gateway]                         5.2s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     5.2s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               5.2s
│               ╰── POST /v1/chat/completions [inference-gateway]             5.2s [error: *errors.errorString]
├── execute_tool Memory call_mt5xr10s                                         1.1s
├── chat ollama_cloud/glm-5.3-flash                                          12.2s
│   ╰── POST /v1/chat/completions [inference-gateway]                        12.2s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    12.1s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              12.1s
│               ╰── POST /v1/chat/completions [inference-gateway]            12.1s [error: *errors.errorString]
├── chat ollama_cloud/glm-5.3-flash                                           4.9s
│   ╰── POST /v1/chat/completions [inference-gateway]                         4.8s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     4.8s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               4.8s
│               ╰── POST /v1/chat/completions [inference-gateway]             4.8s [error: *errors.errorString]
├── execute_tool TodoWrite call_wz6erlzc                                      63µs
╰── chat ollama_cloud/glm-5.3-flash                                           7.1s
    ╰── POST /v1/chat/completions [inference-gateway]                         7.1s
        ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     7.1s [error: *errors.errorString]
            ╰── POST /proxy/:provider/*path [inference-gateway]               7.1s
                ╰── POST /v1/chat/completions [inference-gateway]             7.1s [error: *errors.errorString]
Stats
Tool Calls

╭───────────┬───────┬───────┬─────────╮
│ Tool      │ Calls │ Fail% │ Avg     │
├───────────┼───────┼───────┼─────────┤
│ Bash      │ 17    │ 6%    │ 13212ms │
│ Read      │ 12    │ 0%    │ 0ms     │
│ TodoWrite │ 4     │ 0%    │ 0ms     │
│ Write     │ 4     │ 0%    │ 0ms     │
│ MultiEdit │ 4     │ 0%    │ 0ms     │
│ Edit      │ 3     │ 0%    │ 0ms     │
│ Grep      │ 3     │ 0%    │ 1ms     │
│ Memory    │ 1     │ 0%    │ 1103ms  │
╰───────────┴───────┴───────┴─────────╯

Token Usage

╭────────────────────────────┬─────────┬────────┬────────────┬─────────┬──────╮
│ Model                      │ Prompt  │ Cached │ Completion │ Total   │ Cost │
├────────────────────────────┼─────────┼────────┼────────────┼─────────┼──────┤
│ ollama_cloud/glm-5.3-flash │ 3535192 │ 0      │ 48363      │ 3583555 │ -    │
╰────────────────────────────┴─────────┴────────┴────────────┴─────────┴──────╯

Sessions

╭───────────┬──────────┬──────────╮
│ Execution │ Mode     │ Sessions │
├───────────┼──────────┼──────────┤
│ headless  │ headless │ 1        │
╰───────────┴──────────┴──────────╯

Triggered by edenreich · Infer Action · OSS

Downloads are now byte-count verified against the server Content-Length before being cached, and existing cached model files (tts and whisper) are size-checked via a HEAD probe before reuse, so a half-downloaded or manually truncated model is re-fetched instead of failing synthesis on every run. Unknown sizes (offline probe, missing Content-Length) keep trusting the cache, and auto_download: false models are never re-fetched behind the user's back.

Addresses review feedback on issue #1115.
Comment thread internal/agent/tools/text_to_speech.go Resolved
The telemetry decorator overrode only ExecuteTool and embedded the rest of the
interface, so user-typed !! invocations went through ExecuteToolDirect
uninstrumented: a session whose only activity was a direct tool call produced a
root span with no children and no execute_tool duration metric.

Both entry points now delegate to a shared record() so the instrumentation
cannot drift apart again, and direct runs carry infer.tool.direct=true to
distinguish them from the model's own calls in a trace tree.
Qwen3-TTS pulls ~1.4GB of GGUFs on first use and whisper models are not much
smaller, but the status line sat on a motionless "Executing..." for the whole
transfer with no sign anything was happening.

Adds a ToolProgressCallback context port, mirroring the existing
BashOutputCallback, and reports through it from downloadToFile - so whisper
models and the prebuilt ffmpeg/binary fetch are covered too, not just TTS.
Reporting is throttled to once a second, and the reader is left unwrapped when
no callback is present, so headless runs pay nothing.

Also surfaces the underlying error text when a direct execution fails: both the
!! tool and bash paths previously reported a bare "Execution failed" and threw
the reason away.
Qwen3-TTS needs a build that knows the qwen3tts architecture and accepts
-mm/--mmproj for llama-tts. Older packaged builds satisfy neither and fail with
"unknown model architecture: 'qwen3tts'" or "invalid argument: -mm", neither of
which the troubleshooting section mentioned.
Comment thread internal/audio/synthesizer.go Resolved
Comment thread internal/audio/synthesizer.go Resolved
Comment thread internal/audio/synthesizer_test.go Resolved
Comment thread internal/agent/tools/text_to_speech.go Resolved
Comment thread internal/audio/download.go Resolved
Comment thread internal/audio/synthesizer_test.go Resolved
- resolveSamplePath: drop the EvalSymlinks re-check. It fed a fully-resolved
  path into ValidatePathInSandbox, which resolves its own sandbox dirs with
  filepath.Abs; on macOS /tmp and /var are symlinks to /private/..., so every
  voice sample under them was rejected and the package tests failed on darwin.
  The ValidatePathInSandbox call above it is what every other file tool uses.
- tests: require.NoError/require.True before dereferencing result, so a failed
  assertion reports instead of segfaulting the rest of the package.
- resolveBinary: remove the llama-tts auto-download branch. The stt-binaries
  release hosts only ffmpeg and whisper-cli, so it could never succeed and only
  delayed the "not found" error by a wasted round-trip.
- progress: publish ticks through a new non-blocking publishToolProgress.
  publishToolStatusChange keeps its blocking send - dropping a terminal
  failed/completed event would leave a tool showing as "running" forever.
- cachedModelStale: bound the HEAD probe at 5s. It runs before every
  transcription and synthesis on a client with no timeout of its own, and a
  timeout lands on the existing "trust the cache" branch.
- config: honour text_to_speech.require_approval so the tool's approval policy
  can be overridden, matching the image tools.
- docs: cover the feature in README (features bullet plus a Media tools table
  that also picks up the previously undocumented image tools), and note that
  llama-tts is never auto-downloaded and prebuilt ffmpeg is Linux-only.
resolveViperEnvironmentVariables walked struct fields by reflection and its
reflect.Pointer case only recursed into non-nil struct pointers, so every
pointer-to-scalar field was skipped outright. That silenced all 23 *bool
options - every tool's require_approval, plus auto_install and cleanup.

docs/configuration-reference.md has documented
INFER_TOOLS_WRITE_REQUIRE_APPROVAL, INFER_TOOLS_EDIT_REQUIRE_APPROVAL,
INFER_TOOLS_DELETE_REQUIRE_APPROVAL and INFER_TOOLS_BASH_REQUIRE_APPROVAL all
along; setting any of them did nothing. The docs described the intent, the
resolver never implemented it.

- setPointerOption allocates the pointer when the key is set, so an unset
  option stays nil and IsApprovalRequired keeps falling through to the global
  tools.safety.require_approval default. Unset stays distinct from explicit
  false.
- The five duplicated scalar cases collapse into setScalarFromViper, shared
  with the pointer path so the two cannot drift.
- Tests cover the precedence chain in memory (defaults -> config file -> env,
  env wins) and pin that a load with no override leaves the shipped non-nil
  defaults for Write, Edit, Delete and Agent untouched.

Also documents INFER_TEXT_TO_SPEECH_REQUIRE_APPROVAL and notes that approval
variables are tri-state.
@edenreich
edenreich merged commit c8e5c77 into main Aug 30, 2026
1 check passed
@edenreich
edenreich deleted the fix/issue-1115 branch August 30, 2026 02:40
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.184.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

released Shipped in a release

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

[FEATURE] Text to speech and voice to voice (voice cloning) as an opt-in agent tool

2 participants