[PR #1207] [MERGED] Fix refactor TTS provider voice model hint #4981

Closed
opened 2026-10-22 04:12:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1207
Author: @cha1latte
Created: 5/25/2026
Status: ✅ Merged
Merged: 5/25/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/refactor-issue-1131-tts-voices-model


📝 Commits (2)

  • 84e68f9 Fix refactor TTS provider voice model hint
  • 5ce3713 Document TTS voice model URL helper

📊 Changes

1 file changed (+129 additions, -1 deletions)

View changed files

📝 src-tauri/src/commands/storage/integrations/tts.rs (+129 -1)

📄 Description

Linked issue

Closes #1131

Why this change

OpenAI-compatible TTS providers can host multiple voice models behind the same baseUrl. On the refactor branch, the native TTS voice lookup still requested {baseUrl}/audio/voices without passing the saved model, so model-specific providers such as mlx-audio could return the wrong catalog or reject the request and force Marinara back to the built-in OpenAI voice list.

This ports the staging PR's intended behavior into the refactor branch's Tauri/Rust TTS integration path.

What changed

  • Added openai_voices_url() in src-tauri/src/commands/storage/integrations/tts.rs to append the trimmed configured model as ?model=... for OpenAI-compatible voice discovery.
  • Kept blank model values as the legacy {baseUrl}/audio/voices request.
  • Added Rust regression coverage for a local model-gated voice endpoint, encoded model IDs, and the blank-model negative control.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

Codex verification performed:

  • Reproduced the refactor-branch failure before the production fix with cargo test --manifest-path src-tauri/Cargo.toml openai_compatible_voice_lookup_passes_configured_model; the local model-gated voice endpoint rejected the request without ?model=, and Marinara returned fromProvider: false.
  • Ran cargo test --manifest-path src-tauri/Cargo.toml storage_commands::integrations::tts::tests; all 3 TTS integration tests passed.
  • Ran pnpm check; architecture, frontend typecheck, Rust cargo check, and docs check passed.
  • Ran git diff --check; no whitespace errors.
  • Ran the local Marinara proof gate against scratch/bugfix-verification.json; it passed.

Not manually verified against a real external OpenAI-compatible TTS server or api.openai.com from this environment.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

No docs or version files changed.

UI evidence (if applicable)

No UI code changed. This is a native TTS command/provider request change verified with a Rust integration harness.

Summary by CodeRabbit

  • Bug Fixes

    • Improved TTS voice lookup by properly handling model configuration parameters.
  • Tests

    • Added comprehensive test coverage for TTS voice URL handling and model parameter encoding.

Review Change Stack


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1207 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/25/2026 **Status:** ✅ Merged **Merged:** 5/25/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/refactor-issue-1131-tts-voices-model` --- ### 📝 Commits (2) - [`84e68f9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/84e68f918b9caf1cc3a7ff7b1bfbd5d535a53431) Fix refactor TTS provider voice model hint - [`5ce3713`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5ce3713a0ba7eb58c3ed5d63e06c2fceda01a3a6) Document TTS voice model URL helper ### 📊 Changes **1 file changed** (+129 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/integrations/tts.rs` (+129 -1) </details> ### 📄 Description ## Linked issue Closes #1131 ## Why this change OpenAI-compatible TTS providers can host multiple voice models behind the same `baseUrl`. On the refactor branch, the native TTS voice lookup still requested `{baseUrl}/audio/voices` without passing the saved model, so model-specific providers such as mlx-audio could return the wrong catalog or reject the request and force Marinara back to the built-in OpenAI voice list. This ports the staging PR's intended behavior into the refactor branch's Tauri/Rust TTS integration path. ## What changed - Added `openai_voices_url()` in `src-tauri/src/commands/storage/integrations/tts.rs` to append the trimmed configured model as `?model=...` for OpenAI-compatible voice discovery. - Kept blank model values as the legacy `{baseUrl}/audio/voices` request. - Added Rust regression coverage for a local model-gated voice endpoint, encoded model IDs, and the blank-model negative control. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Codex verification performed: - Reproduced the refactor-branch failure before the production fix with `cargo test --manifest-path src-tauri/Cargo.toml openai_compatible_voice_lookup_passes_configured_model`; the local model-gated voice endpoint rejected the request without `?model=`, and Marinara returned `fromProvider: false`. - Ran `cargo test --manifest-path src-tauri/Cargo.toml storage_commands::integrations::tts::tests`; all 3 TTS integration tests passed. - Ran `pnpm check`; architecture, frontend typecheck, Rust cargo check, and docs check passed. - Ran `git diff --check`; no whitespace errors. - Ran the local Marinara proof gate against `scratch/bugfix-verification.json`; it passed. Not manually verified against a real external OpenAI-compatible TTS server or api.openai.com from this environment. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) No docs or version files changed. ## UI evidence (if applicable) No UI code changed. This is a native TTS command/provider request change verified with a Rust integration harness. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved TTS voice lookup by properly handling model configuration parameters. * **Tests** * Added comprehensive test coverage for TTS voice URL handling and model parameter encoding. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/1207?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:12:13 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4981
No description provided.