LLM Web Browsing and File Reading: Who Owns Execution Control
This article explains the difference between client-side orchestration and server-side tools when adding web browsing and file reading to LLM applications. It covers how tool declarations work, why enabling a browsing tool does not guarantee that a search actually happened, how thinking mode affects verification depth, and the preprocessing pipeline required to turn documents into usable context. The goal is to help developers build retrieval-augmented applications that remain both controllable and observable.
1. Background: From Answering to Searching First
Having a model generate an answer directly and having it fetch external material before answering are two tasks with very different engineering complexity. The first only requires sending a message to start inference. The second requires wiring up a retrieval service, downloading pages, extracting the main text, cleaning and truncating it, and then assembling the material back into the conversation context. It gets harder still: when the model decides the information is insufficient, the application must catch the tool result and start another round of calls, forming a loop driven by the client.
A recent set of application-level API capabilities from a cloud vendor moved part of this work from the client to the server: retrieval, link reading, and context assembly can now be coordinated with model inference within the semantics of a single request. Developers still build the application, but they no longer have to implement every browsing action as a client-side loop. This is the core of this article: execution control determines where control actually lives.
2. Two Paths: Client-Side Orchestration vs. Server-Side Tools
Imagine a “product update comparison assistant”: a user sends a link to an official site and asks which issues the latest update resolved. This example only illustrates the flow and does not represent any measured result.
Path A: The client orchestrates everything. The application first identifies the link in the message, issues a web request, handles timeouts, download failures, and anti-scraping measures, extracts and compresses the main text, and then hands the organized material to the model. If the model still needs more information, the application calls the retrieval interface again, catches the result, and enters the next round. The model makes the judgment; the application makes the tools actually run.
Path B: Server-side tools. The client declares the capabilities it allows in the request, and the server handles execution and writes results back. Model judgment and tool execution are still two separate stages; the difference is that developers no longer have to shuttle data between them by hand.
The official documentation usually distinguishes two types of entry points: if you want the model to decide on its own when to go online, use the server-side tools declared inside the conversation; if the application needs to control the query terms itself and get retrieval or fetch results directly, use the standalone retrieval and fetch interfaces. Which path you choose essentially depends on who holds process control.
| Dimension | Client-Side Orchestration | Server-Side Tools |
|---|---|---|
| Process control | Fully controlled by the application | Model participates in decisions |
| Failure retries | Implemented by the application | Depends on server-side policy |
| Observability | Rich in detail | Depends on returned events |
| Implementation cost | Higher | Lower |
3. Declaring a Tool Does Not Force It to Run
Browsing capabilities must be declared explicitly in the request: one for search, one for reading links in the user message. If you only want to read a specific link, you can declare only the latter.
Although these tools look like ordinary functions, you cannot apply all the control methods of custom tools to them. The documentation usually states that you cannot use a tool-selection parameter to force one of them, or the request will be rejected (for example with a 400); whether a search or a link read actually happens is decided by the model based on the question. Setting that parameter to “none” turns these tools off entirely.
This leads to an important product conclusion: a UI showing “browsing enabled” only means the capability is available; it does not prove that this particular answer actually consulted external material. The application should judge based on the returned tool-call events and citation information, rather than slapping a “verified” label on an answer just because its tone sounds confident.
Request declares capabilities → model decides whether to call → tool events and citations returned↑ |└──── application renders state based on this ←┘
4. Behavioral Differences from Thinking Mode
With search enabled, turning thinking mode on or off produces different behavior. When it is off, the model retrieves as the question requires and provides citations. When it is on, the model can repeatedly search, open pages, and locate content across multiple reasoning steps. A multi-step flow offers more chances to keep verifying, but it does not guarantee that every conclusion is automatically correct. So thinking mode raises the upper bound on verification depth, not the lower bound on conclusion accuracy; evaluations still need a separately designed validation set.
5. Reading Files: Turning Them into Usable Material First
File input does not end with “send the file name to the model.” Materials such as PDFs, office documents, and images need text extraction or layout parsing before they can enter the conversation context. Common practices include:
- Format normalization: convert everything into a parseable intermediate representation that preserves paragraph and hierarchy information.
- Layout understanding: detect regions in multi-column, tabular, and mixed text-and-image content to avoid scrambled ordering.
- Chunking and indexing: split semantically and use vector retrieval to control context length.
- Citation traceability: keep page numbers or block identifiers so answers can be traced back to the source.
- Failure fallback: when parsing fails, return a clear message instead of silently dropping the content.
On the engineering side, file parsing, object storage, message queues, and log monitoring can be combined into an asynchronous pipeline so that long-running tasks do not block the main path.
6. Engineering Checklist
- Define responsibility boundaries clearly: choose standalone interfaces when you need precise control over query terms and fetch timing; choose server-side tools when you want low implementation cost.
- Render based on events: show “retrieved / not retrieved” from tool events and citations, and do not guess.
- Design a fallback strategy: fall back to a pure model answer when retrieval fails, and flag the uncertainty.
- Improve observability: log every round of tool calls, latency, and failure reasons to make quality problems easier to locate.
- Control context cost: retrieve first and then assemble for long documents, instead of dumping the full text in indiscriminately.
7. Conclusion
Opening up browsing and file-reading capabilities changes not “whether the model can look things up” but “who is responsible for moving the data.” Understanding where execution control lives, what tool declarations really mean, and the file preprocessing pipeline is what makes it possible to build retrieval-augmented applications that are both controllable and observable.
