Analysis flow
CTI data collection
The appropriate analysis function (
analyzeIP, analyzeDomain, or analyzeHash) queries the relevant sources and returns an IocAnalysisResult containing the raw API responses and any SourceWarning values from failed sources.Prompt construction
buildPrompt assembles a structured system prompt that includes the IoC value, its type, the full toolResult JSON, and any warnings. The model is instructed to respond in Spanish and follow a specific Markdown template.OpenRouter request
The prompt is sent to
https://openrouter.ai/api/v1/chat/completions as a streaming chat completion request. Temperature is set to 0.2 and max_tokens to 700 to keep responses focused and deterministic.Verdict format
The model always responds in Spanish using the following Markdown structure:| Field | Possible values | Description |
|---|---|---|
Veredicto | Malicioso, Sospechoso, Benigno | Overall threat classification. |
Confianza | Baja, Media, Alta | The model’s confidence in the verdict. |
Resumen | Free text | A short summary of the analysis findings. |
Motivos | Bullet list | Specific observations that support the verdict. |
Acciones recomendadas | Bullet list | Recommended response or mitigation actions. |
The verdict is always in Spanish regardless of the language you use to interact with the platform. This is enforced directly in the prompt.
SSE event stream
The server sends events using thetext/event-stream content type. Each event follows the format event: <name>\ndata: <json>\n\n.
- meta
- model
- chunk
- done
- error
Sent once at the start of the stream, before any content. Contains metadata about the request.
warnings is omitted when there are no source failures.Model routing
CyberThreat AI uses OpenRouter as a unified gateway to multiple LLM providers. The model is selected per request from the catalog of allowed models.Available models
| Model ID | Label | Provider |
|---|---|---|
openrouter/auto | Default — OpenRouter (Auto) | OpenRouter |
openrouter/free | OpenRouter (Free) | OpenRouter |
liquid/lfm-2.5-1.2b-instruct-20260120:free | LiquidAI: LFM2.5-1.2B-Instruct (Free) | Liquid |
stepfun/step-3.5-flash:free | StepFun: Step 3.5 Flash (Free) | StepFun |
google/gemma-3-4b-it:free | Google: Gemma 3 4B (Free) | Google AI Studio |
Auto and free routing
When you selectopenrouter/auto or openrouter/free, OpenRouter itself chooses the actual model to serve the request. The chosen model is reported back in the first streaming chunk via the model field of the parsed payload.
CyberThreat AI captures this value and emits a model SSE event so the UI can display the real model name rather than the routing alias.