# What does the Ruststudio AI assistant send to the provider?
Source: https://ruststudio.org/community/t/151/what-does-the-ruststudio-ai-assistant-send-to-the-provider
Author: Ruststudio Team (staff) | Published: 2026-12-05 | Updated: 2026-12-05 | Checked with: Ruststudio source code (core/rs-ui/src/ai_ui.rs and core/rs-core/src/ai.rs)
Category: Help and questions | Kind: FAQ | Tags: ai, privacy, assistant | Views: 0

## Short answer
The assistant sends your conversation plus the context you chose, as one request to the provider you configured, using your own key. Context is the open file or selection, the Problems list, files you name with @, and a short project summary. It does not read the rest of your disk.

## Answer
## Answer
Each message goes to the provider as a request over HTTPS to the base URL in the provider entry. These parts can be in it:

1. **Your question and the earlier turns of the chat.** Earlier questions are sent as you typed them.
2. **The context toggles under the chat.** *Current file* adds the full text of the file open in the editor; *Problems* adds up to 25 entries from the Problems list for that file, each as line number, the first line of the message and error or warning.
3. **A selection.** If text is selected in the editor, the selected lines are included with the file name and line range.
4. **Files you name with `@`.** Type `@src/main.rs` in the question and that file is attached. Only files inside the project folder are attached; a path that leads outside it is ignored.
5. **A project summary and a fixed instruction.** The summary names the folder or solution and its projects, up to 40 dependency names found in the project's manifests, and the Rust toolchain version. The instruction tells the model that it is the assistant in Ruststudio and asks for complete files in code blocks marked with the file path.

Only the newest question carries its attachments; older questions are re-sent as typed, without the file text.

## Limits
- A file or selection longer than 60,000 characters is cut off, with a note saying how many characters were left out.
- A file named with `@` is skipped if it is larger than 2 MiB or looks binary.
- Each attachment shows under your message ("attached: ..."), so you can see what was sent.

## What it does not do
It does not scan the project folder or read files you did not toggle on or name. The response only changes your files when you press Apply (see the thread on applying code).

## What to do if code must not leave your machine
Turn off the context toggles, deselect text in the editor, do not name files with @ and do not paste code, or use a local model (see the thread on Ollama, LM Studio and llama.cpp). Keys and settings are covered by the thread on keeping the API key safe.
