config/rex_config.schema.json
Rama master · réplica de lectura del repositorio original.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Rex AI Assistant Configuration",
"description": "Runtime configuration for Rex AI Assistant (non-secret settings)",
"type": "object",
"properties": {
"active_profile": {
"type": "string",
"description": "Active profile name to load from the profiles directory",
"default": "default"
},
"profiles_dir": {
"type": "string",
"description": "Directory containing profile JSON files",
"default": "profiles"
},
"audio": {
"type": "object",
"description": "Audio device and sampling configuration",
"properties": {
"input_device_index": {
"type": ["integer", "null"],
"description": "Audio input device index (null for system default)",
"minimum": 0
},
"output_device_index": {
"type": ["integer", "null"],
"description": "Audio output device index (null for system default)",
"minimum": 0
},
"sample_rate": {
"type": "integer",
"description": "Audio sample rate in Hz",
"default": 16000,
"minimum": 8000,
"maximum": 48000
}
},
"required": ["sample_rate"]
},
"wakeword": {
"type": "object",
"description": "Wake word detection settings",
"properties": {
"backend": {
"type": "string",
"description": "Wake word detection backend (openwakeword, custom_onnx, custom_embedding)",
"default": "openwakeword"
},
"wakeword": {
"type": "string",
"description": "Wake word phrase",
"default": "rex"
},
"keyword": {
"type": ["string", "null"],
"description": "Alternative wake word keyword (overrides wakeword if set)"
},
"model_path": {
"type": ["string", "null"],
"description": "Custom wake word model path for custom_onnx backend"
},
"embedding_path": {
"type": ["string", "null"],
"description": "Custom wake word embedding path for custom_embedding backend"
},
"fallback_to_builtin": {
"type": "boolean",
"description": "Fall back to a built-in wake word when custom model is missing",
"default": true
},
"fallback_keyword": {
"type": "string",
"description": "Preferred built-in fallback keyword",
"default": "hey jarvis"
},
"threshold": {
"type": "number",
"description": "Detection threshold (0.0 to 1.0)",
"default": 0.5,
"minimum": 0,
"maximum": 1
},
"window": {
"type": "number",
"description": "Detection window in seconds",
"default": 1.0,
"minimum": 0.1
},
"poll_interval": {
"type": "number",
"description": "Poll interval in seconds",
"default": 0.01,
"minimum": 0.001
},
"wake_sound_path": {
"type": ["string", "null"],
"description": "Path to wake acknowledgment sound file"
}
}
},
"models": {
"type": "object",
"description": "AI model configuration",
"properties": {
"llm_provider": {
"type": "string",
"description": "LLM provider (transformers, openai, openrouter, anthropic, ollama)",
"default": "transformers"
},
"llm_backend": {
"type": ["string", "null"],
"description": "LLM backend (alias for llm_provider)"
},
"llm_model": {
"type": ["string", "null"],
"description": "LLM model name or path"
},
"llm_max_tokens": {
"type": "integer",
"description": "Maximum tokens to generate",
"default": 120,
"minimum": 1
},
"llm_temperature": {
"type": "number",
"description": "Sampling temperature",
"default": 0.7,
"minimum": 0,
"maximum": 5
},
"autonomy_mode": {
"type": "string",
"description": "Assistant autonomy level used by Settings > AI and runtime planning",
"enum": ["manual", "supervised", "full-auto"],
"default": "manual"
},
"llm_top_p": {
"type": "number",
"description": "Top-p (nucleus) sampling parameter",
"default": 0.9,
"minimum": 0,
"maximum": 1
},
"llm_top_k": {
"type": ["integer", "null"],
"description": "Top-k sampling parameter",
"minimum": 1
},
"llm_seed": {
"type": ["integer", "null"],
"description": "Random seed for reproducibility"
},
"stt_model": {
"type": "string",
"description": "Whisper model size (tiny, base, small, medium, large)",
"default": "base"
},
"stt_device": {
"type": "string",
"description": "Device for STT model (cpu, cuda)",
"default": "cpu"
},
"tts_provider": {
"type": "string",
"description": "TTS provider (xtts, edge, piper, pyttsx3)",
"default": "xtts"
},
"tts_model": {
"type": ["string", "null"],
"description": "TTS model name"
},
"tts_voice": {
"type": ["string", "null"],
"description": "TTS voice name"
},
"tts_speed": {
"type": "number",
"description": "XTTS speaking rate multiplier",
"default": 1.08,
"minimum": 0.5,
"maximum": 2.0
},
"windows_tts_voice_index": {
"type": ["integer", "null"],
"description": "Windows TTS voice index"
}
}
},
"runtime": {
"type": "object",
"description": "Runtime behavior settings",
"properties": {
"log_level": {
"type": "string",
"description": "Logging level",
"enum": ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
"default": "INFO"
},
"file_logging_enabled": {
"type": "boolean",
"description": "Enable file logging",
"default": false
},
"background_voice_enabled": {
"type": "boolean",
"description": "Start persistent background wake-word listening after setup; false unless the household explicitly opts in",
"default": false
},
"transcripts_enabled": {
"type": "boolean",
"description": "Enable conversation transcripts",
"default": true
},
"transcripts_dir": {
"type": "string",
"description": "Directory for transcript files",
"default": "transcripts"
},
"active_user": {
"type": ["string", "null"],
"description": "Active user profile name"
},
"user_id": {
"type": "string",
"description": "User identifier",
"default": "default"
},
"memory_max_turns": {
"type": "integer",
"description": "Maximum conversation turns to remember",
"default": 50,
"minimum": 1
},
"warm_runtime_max_cost_mb": {
"type": "number",
"description": "Approximate retained-cache accounting ceiling for managed warm components; not an exact RSS/VRAM limit",
"default": 6144.0,
"minimum": 0
},
"warm_runtime_idle_timeout_s": {
"type": "number",
"description": "Idle seconds before an unused managed warm component becomes evictable",
"default": 900.0,
"minimum": 0
},
"command_duration": {
"type": "number",
"description": "Command recording duration in seconds",
"default": 5.0,
"minimum": 0.5
},
"capture_seconds": {
"type": "number",
"description": "Audio capture duration in seconds",
"default": 5.0,
"minimum": 0.5
},
"detection_frame_seconds": {
"type": "number",
"description": "Detection frame duration in seconds",
"default": 1.0,
"minimum": 0.1
},
"conversation_export": {
"type": "boolean",
"description": "Enable conversation export",
"default": true
},
"speak_language": {
"type": "string",
"description": "TTS language code",
"default": "en"
}
}
},
"voice_identity": {
"type": "object",
"description": "Voice identity speaker-recognition scaffolding settings",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable voice identity before STT in the voice loop",
"default": false
},
"accept_threshold": {
"type": "number",
"description": "Cosine similarity threshold for recognized speaker",
"default": 0.85,
"minimum": 0,
"maximum": 1
},
"review_threshold": {
"type": "number",
"description": "Cosine similarity threshold for review decision",
"default": 0.65,
"minimum": 0,
"maximum": 1
},
"embedding_dim": {
"type": "integer",
"description": "Expected embedding vector dimensionality",
"default": 192,
"minimum": 1
},
"model_id": {
"type": "string",
"description": "Identifier for active embedding model",
"default": "synthetic"
}
}
},
"search": {
"type": "object",
"description": "Web search configuration",
"properties": {
"providers": {
"type": "string",
"description": "Comma-separated list of search providers",
"default": "serpapi,brave,duckduckgo,google"
}
}
},
"home_assistant": {
"type": "object",
"description": "Home Assistant integration",
"properties": {
"base_url": {
"type": ["string", "null"],
"description": "Home Assistant base URL"
},
"verify_ssl": {
"type": "boolean",
"description": "Verify SSL certificates",
"default": true
},
"timeout": {
"type": "number",
"description": "Request timeout in seconds",
"default": 10.0,
"minimum": 1
}
}
},
"ollama": {
"type": "object",
"description": "Ollama configuration",
"properties": {
"base_url": {
"type": "string",
"description": "Ollama base URL",
"default": "http://localhost:11434"
},
"use_cloud": {
"type": "boolean",
"description": "Use cloud-hosted Ollama",
"default": false
}
}
},
"openai": {
"type": "object",
"description": "OpenAI configuration",
"properties": {
"model": {
"type": ["string", "null"],
"description": "OpenAI model name"
},
"base_url": {
"type": ["string", "null"],
"description": "OpenAI API base URL (for compatible APIs)"
}
}
},
"openrouter": {
"type": "object",
"description": "OpenRouter configuration using its OpenAI-compatible API",
"properties": {
"model": {
"type": ["string", "null"],
"description": "OpenRouter model slug, for example openai/gpt-4o"
},
"base_url": {
"type": "string",
"description": "Official OpenRouter API base URL",
"const": "https://openrouter.ai/api/v1",
"default": "https://openrouter.ai/api/v1"
}
}
},
"api": {
"type": "object",
"description": "API server configuration",
"properties": {
"rate_limit": {
"type": "string",
"description": "Rate limit (e.g., '30/minute')",
"default": "30/minute"
},
"allowed_origins": {
"type": "array",
"description": "Allowed CORS origins",
"items": {
"type": "string"
},
"default": ["*"]
}
}
},
"ui": {
"type": "object",
"description": "User interface settings",
"properties": {
"start_minimized": {
"type": "boolean",
"description": "Start GUI minimized",
"default": false
}
}
},
"model_routing": {
"type": "object",
"description": "Maps task categories to LLM model identifiers. Empty string means fall back to models.llm_model.",
"properties": {
"default": {
"type": "string",
"description": "Default model for unclassified requests (empty = use models.llm_model)",
"default": ""
},
"coding": {
"type": "string",
"description": "Model for code generation and debugging tasks",
"default": ""
},
"reasoning": {
"type": "string",
"description": "Model for complex multi-step reasoning tasks",
"default": ""
},
"search": {
"type": "string",
"description": "Model for web search and research tasks",
"default": ""
},
"vision": {
"type": "string",
"description": "Model for image description and visual tasks",
"default": ""
},
"fast": {
"type": "string",
"description": "Model for simple factual questions requiring low latency",
"default": ""
}
}
}
},
"required": ["audio", "wakeword", "models", "runtime"]
}