Estimate my prompt
estimate_my_promptEstimate whether prompt tokens fit model context, answer headroom, VRAM residency, and cache reuse before sending. Use when prompt grows or before changing context or model.
Instructions
Before sending a prompt: does a prompt of N tokens fit the context the model is loaded with, how much headroom is left for the answer, does the model sit in video memory, and how much of the prompt the cache would reuse, from this client's last turn on that model. Use it when a prompt grows, before raising num_ctx, or before switching model. For what is installed use list_local_models; for what actually happened use read_my_last_turn. model: a pulled model name, "gemma4" or "gemma4:latest"; unknown names get the list of pulled ones. prompt_tokens: 1 to 2000000, your estimate of the prompt size. client: your X-LLMxRay-Client name, so the cache estimate uses your own last turn. Needs Ollama reachable; the cache line needs LLMxRay running (npx llmxray). Under a second. No model is loaded or called.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | A pulled model name, with or without the tag. | |
| client | No | Substring of the client label, for the cache estimate. Omit for the last caller. | |
| prompt_tokens | Yes | Size of the prompt you intend to send, in tokens, 1 to 2000000. |