Skip to content

fix(tts): sync canonical/alias fields to prevent voice/model/base URL rollback#968

Open
dbmizrahi wants to merge 4 commits intonextlevelbuilder:devfrom
dbmizrahi:fix/voice-vs-voice_id-ignored-for-tts
Open

fix(tts): sync canonical/alias fields to prevent voice/model/base URL rollback#968
dbmizrahi wants to merge 4 commits intonextlevelbuilder:devfrom
dbmizrahi:fix/voice-vs-voice_id-ignored-for-tts

Conversation

@dbmizrahi
Copy link
Copy Markdown
Contributor

@dbmizrahi dbmizrahi commented Apr 19, 2026

Summary

This PR fixes a TTS settings persistence bug where updated provider values (voice/model/base URL) could revert after page reload. The fix keeps canonical and compatibility alias fields synchronized in the UI payload so backend resolution cannot persist stale values.

Type

  • Feature
  • Bug fix
  • Hotfix (targeting main)
  • Refactor
  • Docs
  • CI/CD

Target Branch

dev

Checklist

  • go build ./... passes
  • go build -tags sqliteonly ./... passes (if Go changes)
  • go vet ./... passes
  • Tests pass: go test -race ./...
  • Web UI builds: cd ui/web && pnpm build (if UI changes)
  • No hardcoded secrets or credentials
  • SQL queries use parameterized $1, $2 (no string concat)
  • New user-facing strings added to all 3 locales (en/vi/zh)
  • Migration version bumped in internal/upgrade/version.go (if new migration)

Test Plan

  1. Open TTS settings page.
  2. Select provider elevenlabs and change:
    • voice
    • model
    • base URL
  3. Save settings.
  4. Reload the page.
  5. Verify values remain unchanged (no rollback).
  6. Repeat with provider minimax for voice/model.

Validation performed in this fix:

  • ui/web/src/pages/tts/tts-page.tsx lint: no errors/warnings.
  • ui/web/src/pages/tts/sections/credentials-section.tsx lint: no errors/warnings.

Implementation notes covered by this PR:

  • voice and voice_id are updated together for elevenlabs and minimax.
  • model and model_id are updated together for elevenlabs and minimax.
  • api_base and base_url are updated together for elevenlabs.
  • Read-side fallback now tolerates either canonical or alias field when populating selectors.

@dbmizrahi dbmizrahi force-pushed the fix/voice-vs-voice_id-ignored-for-tts branch from aaa892a to f4ec1c4 Compare April 19, 2026 20:31
@dbmizrahi
Copy link
Copy Markdown
Contributor Author

Since I don't have permissions to re-run the PR checks I can only confirm that integration test that failed in the pipeline has passed on my machine:

go test -race -tags integration ./tests/integration -run TestOpenAIChat_AbortContextCancel -count=1
ok      github.com/nextlevelbuilder/goclaw/tests/integration    2.072s

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant