LLM route detection: find every route that calls a model.
Source intelligence marks the API routes whose handlers send a prompt to a language model, and the ones that also hand the model tools, so AI endpoint testing starts from a map instead of a guess.
LLM route detection finds the API routes whose handler code calls a language model. NightVision's source intelligence reads handlers written in Python, C#, Go, JavaScript, TypeScript, Ruby and PHP, and tags each route that reaches a model call with llm-query, adding llm-tool-call when that call hands the model tools it can invoke. The tags are written into the OpenAPI spec it generates, so you know which routes to put in front of NightVision's AI endpoint tests.
Security cannot test what it cannot find.
AI features ship in every team now: a support chat here, a ticket summarizer there, a search box that answers in sentences. Most arrive as one more JSON route, and from the outside nothing marks it as model-backed. A model that reads untrusted input can be steered, and one that can fetch URLs or call functions can be steered into acting from inside your network. Before anyone can test that, someone has to know where the model calls are. The code already says.
A model call, and a model that can act
Tagged where your team already looks
Each operation in the generated OpenAPI spec carries the tags under the x-nv-dast-sinks extension, beside the other things its handler does, such as SQL queries and outbound requests.
Seven languages, the SDKs teams actually use
Each language lists the SDK families it models today, on the frameworks source intelligence extracts routes from.
Python
Django, Django REST Framework, Flask, FastAPI, Starlette, connexion
C#
ASP.NET Core, ASP.NET MVC and Web API 2
Go
net/http with chi, gorilla/mux and httprouter, gin, echo, Fiber v2
JavaScript and TypeScript
Express, Fastify, NestJS
PHP
Laravel
Ruby
Rails, Grape
Mistral and Cohere in JavaScript and TypeScript are read through the Vercel AI SDK and LangChain providers. A route that reaches a model only through an SDK not listed here carries no tag, and a missing tag means unknown, not model-free.
A reachability marker, not a verdict
A model call is reachable from this route
The tag says the route's handler reaches a call that sends a prompt to a model, and with llm-tool-call, that the call hands the model tools. It does not say that request input reaches the prompt, which parameter carries it, or what the model was told to do. That is what testing the running endpoint is for.
Calls that send no prompt to answer
- Embeddings and moderation
- Image, audio and video generation and transcription
- Management calls such as files, models, fine-tuning and token counting
- Batches and queued jobs that run outside the request
- Raw HTTP posts to a provider's API, tagged
outbound-requestinstead
Marked from source, proven against the running app
The tags feed NightVision's AI endpoint tests, part of NightVision DAST. Source intelligence says where the model calls are. The scan proves what they can be made to do.
Mark
Source intelligence tags the model-backed routes in the generated spec.
Scan
The DAST scan tests the running app and flags the endpoints it recognizes as model-backed.
Steer
AI endpoint tests try to steer the model into a callback to an attacker or a read of the cloud metadata service.
Prove
A finding is reported only with proof: the out-of-band callback arrived, or the response came from the metadata service itself.
Part of source intelligence in the NightVision CLI
LLM route detection runs as part of nightvision openapi extract, on a laptop or in your pipeline, and the tags land in the generated API spec. By default the spec is uploaded to NightVision; add --no-upload to send nothing. Your source code is never uploaded, and no LLM reads it. The same run maps every route your code serves, documented or not, through source intelligence.
More on AI endpoints
LLM route detection questions, answered.
What is LLM route detection?
Finding, from source code, the API routes whose handlers call a language model. NightVision tags each one with llm-query, and with llm-tool-call when that call also hands the model tools it can invoke.
Which languages and SDKs are covered?
Python, C#, Go, JavaScript, TypeScript, Ruby and PHP. The SDKs include OpenAI, Azure OpenAI, Anthropic, Google Gen AI, Amazon Bedrock, LangChain, LangGraph, litellm, the Vercel AI SDK, Microsoft.Extensions.AI, Semantic Kernel, RubyLLM, Prism, the Laravel AI SDK and openai-php, with the exact set depending on the language.
Does a tag mean the route is vulnerable?
No. A tag says a model call is reachable from the route's handler, not that request input reaches the prompt or that the model can be misused. NightVision's AI endpoint tests check the running app and report a finding only with proof.
Why does llm-tool-call matter?
A model handed tools can act, not only answer: fetch a URL, query data or call a function. If it can be steered, that action runs from your server with your server's access, so these are the routes to test first.
What is not tagged?
Calls that send no prompt for a model to answer: embeddings, moderation, image, audio and video, token counting, and management calls such as files, models and fine-tuning. Batches and other jobs that run outside the request are not tagged either.
Does a route without the tag make no model calls?
Not necessarily. A missing tag means no modelled call was found, for example when the handler uses an SDK that is not covered yet or hands the work to a background job. Treat it as unknown, not as model-free.
Map your AI endpoints, then prove what they can do.
Mark every model-backed route from source, then test them with NightVision's AI endpoint tests, reported only with proof.