Manuscript Offprint
arXiv:2610.25480Consistent LLM Call Handling Across Java Frameworks: A Reference Implementation and Benchmark
Oleksandr Klymenko
Independent Researcher, Poland
ORCID 0009-0000-5924-3697
Abstract—Java applications reach large language models (LLMs) through an integration framework, and rely on it to handle a failing provider: to retry what can be retried and nothing else, to wait as long as the provider asks, never to present a truncated answer as complete, and to record each failure in the application's metrics. We state these expectations as a six-clause reliability contract and measure Spring AI 2.0.1 and LangChain4j 1.21.0 against it with a scripted OpenAI-compatible provider: fifteen failure scenarios, synchronous and streaming, three repetitions. LangChain4j meets it in 47 of 77 applicable cases with its defaults and in 51 of 83 when configured explicitly, Spring AI in 72 of 77 and 76 of 83; both deliver a stream that ended without its terminator as a complete answer. We then place one implementation of the contract beneath both frameworks, at the HTTP boundary — an OkHttp interceptor for Spring AI, an HttpClient for LangChain4j, and a java.net.http transport for code without a framework — sharing a 725-line core that depends only on the JDK and the Micrometer Observation API. With it, all three clients behave identically and meet the contract in 90 of 91 cases; the remaining case is a policy trade-off between retrying a hung provider and waiting for a slow first token. Against a local model server the layer rejected none of 700 calls, and it adds a median of 32–217 s to a call.
Index Terms—large language models, reliability, retries, timeouts, server-sent events, observability, Micrometer, Spring AI, LangChain4j.
I. INTRODUCTION
A Java application that calls a large language model (LLM) rarely speaks HTTP to the provider itself. It uses an integration framework — Spring AI or LangChain4j — which turns a prompt into a request, the response into an object, and a failure into an exception, a retry, or nothing. Which of the three happens decides what the application and its operator see. A rate limit absorbed by a retry is invisible; a stream that ended early and is delivered as a complete answer is indistinguishable from a real one; a failure that no metric records does not appear on a dashboard. Such failures are gray in the sense of [1]: the component fails, and the observer that should notice does not.
Providers fail in ordinary, documented ways. They answer 429 with a Retry-After, return 5xx under load, stop responding, close connections, and end streams early. HTTP semantics [2], [3] and the provider's streaming format [4] say what a client should do in most of these cases. The frameworks implement these rules separately, each in its own retry loop, timeout model and instrumentation, and they implement them differently. Section V.B measures the difference: run against the same fifteen scripted provider failures, LangChain4j 1.21.0 meets a six-clause reliability contract in 47 of 77 applicable cases with its defaults and Spring AI 2.0.1 in 72 of 77, and the two fail on different clauses.
This paper argues that the rules belong below the frameworks rather than inside each of them. Both frameworks reach an OpenAI-compatible endpoint over HTTP, and both let the application supply the HTTP client: Spring AI through an OkHttp interceptor, LangChain4j through its HttpClient interface. Beneath that seam the wire is the same — a JSON body or a stream of server-sent events — so a layer placed there can apply one contract to every framework above it, and to an application that uses no framework at all.
We contribute:
-
A reliability contract for model calls in six clauses (Section III), each derived from HTTP semantics, the streaming format, or the observability requirement, and each checkable against a scripted provider.
-
A layer that implements it once (Section IV): a framework-independent core of 725 lines with no dependency beyond the JDK and the Micrometer Observation API, and three adapters — an OkHttp interceptor for Spring AI (210 lines), a LangChain4j HttpClient (137 lines), and a java.net.http transport (290 lines) usable without a framework.
-
An evaluation (Section V) by fault injection — fifteen scenarios, synchronous and streaming, three repetitions, before and after — against a real model server (700 calls to two local models), and of the latency the layer adds.
-
An open implementation with every result reproducible from one command [5].
2); its instrumentation is a listener interface, and the module langchain4j-micrometer-metrics records Micrometer meters from it. The streaming path of LangChain4j's OpenAI client has no retry setting.
What a client should do. A 5xx response is a server error and may succeed on repetition [2, §15.6]; a 4xx response is a client error, and for 400 or 401 the same request will fail again [2, §15.5]; a 429 asks the client to slow down, and Retry-After says for how long [2, §10.2.3], [3, §4]. A model request is a POST: a request that reached the provider may have been executed and billed even if the client never saw the answer, and repeating a request whose successful response could not be decoded repeats a completed generation. An OpenAI chat-completions stream ends with a chunk that carries a finish_reason and a final data: [DONE] [4]; a data: event whose JSON carries an error object reports a failure [7]. A stream that ends without its terminator is incomplete.
Retries and timeouts as a source of failure. Studies of cloud-system failures find timeout and retry handling among the recurring causes of incidents [10]–[13]: missing or misconfigured timeouts, retries that amplify load, and errors that are swallowed rather than reported. Exponential back-off goes back to Ethernet [14]; randomising it spreads retries in time; and at scale, repeated requests are both a remedy for tail latency and a source of extra load [15]. Grottke and Trivedi classify retry as one of four responses to software faults [16]. Fault injection into a running system to observe its handling of failure is the method of chaos engineering [17]; we use it here at the scale of one client and a scripted provider.
Resilience libraries and gateways. General-purpose resilience libraries for the JVM — Resilience4j, Spring Retry, Failsafe — provide retry, back-off, time-limit and circuit-breaker policies around any call [18]–[20]. They decide on the exception a call throws, after the HTTP response has been turned into an object, and so cannot see what C3 and C4 require: whether a stream ended with its terminator, or how long the provider has been silent between events. Wrapping a framework call in such a policy also nests a second retry loop around the framework's own. LLM gateways — proxies such as LiteLLM [21] — apply retries and fallbacks between the application and the provider, but as a separate network service, and the application's own metrics then see only the gateway. The layer proposed here is a library at the HTTP boundary of the process: it sees the wire, as a gateway does, and records in the application's own observations, as a library does.
Developers of LLM applications. An analysis of developer questions about LLM APIs finds error handling, rate limits and response parsing among the recurring difficulties [22]. The present paper takes one class of these — provider failures on the HTTP path — and moves their handling out of application code and out of each framework into one layer.
III. THE CONTRACT
We call one invocation of the framework’s API a call, and each HTTP request it causes an attempt. An attempt fails with a kind f from a fixed set : rate-limited (429), server error (5xx), request timeout (408), connection, no response, authentication (401, 403), client error (other 4xx), malformed response, empty response, truncated stream, stream error event, idle stream, cancelled. A subset is transient — the first five — and the rest are permanent. The contract has six clauses.
C1 — retry exactly the transient failures. After attempt k fails with kind f, another attempt is made if and only if
(1)
where states that part of the response was already delivered to the caller, K is the attempt limit, a the delay the provider asked for (if any), the longest such delay the client will honour, the time elapsed since the call began, the wait before attempt , the next attempt's timeout and B the call's total budget. The clause forbids two errors: not retrying a transient failure, and retrying a permanent one — in particular, repeating a request whose successful response was malformed.
C2 — wait as long as the provider asks. If the provider states a delay (retry-after-ms, or Retry-After in seconds or as a date), the wait is ; a delay above ends the call, because waiting less than asked only provokes another refusal. Otherwise the wait doubles from a base up to a cap , with a fraction drawn at random [14], [15]:
C3 — never present an incomplete answer as complete. The application receives either the complete answer or an exception. A non-streaming body must be one JSON object, and if it carries choices, at least one. A stream is complete if and only if it contains a terminal event — data: [DONE] or a chunk with a non-null finish_reason; an error event or an event that is not JSON makes it fail. Events received before a failure are delivered before the exception, so that the application can keep or discard a partial answer knowingly.
C4 — bound silence, not length. A non-streaming attempt is bounded by a response timeout ; a streaming attempt by a first-event timeout and, once events flow, by an idle timeout between events. A single bound on the whole call conflates a provider that is silent with one that is slowly producing a long answer. The total budget bounds the time until the response starts:
since by (1) no attempt starts unless it can end within B, and each attempt's timeout is . A stream that has started is bounded by per gap, not by B.
C5 — record every outcome as it was. Each call ends in the instrumentation in exactly one of two states, success or failure, matching what the application received, and a failure carries its kind — not the class of a wrapper exception. This includes a truncated stream, a stream that failed after events were delivered, and a stream the caller abandoned.
C6 — make every attempt visible. The instrumentation holds one record per request that reached the provider, with its status, kind and the retry decision. Retries that only the server log can count are invisible to the operator.
The clauses are not new individually; each framework implements some of them. What is new is stating them together, as one contract that a layer either meets or does not, and checking them per scenario (Section V).
IV. DESIGN
A. Placement
The layer sits at the HTTP boundary, beneath the framework and above the socket (Fig. 1). Three properties of that place make one implementation sufficient. First, the frameworks expose it: Spring AI accepts OkHttp application interceptors through httpClientBuilderCustomizer, and LangChain4j accepts any implementation of its HttpClient interface through httpClientBuilder. Second, everything the contract needs is visible there — status, headers, body bytes and their timing — and nothing it needs is visible only higher up. Third, the wire is common: every OpenAI-compatible endpoint — OpenAI, Azure OpenAI, Ollama, vLLM — speaks the same JSON and server-sent-event format.
The price of the placement is that the framework must step aside: its own retries are set to zero, and its own call timeout above the layer's budget, so that one component decides. Final error responses (a 400, or a 503 after the last attempt) are passed up unchanged, so that each framework still maps them to its own exception types; failures that only the layer detects — no response, a malformed or empty answer, a truncated stream, an error event, silence — are raised as a GuardException that carries the kind.
B. Components
Retry rules. One function implements (1)–(2) and is called by every transport, so the decision is identical whichever framework is above. The kind of a failure is the only input that differs between transports: an HTTP status maps to a kind by its class; a read timeout before the response maps to no response; an I/O failure before any byte maps to connection.
Wire check. A non-streaming 2xx body is parsed before it is handed up; a malformed body or an empty choices array ends the call with a permanent kind. The parser is a 170-line reader written for the purpose, so that the core carries no JSON library and cannot conflict with the framework's.
Guarded event stream. A streaming response is wrapped in an input stream that passes bytes to the caller one event at a time, and only after the event has been classified. The design rests on two properties, both enforced by construction and tested on every split of a stream into chunks:
Proposition 1 (completeness). The guarded stream reports its end to the caller if and only if a terminal event has been received; otherwise the read that reaches the end of the body throws truncated. Proposition 2 (ordering). The bytes of an error event or of a malformed event are never delivered; every event received before it is delivered before the exception.
Before the first event the stream is not yet handed to the caller, so a silence or a broken connection at that point is still a transient failure of the attempt and may be retried; after it, in (1) is true and nothing is retried.
Observations. Each call is one Micrometer observation 11m.guard.call, with low-cardinality keys transport, mode, outcome, error.type (the kind) and attempts; each attempt is a child observation 11m.guard.attempt with status, error.type and decision (retry or stop). Any observation handler — a meter registry, a tracer — receives them. A stream's call observation ends when the stream ends, fails, or is closed early by the caller.
C. Adapters
Spring AI (OkHttp interceptor, 210 lines). The interceptor runs each attempt through chain.proceed, with the attempt's timeout set as the chain's read timeout; for a stream it reads until the first event before returning the response, and wraps the rest of the body in the guarded stream. Retries happen inside the interceptor, beneath the SDK's own (disabled) retry loop.
LangChain4j (HttpClient, 137 lines). The adapter implements LangChain4j's synchronous execute and its server-sent-event execute, maps a final error status to LangChain4j's HttpException and no response to its TimeoutException, so that the model's own exception mapping is unchanged, and follows the same callback sequence as LangChain4j's JDK client (open, parse, close).
No framework (java.net.http, 290 lines). The JDK client has no read timeout for a body once its headers have arrived, so the transport reads the body on a virtual thread into a queue that the consumer polls with the idle timeout.
Installing the layer is a builder argument in each framework (Listing 1).
V. EVALUATION
A. Setup
Scripted provider. A local OpenAI-compatible endpoint whose behaviour is scripted per attempt and which records the arrival time of every request, so that attempts and the gaps between them are measured at the server, independently of what the client reports. Fifteen scenarios cover server errors (S02, S03), rate limiting with Retry-After: 3 (S04, S05), client errors (S06, S07), a provider that does not answer (S08: 5 s once; S14: 70 s on every attempt), a 2xx body that is not JSON (S09) or has an empty choices array (S10), a stream closed after three of eight chunks without its terminator (S11), a stream carrying an error event after three chunks (S12), and slow but live streams (S13: 1.5 s between chunks; S15: 8.5 s between chunks, 68 s in all).
Clients and setups. Spring AI 2.0.1 (openai-java 4.49.0) and LangChain4j 1.21.0, each in synchronous and streaming mode, each in three setups: its defaults; an explicit configuration (maxRetries 2, timeout 2 s); and with the guard installed

