1,012 B
OpenLux cost-first persona model router
The router uses the OpenAI-compatible endpoint at https://api.openlux.ai/v1. Its API key is read at call time from macOS Keychain service ai.openlux.api, account guanghu-persona-agent-router; no secret is stored in this repository.
Each call must carry the active parent persona, derived child Agent ID, controller, channel, job role, bounded authority and task. The router tries the configured low-cost healthy models first and escalates only after a transport, empty-response or downstream validation failure. Provider pricing is not exposed by the current /models response, so the configured order is explicitly a heuristic rather than a verified price table.
The default remains COST_FIRST. An explicitly registered reasoning advisor may send
selection_policy=QUALITY_FIRST with complexity=HIGH; this reverses the eligible tier order so a high-tier model is tried first. It does not grant execution, write, approval, or persona-cognition authority.