LLM APIs: Moving from Model Capabilities to Application Capabilities

    As LLM APIs add provider-hosted tools, the integration burden shifts from application code to service behavior. This article examines common hosted capabilities, compares client-side orchestration with server-side execution, outlines evaluation criteria such as latency, reliability, citations, compliance, cost, and controllability, and offers practical guidance for rollout and production use.

    1. Background: Development Cost Is Shifting from the Model to the Pipeline

    For some time, large language model APIs have primarily provided text generation. Developers receive the model’s inference result for the input text. Questions such as where the context comes from, how external information is retrieved, and how user-uploaded files are converted to text still need to be solved by the application. A usable intelligent assistant is usually much more complex than the model call itself.

    Consider a common assistant with search, document Q&A, and voice interaction. A typical pipeline includes the following stages:

    • Web search: Call a search service, filter results, and extract body text.
    • File parsing: Process PDFs, office documents, and images to extract text and layout information.
    • Web page reading: Fetch and clean page content from a URL provided by the user.
    • Voice pipeline: Speech recognition converts speech to text, and speech synthesis converts answers to speech.
    • Orchestration logic: Decide when to call tools, feed tool results back to the model, and handle timeouts and retries.

    Each stage depends on different services, with different interfaces, billing models, and failure modes. Teams often spend considerable time on integration and operations, leaving limited effort for business logic.

    2. Main Types of Provider-Hosted Capabilities

    When a model service executes some tool capabilities on the server side, an application can obtain both inference and external information in a single call. Common capabilities can be grouped into the following categories:

    1. Web search. The model initiates retrieval based on the question and includes cited sources in the answer.
    2. Multi-round deep research. The model retrieves and reads web pages multiple times during reasoning, which is suitable for questions that require synthesizing several sources.
    3. File input. The server parses common documents and images and provides the content to the model as context.
    4. Web page reading. The service reads the main text from a user-provided link, removing the need for custom fetching and cleaning.
    5. Safety checks. Basic risk checks are performed on input and output to reduce the chance of policy-violating content entering business workflows.
    6. Standalone capability APIs. Retrieval, web page fetching, text recognition, speech recognition, and speech synthesis can be called separately, which suits systems that need to supplement only part of their pipeline.

    Coverage, supported model versions, and parameter settings for these capabilities vary by provider. Evaluation should rely on the relevant official documentation rather than assumptions about capability boundaries.

    3. Architecture: Client Orchestration vs. Provider Hosting

    There are usually two modes for implementing Q&A with tools.

    The first is client orchestration. The application maintains its own tool list. On each round, the model returns tool call requests, and the application executes them locally before sending the results back to the model. This mode offers strong control and is convenient for auditing and customization, but it requires more code and spreads error handling across the application.

    The second is provider hosting. The application declares which capabilities it needs, and tool execution and multi-round reasoning are handled by the service provider. Development effort is significantly reduced, but observability and controllability depend on the logs and parameters provided by the service.

    The following illustrative code shows the difference between the two modes. Parameter names only express the idea and do not correspond to any specific API definition.

    1. # Illustrative code: client orchestration vs. provider-hosted invocation
    2. def answer_with_client_orchestration(question: str) -> str:
    3. messages = [{"role": "user", "content": question}]
    4. for _ in range(MAX_ROUNDS):
    5. reply = llm.chat(messages, tools=LOCAL_TOOLS)
    6. if not reply.tool_calls:
    7. return reply.text
    8. for call in reply.tool_calls:
    9. # Execute search, parsing, etc. locally
    10. result = run_tool(call.name, call.arguments)
    11. messages.append(tool_message(call.id, result))
    12. raise RuntimeError("Exceeded maximum reasoning rounds")
    13. def answer_with_hosted_capability(question: str):
    14. reply = llm.chat(
    15. [{"role": "user", "content": question}],
    16. capabilities=["web_search", "file_input"], # Executed server-side
    17. )
    18. return reply.text, reply.citations

    The business results of the two implementations may be similar, but maintenance costs can differ significantly. With client orchestration, every new tool requires additional execution logic and exception handling. With provider hosting, application code becomes shorter, at the cost of greater dependence on server-side behavior.

    4. Key Evaluation Dimensions

    When evaluating provider-hosted capabilities, consider at least the following six dimensions.

    Latency. Multi-round retrieval increases end-to-end response time. Set a total duration limit and show processing progress in the frontend so users do not wait for a long time without feedback.

    Reliability. Record server-side error codes and timeouts, and design fallback paths. For example, if retrieval fails, answer based only on the model’s existing knowledge and clearly note that the information may be outdated.

    Citation reliability. A cited source does not mean the conclusion is correct. Sample-check whether cited pages actually support the answer, especially for numbers, dates, and regulatory clauses.

    Data compliance. Files and user input are transmitted to external services. Confirm data retention duration, whether data is used for training, and whether redaction and authorization requirements meet internal policies.

    Cost structure. Billing may be based on call count, input and output length, or retrieval count. Model costs against typical business volume and set a cap for each request.

    Controllability. The more stages handled server-side, the more opaque the system may become. Ensure sufficient request logs and replay capability to determine whether a problem occurs in the model, retrieval, or parsing stage.

    5. Practical Deployment Recommendations

    1. Use a small-traffic canary. First route a small portion of requests through the new pipeline, and compare answer quality, latency, and cost with the original approach.
    2. Build an evaluation set. Collect real user questions covering search-dependent questions, long files, images, and ambiguous phrasing. Fix the scoring criteria so every change can be compared quantitatively.
    3. Set boundaries. Limit the maximum number of retrievals, file size, and page count per request to prevent abnormal inputs from causing uncontrolled costs.
    4. Cache results. Apply short-term caching to popular questions and web page reading results to reduce repeated calls. Pay attention to cache freshness to avoid returning outdated information for too long.
    5. Display sources. Keep citation links in the frontend and, where possible, label content publication dates so users can judge credibility themselves.
    6. Keep dual tracks. Retain in-house implementations for core business pipelines, and use hosted capabilities first for supplementary or non-critical paths to reduce single-point dependency.

    6. Conclusion

    Provider-hosted capabilities can significantly lower the barrier to building an assistant and help teams produce a usable prototype faster. What they transfer is integration work, not quality responsibility. Evaluation systems, cost boundaries, and data management remain the team’s responsibility, and these determine whether the system can run stably over the long term in real scenarios.