Figure 1. Placement of the layer. Each framework keeps its API and its exception types; its own retries are switched off and its HTTP client is replaced by an adapter that delegates to one core implementing the contract. Code without a framework uses the java.net.http transport directly.
// Spring AI var guard = new GuardInterceptor(Policy.defaults(), registry); var model = OpenAiChatModel.builder() .options(OpenAiChatOptions.builder().model(m).maxRetries(0).timeout(Duration.ofMinutes(10)).build()) .httpClientBuilderCustomizer(b -> b.interceptor(guard)).build(); // LangChain4j var model = OpenAiChatModel.builder().modelName(m).maxRetries(0) .httpClientBuilder(new GuardedHttpClientBuilder(Policy.defaults(), registry)).build();
Listing 1. Installing the layer beneath Spring AI and beneath LangChain4j.
(framework retries 0, framework timeout 10 min). The guard is also run alone over java.net.http (plain). The guard's policy in the study is , s, s, s, s, s, s, , with a fixed random seed; the short timeouts suit a provider that answers at once. The explicit configuration is the one a developer would set for such a provider — two retries and a 2 s timeout, close to the guard's 3 s — so that the frameworks are compared with the guard at a similar strictness, and not only at their more lenient defaults.
Scoring. A cell is one scenario × client × mode × setup; it meets a clause only if all three repetitions do (S14 and S15, which wait for timeouts, run once). For C5 a metric counts as recording a failure if, for Spring AI, its gen_ai.client.operation observation stops with an error; for LangChain4j, a meter carries an error tag (its listener callback alone is not a metric); for the guard, llm.guard.call ends as failure — and, where the scenario determines it, with the expected kind. Clauses that do not apply to a scenario are not counted, so the denominators differ between columns. With C the cells of a client and setup, the clauses applicable in cell k and whether repetition r of cell k meets clause c, the score reported is
Real server and overhead. The guard was run against Ollama 0.34.2 [23] on one RTX 3090 with llama3.2 (3 B parameters; 50 calls per cell) and qwen2.5:7b (20 per cell), all clients, both modes, without and with the guard, with Policy.defaults() ( s, s, min). Overhead was measured as the latency of 2,000 successful calls per configuration against the scripted provider, with the same client built once with and once without the guard, in alternating blocks of 50 after 300 warm-up calls.
B. Contract compliance, before and after
Table I gives, for each client and setup, the number of cells that meet each clause.
Without the guard, the two frameworks differ more from each other than from the contract. LangChain4j's streaming path makes no retry, so a single 500 (S02), a 429 (S04) or a 5 s silence (S08) reaches the application as an error (C1, C4); its synchronous path retries a 429 after its own back-off of about 0.5 s instead of the 3 s asked for (minimum gap 507–539 ms; C2), and repeats a request whose 200 response was not JSON (S09: three attempts; C1). Its Micrometer listener
Table I
CELLS MEETING EACH CLAUSE / CELLS TO WHICH IT APPLIES (ALL REPETITIONS AGREE).
| Clause | LC4j defaults | LC4j explicit | LC4j + guard | Spring AI defaults | Spring AI explicit | Spring AI + guard | plain + guard |
|---|---|---|---|---|---|---|---|
| C1 retry exactly the transient | 11/15 | 11/16 | 17/17 | 15/15 | 15/16 | 17/17 | 17/17 |
| C2 wait as asked | 0/3 | 0/3 | 3/3 | 3/3 | 3/3 | 3/3 | 3/3 |
| C3 no incomplete answer as complete | 16/18 | 17/19 | 21/21 | 16/18 | 17/19 | 21/21 | 21/21 |
| C4 bound silence, not length | 3/5 | 4/7 | 7/8 | 4/5 | 5/7 | 7/8 | 7/8 |
| C5 record every outcome | 5/18 | 6/19 | 21/21 | 16/18 | 17/19 | 21/21 | 21/21 |
| C6 every attempt visible | 12/18 | 13/19 | 21/21 | 18/18 | 19/19 | 21/21 | 21/21 |
| all | 47/77 | 51/83 | 90/91 | 72/77 | 76/83 | 90/91 | 90/91 |

