x711_llm_routing
Routes a prompt to the best available LLM. Two backends:
DEFAULT — Hugging Face (Qwen2.5-7B, free with API key)
PREMIUM — OpenVecta (GLM-5.2 and more, set provider:'openvecta')
Use ONLY when you need external LLM help. Never for things you can answer from context.
Returns: { response: string, model: string, provider: string, tokens_used?: number }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model name. For OpenVecta: 'glm-5.2' (default). For HuggingFace: 'Qwen/Qwen2.5-7B-Instruct' (default). Setting a glm-* model automatically routes to OpenVecta. | |
| query | No | Alias for prompt (use either prompt or query). | |
| prompt | No | Complete prompt with all necessary context. The model has no memory of prior tool calls. Max ~4000 tokens recommended. | |
| system | No | Optional system prompt injected before the user message. | |
| provider | No | 'huggingface' (default, free with key) or 'openvecta' (premium inference via x711 × OpenVecta). | |
| max_tokens | No | Max tokens to generate. Default 512, max 4096. Size to your workload — cost ceiling is based on this value. | |
| temperature | No | Sampling temperature 0-2. Default 0.7. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| model | Yes | ||
| prefer | No | ||
| tokens_used | No |