arXiv:2611.07650cs.SENov 2026

Manuscript Offprint

arXiv:2611.07650

What the Middleman Delivers: Answer Behavior, Tool Permissions, and Billed Usage in LLM API Relays

Xiaodong Wu, Zhimin Zhao, Qi Li, Chaklam Cheong, Xiangman Li, Jianbing Ni

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Xiaodong Wu, Student Member, IEEE, Zhimin Zhao, Qi Li, Chaklam Cheong, Xiangman Li, Student Member, IEEE, and Jianbing Ni, Senior Member, IEEE

Abstract—Third-party application programming interface (API) relays offer access to large language models (LLMs), often at lower prices. Users depend on these services for model quality, instruction compliance, and accurate billing. However, existing studies leave unclear whether relays meet these expectations together. We test 20 relays offering GPT-6 Astra and Claude Opus 5. First, we compare answers to knowledge questions with batch-matched official responses. In our first-round sample, the analysis flags 7/10 low-price and 2/10 same- or higher-price relays for behavioral differences. On retesting 35 pairs, seven gain or lose a flag under the original rules, and six under matched correction families. Because answer comparisons cannot reveal every delivery problem, we examine returned content and tool permissions. No injection is confirmed in 3,332 screened responses to a fixed, non-adversarial code and setup workload, yet four relays return tool calls despite instructions disabling them in the first round. Finally, to connect reported usage to actual costs, we compare input-token counts with official references and check balances. For identical requests, five relays report 4,200 to 60,000 more input tokens than the official API. Where balances are available (six services), charges follow reported usage at listed prices, including extra reported input tokens at one service. Our study shows that advertised models and prices are insufficient to judge relay reliability. It identifies unexplained billed token quantities and tool-permission violations as risks and shows why service evaluations need repeated measurements.

Impact Statement. LLM API relays make advanced models easier to access, but they also place an operator-controlled delivery path between an application and the service it selected. The resulting contract covers more than a model label: it includes response behavior, tool permissions, response fields, and reported usage that may determine charges. Our measurement makes these client-visible properties testable through official comparisons, response review, and permission checks. It supports enforcing tool permissions in client applications, recording observed discrepancies, and making purchasing decisions with explicit uncertainty about hidden routing and future behavior. The findings do not identify a backend or accuse a provider of malicious conduct. Instead, they give developers and service operators a documented way to compare delivery responsibly, including negative findings, without treating price or model labels as a guarantee.

Index Terms—Large language models, application programming interface security, man-in-the-middle attacks, model substitution,

response integrity, supply chain security

I. INTRODUCTION

Third-party large language model (LLM) relays let users access models from multiple providers through a single application programming interface (API). Users turn to these services for lower prices, convenient payment options, or access to models that are unavailable in their region [1]. Instead of sending requests directly to a model provider, users send them to the relay, which chooses where and how to forward them. Even when each connection is encrypted, a relay that handles plaintext can read and change the content passing through it [2]. This control leaves users unable to verify important parts of the service from an answer alone. They need the relay to preserve instructions, respect tool permissions, and report usage accurately. Yet a plausible answer can still be accompanied by a tool call the user disabled. Likewise, a charge can match the listed token price while charging for unexplained input-token quantities. Without seeing what the relay sends upstream, users cannot resolve these questions from a model label or an invoice. Evaluating behavior, permissions, and usage together is therefore necessary to understand what users receive and pay for.

Existing research addresses parts of this problem through service measurements and model verification. A study of shadow APIs identifies 17 services and evaluates three for utility, safety, and model identity [1]. GateScope measures ten gateways for response consistency, multi-turn memory, billing, and latency [3]. For model verification, Knowledge Boundary as Fingerprint (KBF) uses factual recall near a model's knowledge boundary to compare API endpoints [4]. Together, these studies provide methods and measurements for examining relay behavior. However, a model check cannot establish whether a relay respects tool restrictions, and checking listed prices cannot verify the source of billed input-token quantities. It remains unclear which of these problems occur together within a service and whether they persist.

To address these questions, we study 20 relays offering GPT-6 Astra and Claude Opus 5. We found candidates through recommendations from LLMs, community lists, and web searches, then selected services that met our access and payment requirements. The selection was not random. Ten services advertise prices below the official APIs, and ten advertise the same or higher prices. We first compare relay answers

All authors are with Queen's University, Kingston, Ontario, Canada (e-mail: xiaodong.wu@queensu.ca, zhimin.zhao@queensu.ca, qi.li@queensu.ca, chaklam.cheong@queensu.ca, xiangman.li@queensu.ca, jianbing.ni@queensu.ca).

Xiaodong Wu, Zhimin Zhao, and Qi Li contributed equally to this work.

Corresponding author: Jianbing Ni (jianbing.ni@queensu.ca).

What can the client observe?

20 relays · two target models

Figure

Fig. 1. Measurement setup and comparisons of relay answers, tool permissions, and billed usage.

with batch-matched official responses to the same questions. Building on KBF's knowledge-boundary probes, we select questions that distinguish the targets from candidate substitutes and score answer correctness. Controlled mixtures of official and substitute responses then show when the tests can detect a difference. Because answer accuracy alone cannot reveal every problem, we also screen returned content and check whether tool calls comply with the request. To connect usage reports to actual charges, we compare input-token counts for identical requests and check the costs against account balance changes. Figure 1 outlines the tests.

A single measurement, however, cannot show whether an observed problem persists. We therefore repeat the tests 11–18 days later for 35 of the 36 relay–model pairs measured in the first round. Fresh official responses provide a reference for each round, helping distinguish changes in relay behavior from changes in the official service. Tracking the same pairs also lets us separate recurring discrepancies from those that appear or disappear between rounds. Together, these comparisons allow users to detect problems through public APIs and account records, without relay cooperation. They measure what the client receives, but do not identify the model.

Our measurements reveal three main findings. First, in the first-round sample, the analysis flags 7/10 low-price and 2/10 same- or higher-price relays for behavioral differences from the official reference for at least one target model (p=0.07p = 0.07 for the price-group comparison). Six services are flagged in both rounds, but 7/35 relay–model pairs gain or lose a flag under the original rules. Second, no injection is confirmed in 3,332 screened responses, yet four relays return tool calls despite explicit restrictions in the first round. These calls are not executed. Third, five relays report 4,200 to 60,000 more input tokens than the official API for identical requests. At all six services with accessible balances, deductions match reported usage at listed prices to the cent, including the reported surplus at R11. Thus, listed-rate billing does not establish whether extra reported tokens represent added input or altered accounting.

Our contributions are:

  • We document both recurring and changing behavioral differences across 20 relays, showing why reliability assessments need repeated comparisons with official references (Sections V-B and V-D).

  • We demonstrate that extra reported input-token quantities enter R11's bill, showing why billing checks must verify reported quantities as well as listed prices (Section V-E).

  • We observe returned tool calls that contradict explicit restrictions in the first round (none in the second), despite no confirmed injection in the screened responses, showing why tool permissions need checks beyond answer quality and content screening (Sections V-C and V-E).

  • We provide a documented procedure for evaluating relays without internal access. Its controlled-mixture tests, reviewed labels, explicit scoring rules, and anonymized summaries explain the checks and what the tests can and cannot detect (Sections IV-F and VII).

References (38)