5 Commits
Author SHA1 Message Date
BigBodyCobain 1d29516c1a Connect hosted and local AI models with brokered spoken commands 2026-10-14 01:31:51 -06:00
BigBodyCobain c97dd6b164 Bind voice gateway credentials to the saved provider destination 2026-10-13 22:43:12 -06:00
BigBodyCobain 42a13b651e voice-agent fix: gemini-only text chat via OpenAI-compat endpoint, key clear/replace, fresh Live model list
- chat_completion(): when the resolved provider is gemini_live and VOICE_CHAT_MODEL is empty, dial Google's OpenAI-compatible endpoint (https://generativelanguage.googleapis.com/v1beta/openai/chat/completions, Bearer <VOICE_GEMINI_API_KEY>) instead of failing chat_unconfigured — fixes the typed composer/hud-summary/turn legs for Gemini-only configs. New Settings field VOICE_GEMINI_CHAT_MODEL (default gemini-2.5-flash).
- POST /api/voice/provider accepts {clear:true}: removes the provider's persisted key + its model/URL rows from data/operator_api_keys.env via new _remove_env_values helper, syncs live env with env-var-wins honesty, returns the fresh status shape. Saving again overwrites (upsert verified).
- Curated Gemini Live list refreshed: gemini-3.1-flash-live-preview leads, gemini-2.0-flash-live-001 secondary, gemini-3.5-live-translate-preview added; VOICE_GEMINI_MODEL default updated.
- Deterministic fallback is honest: a realtime-armed console says 'Voice provider armed (<id>) — text chat unavailable right now' instead of 'No model configured'.
- VoiceSetupCard: Replace-key note + Clear button for already-configured providers; i18n keys added in en/fr/fa/zh-CN.
- Tests: compat-dial contract (URL/Bearer/model), clear rows re-read, upsert replace, curated list; frontend clear-button + prefill coverage.
2026-08-26 04:40:42 -06:00
BigBodyCobain 250f5b4570 voice-agent ux: GET /api/voice/models — live model discovery for compat gateways (OpenRouter/Ollama {base}/models with /v1 fallback, no double-/v1), curated lists for OpenAI/Gemini, honest degradation; 6 tests 2026-08-26 02:36:10 -06:00
BigBodyCobain 7bb73bd483 voice-agent ux: first-class enablement API (opt-in + provider setup endpoints)
POST /api/voice/opt-in and POST /api/voice/provider persist through the sanctioned operator-keys writer (_write_env_values on data/operator_api_keys.env), cache-clear get_settings, and report fresh effective state. Env-var-wins honesty preserved verbatim (managedByEnvironment + note when a real process env var governs a key). VOICE_GEMINI_API_KEY joins API_REGISTRY; behavioral opt-in/coordinate keys ride ALLOWED_ENV_KEYS via an explicit frozenset union (documented why not registry rows). Both endpoints sit inside the MESH_ONLY guard block; responses never echo key material.
2026-08-26 00:53:57 -06:00