mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-17 02:05:22 -04:00
fix(models): clear stale speech endpoint settings (#1196)
This commit is contained in:
@@ -33,11 +33,40 @@ from routes.model_routes import (
|
||||
_classify_endpoint,
|
||||
_probe_endpoint,
|
||||
_truthy,
|
||||
_speech_settings_using_endpoint,
|
||||
_clear_speech_settings_for_endpoint,
|
||||
_PROVIDER_CURATED,
|
||||
)
|
||||
from src.llm_core import ANTHROPIC_MODELS
|
||||
|
||||
|
||||
# ── speech endpoint settings ──
|
||||
|
||||
def test_speech_endpoint_dependents_include_stt():
|
||||
settings = {"stt_provider": "endpoint:voice"}
|
||||
assert _speech_settings_using_endpoint(settings, "voice") == ["Speech to Text"]
|
||||
|
||||
|
||||
def test_clear_speech_endpoint_settings_resets_tts_and_stt():
|
||||
settings = {
|
||||
"tts_provider": "endpoint:voice",
|
||||
"tts_model": "custom-tts",
|
||||
"stt_provider": "endpoint:voice",
|
||||
"stt_model": "custom-stt",
|
||||
}
|
||||
|
||||
assert _clear_speech_settings_for_endpoint(settings, "voice") == [
|
||||
"Text to Speech",
|
||||
"Speech to Text",
|
||||
]
|
||||
assert settings == {
|
||||
"tts_provider": "disabled",
|
||||
"tts_model": "tts-1",
|
||||
"stt_provider": "disabled",
|
||||
"stt_model": "base",
|
||||
}
|
||||
|
||||
|
||||
# ── _match_provider_curated ──
|
||||
|
||||
class TestMatchProviderCurated:
|
||||
|
||||
Reference in New Issue
Block a user