feat(stt): mode texte + sélection de modèle (client→serveur par requête) (#7)

Serveur : /v1/ask accepte un model optionnel (validé contre STT_ALLOWED_MODELS),
nouvel endpoint GET /v1/models (défaut + alias autorisés). Pas de switch global.

Client : 'stt --text' (chat texte simple sans micro/HUD), '--model hermes|claude|qwen|opus'
(noms courts → alias LiteLLM), commandes /model et /models en mode texte. Le modèle
choisi est envoyé au serveur à chaque requête (voix comme texte).


Claude-Session: https://claude.ai/code/session_013FmcxGsyXZXogiAHQLjnZT

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
ALI YESILKAYA 2026-06-17 13:36:06 +02:00 committed by GitHub
parent 47936b0088
commit bcdb4f8b2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 146 additions and 25 deletions

View file

@ -12,9 +12,9 @@ import httpx
from stt_server.config import settings
async def ask(text: str) -> str:
async def ask(text: str, model: str | None = None) -> str:
payload = {
"model": settings.model,
"model": model or settings.model,
"messages": [
{"role": "system", "content": settings.system_prompt},
{"role": "user", "content": text},