Figure 2. Share of applicable cells that meet all six clauses (Table I, last row): each framework with its defaults, with an explicit configuration, and with the guard installed; and the guard without a framework.
records no meter for any failure (C5: 5 of 18 cells), and its listener sees one request where the provider received three (C6). Spring AI meets C1, C2 and C6 in every applicable cell except one — an asynchronous streaming call that timed out is not retried (S08) — and records failures as observation errors. Both frameworks deliver a stream that ended without its terminator (S11) as a complete answer and record it as a success (C3, C5); LangChain4j does the same with a stream that carried an error event (S12); Spring AI returns an empty choices array as an empty answer recorded as a success (S10). Spring AI's timeout bounds the whole call, so a stream that is still delivering is cut off at 2 s (S13, explicit) or at 60 s (S15, defaults: seven of eight chunks delivered, then an error).
With the guard, the three clients behave identically in every scenario: the same attempts, the same gaps (36 Retry-After waits of 3,001–3,007 ms, median 3,002 ms, for Retry-After: 3), the same kind recorded, and an exception — with the delivered chunks kept — for S10, S11 and S12. The exception reaching the application still differs by framework (Spring AI wraps the guard's failure in OpenAIIOException, LangChain4j in its TimeoutException or a runtime exception), but the kind is in the cause chain and in the observation.
The one cell the guard misses in every client is S15, a stream whose first chunk arrives after 8.5 s: with s the guard treats the silence as no response, retries twice and fails after 10.2–10.3 s. This is the policy, not a defect: the study's is chosen below 5 s so that the provider that hangs for 5 s in S08 is retried, and no single value of can both retry a 5 s silence and wait out an 8.5 s one — before the first byte, a hung provider and a slow first token look the same. Run with s, S15 completes on all three clients in one attempt (results/outcomes_S15_firstEvent10s.csv), which shows that once a stream has started, only the 10 s idle bound applies, not its 68 s length.
Bounded failure time. A provider that never answers (S14) costs a synchronous call 243 s with Spring AI's defaults (four attempts of 60 s) and 181 s with LangChain4j's (three of 60 s); with the guard, 10.15–10.16 s for three attempts on every client, inside the budget as (3) requires.
C. Real server
Against Ollama, all 700 calls succeeded in every client, mode and setup (Table II): the guard rejected no response and no stream from a server that was working, and its call observation recorded every guarded call as a success in one attempt. Median latencies with and without the guard differ by less than the variation of generation time between calls.
D. Overhead and size
The median cost is 32–217 s per call (Table III), larger for streams, where every event is parsed before it is passed
Table II
REAL SERVER: SUCCESSFUL CALLS / CALLS, AND MEDIAN LATENCY (MS).
| Client | Mode | llama3.2 native | llama3.2 + guard | qwen2.5:7b native | qwen2.5:7b + guard |
|---|---|---|---|---|---|
| Spring AI | sync | 50/50 · 229 | 50/50 · 221 | 20/20 · 342 | 20/20 · 391 |
| Spring AI | stream | 50/50 · 223 | 50/50 · 234 | 20/20 · 380 | 20/20 · 327 |
| LangChain4j | sync | 50/50 · 241 | 50/50 · 236 | 20/20 · 353 | 20/20 · 342 |
| LangChain4j | stream | 50/50 · 224 | 50/50 · 245 | 20/20 · 363 | 20/20 · 351 |
| plain | sync | — | 50/50 · 243 | — | 20/20 · 361 |
| plain | stream | — | 50/50 · 239 | — | 20/20 · 370 |
Table III
LATENCY ADDED TO A SUCCESSFUL CALL BY THE GUARD, AGAINST THE SCRIPTED PROVIDER (2,000 CALLS EACH).
| Client | Mode | Median without / with (μs) | Added, median (μs) | Added, P95 (μs) |
|---|---|---|---|---|
| Spring AI | sync | 582 / 645 | 63 | 987 |
| Spring AI | stream | 839 / 977 | 138 | 576 |
| LangChain4j | sync | 621 / 653 | 32 | 201 |
| LangChain4j | stream | 522 / 739 | 217 | 617 |
| java.net.http | sync | 325 / 364 | 39 | 90 |
| java.net.http | stream | 358 / 513 | 155 | 313 |
on. Against generation times of 220–390 ms for the smallest local models (Table II) this is below 0.1 %. The core is 725 non-comment lines; the adapters are 210 (OkHttp), 137 (LangChain4j) and 290 (java.net.http, including the body pump). The tests cover the retry rules, Retry-After parsing, the wire checks and the stream gate on every split of a stream into chunks (16 tests).
VI. Discussion
Where it is used. The layer serves in this role in [24], an operator-facing explainer for the fault attributions of [25]: there, local models are reached through both Spring AI and LangChain4j with the guard installed, and a failing model server degrades the operator's explanation to a template within the guard's budget instead of stalling the triage.
What the placement buys. One implementation of the contract served three clients with identical behaviour, and the difference between Spring AI with the guard and LangChain4j with the guard vanished in every measured respect except the class of the exception. Fixing each deviation in each framework is also needed, and several of the deviations measured here are suitable for reports to the projects; but an application cannot wait for every framework to converge, and the layer gives it the contract now and keeps it if the application changes framework.
What it costs. The frameworks must step aside: their retries off, their call timeout out of the way. Their own instrumentation still runs — Spring AI's observation, LangChain4j's listener — but sees one call where the guard made several. The OkHttp adapter waits for a retry on the thread that runs the interceptor, which on Spring AI's streaming path is an OkHttp dispatcher thread; under heavy concurrency the dispatcher's limits apply.
Limits of the evaluation. The scripted provider reproduces failures at the protocol level; it does not reproduce a provider's load behaviour, and the real-server runs exercise only the success path. One policy was evaluated, and S15 shows that the first-event timeout is a trade-off the operator must make knowingly. The contract covers the HTTP path of a single call — not tool-calling loops, conversation state, or the content of an answer. And it covers the OpenAI-compatible wire only; other provider protocols need their own wire checks, although the retry rules, the stream gate and the observations carry over unchanged. The overhead was measured on one machine while a model server served another experiment on its GPU. The measurements were made on 6 October 2026 with Spring AI 2.0.1 and LangChain4j 1.21.0; later releases (LangChain4j 1.22.0 appeared on 8 October) are not covered, although the harness re-runs against any version.
Whether to retry a timeout remains a policy decision the layer cannot make for the application: a request that timed out may have been executed and billed. The guard retries it by default, as both frameworks do on their synchronous paths; K = 1 turns this off.
VII. CONCLUSION
The handling of provider failures in Java LLM applications is currently a property of the framework, and the two frameworks studied here handle the same failures differently: measured against a six-clause contract derived from HTTP semantics, the streaming format and the requirement that failures be visible, they meet it in 47–51 of 77–83 applicable cases (LangChain4j) and 72–76 (Spring AI). A layer placed beneath them, at the HTTP boundary, implements the contract once — 725 lines of core and 137–290 lines per adapter — and gives Spring AI, LangChain4j and plain java.net.http the same behaviour: 90 of 91 cells, the remaining one a policy trade-off between a hung provider and a slow first token. It rejected none of 700 calls to a working model server and adds 32–217 μs to a call. The contract, the layer and the evaluation are open, and the evaluation can be re-run against any later version of either framework.
DATA AND CODE AVAILABILITY
The core, the three adapters, the scripted provider, the evaluation harness, every result file and the figure scripts are available at https://github.com/alxkm/llm-call-guard under the MIT license; one command re-runs the evaluation, and the repository records the runtime environment of each run.
COMPETING INTERESTS
The author contributes to the open-source projects Spring AI and LangChain4j, whose behaviour is measured here — among others, tests for the observation components of Spring AI (spring-projects/spring-ai#4124, spring-projects/spring-ai#4157, spring-projects/spring-ai#4259, spring-projects/spring-ai#4313) and a fix to token accounting in LangChain4j (langchain4j/langchain4j#6322) — and to Micrometer (micrometer-metrics/micrometer#7924). These are tests and small fixes; none changes the behaviour measured here. The deviations reported are measured against a contract stated in advance, by a harness that is released in full. The work received no external funding.
REFERENCES
[1] P. Huang, C. Guo, L. Zhou, J. R. Lorch, Y. Dang, M. Chintalapati, and R. Yao, “Gray failure: The Achilles’ heel of cloud-scale systems,” in Proc. 16th Workshop on Hot Topics in Operating Systems (HotOS), 2017, pp. 150–155, doi: 10.1145/3102980.3103005.
[2] R. Fielding, M. Nottingham, and J. Reschke, Eds., “HTTP Semantics,” RFC 9110, June 2022, doi: 10.17487/RFC9110.
[3] M. Nottingham and R. Fielding, “Additional HTTP Status Codes,” RFC 6585, April 2012, doi: 10.17487/RFC6585.
[4] OpenAI, “API reference — Chat Completions: the chat completion chunk object.” [Online]. Available: https://developers.openai.com/api/reference/resources/chat (accessed Oct. 18, 2026).
[5] O. Klymenko, llm-call-guard: source code and results, 2026. [Online]. Available: https://github.com/alxkm/llm-call-guard
[6] Spring AI, version 2.0.1. [Online]. Available: https://github.com/spring-projects/spring-ai
[7] OpenAI, openai-java, version 4.49.0. [Online]. Available: https://github.com/openai/openai-java
[8] Micrometer, “Observation API.” [Online]. Available: https://docs.micrometer.io/micrometer/reference/observation.html (accessed Oct. 18, 2026).
[9] LangChain4j, version 1.21.0. [Online]. Available: https://github.com/langchain4j/langchain4j
[10] H. S. Gunawi, M. Hao, T. Leesatapornwongsa, T. Patana-anake, T. Do, J. Adityatama, K. J. Eliazar, A. Laksono, J. F. Lukman, V. Martin, and A. D. Satria, “What bugs live in the cloud? A study of 3000+ issues in cloud systems,” in Proc. ACM Symposium on Cloud Computing (SoCC), 2014, pp. 1–14, doi: 10.1145/2670979.2670986.
[11] H. S. Gunawi, M. Hao, R. O. Suminto, A. Laksono, A. D. Satria, J. Adityatama, and K. J. Eliazar, “Why does the cloud stop computing? Lessons from hundreds of service outages,” in Proc. 7th ACM Symposium on Cloud Computing (SoCC), 2016, pp. 1–16, doi: 10.1145/2987550.2987583.
[12] H. Liu, S. Lu, M. Musuvathi, and S. Nath, “What bugs cause production cloud incidents?” in Proc. Workshop on Hot Topics in Operating Systems (HotOS), 2019, pp. 155–162, doi: 10.1145/3317550.3321438.
[13] T. Dai, J. He, X. Gu, and S. Lu, “Understanding real-world time-out problems in cloud server systems,” in Proc. IEEE International Conference on Cloud Engineering (IC2E), 2018, pp. 1–11, doi: 10.1109/IC2E.2018.00022.
[14] R. M. Metcalfe and D. R. Boggs, “Ethernet: Distributed packet switching for local computer networks,” Communications of the ACM, vol. 19, no. 7, pp. 395–404, 1976, doi: 10.1145/360248.360253.
[15] J. Dean and L. A. Barroso, “The tail at scale,” Communications of the ACM, vol. 56, no. 2, pp. 74–80, 2013, doi: 10.1145/2408776.2408794.
[16] M. Grottke and K. S. Trivedi, “Fighting bugs: Remove, retry, replicate, and rejuvenate,” Computer, vol. 40, no. 2, pp. 107–109, 2007, doi: 10.1109/MC.2007.55.
[17] A. Basiri, N. Behnam, R. de Rooij, L. Hochstein, L. Kosewski, J. Reynolds, and C. Rosenthal, “Chaos engineering,” IEEE Software, vol. 33, no. 3, pp. 35–41, 2016, doi: 10.1109/MS.2016.60.
[18] Resilience4j, version 2.3.0. [Online]. Available: https://github.com/resilience4j/resilience4j
[19] Spring Retry, version 2.0.12. [Online]. Available: https://github.com/spring-projects/spring-retry
[20] Failsafe, version 3.3.2. [Online]. Available: https://github.com/failsafe-1ib/failsafe
[21] LiteLLM. [Online]. Available: https://github.com/BerriAI/litellm
[22] X. Chen, C. Gao, C. Chen, G. Zhang, and Y. Liu, “An empirical study on challenges for LLM application developers,” ACM Transactions on Software Engineering and Methodology, vol. 34, no. 7, pp. 1–37, 2025, doi: 10.1145/3715007.
[23] Ollama, version 0.34.2. [Online]. Available: https://github.com/ollama/ollama
[24] O. Klymenko, “Explaining process change, instrument fault and data-path corruption to operators: Local language models grounded in detector decisions,” manuscript, 2026. Code: https://github.com/alxkm/triage-explain
[25] O. Klymenko, “Distinguishing process change, instrument fault and data-path corruption in streaming telemetry: A reference implementation and benchmark,” arXiv:2610.18904 [eess.SP], Oct. 2026, doi: 10.48550/arXiv.2610.18904.