Applied Intelligenceindependent · by Arseny Gorokh
ai · 03
applied research note ·2026 · 05 · 15 ·ai-03 ·17 min read ·systems & telemetry

Claude Code, routed through DIAL:eight models, 192 runs, and metering every request.

If you are rolling out AI coding agents, two questions arrive together: does an open model actually do the work, and what is it costing us per project. This note connects Claude Code to EPAM's DIAL gateway across eight models and reports the cheapest one that passes everything, which is open-source. The same routing adapter meters every request, so the per-project cost answer your finance team wants comes out of the path itself, not a spreadsheet you maintain by hand.

192
trials across eight upstream models and an eight-task portfolio, two waves, a combined 35 dollars of gateway-priced spend.
$0.101
cost per successful task for the cheapest model that passes all eight, an open 480B coder, 38 percent under the cheapest viable Anthropic tier.
3
cumulative failure modes that separate viable from non-viable open models: prose emission, one-call stall, state loss across a tool boundary.
~30
structured fields the adapter already retains per request, of which two carry business meaning and three more are in the wire awaiting promotion.
ithree findings, stated up front

A cost answer, a failure taxonomy, and a place to measure from.

When finance asks what the agents cost and security asks whether they are on a governed path, you usually cannot answer both at once. This work produces one path that does: the same route that runs the agents also measures them, and that measurement is the part nobody set out to build.

  • The adapter routes anything. An Anthropic-to-OpenAI translation adapter lets an unmodified coding agent talk to any upstream the gateway brokers; 192 trials produced zero authentication incidents and required no harness source changes.
  • Open-source is the cost floor, at scale. At verified list pricing an open model is the cheapest model that passes every task, while several smaller open models fail with a shared, scale-driven signature.
  • The adapter is one change from business telemetry. It already writes rich per-request records and is a single, client-free change away from joining that telemetry to project, team, and use-case context.
iithe path

One adapter, eight upstreams, one compliant path.

The adapter accepts the request shape the coding agent emits, translates it to the gateway's OpenAI-style chat-completions, and streams the response back in the expected shape. A thin wrapper redirects the agent's three model slots at any gateway deployment without restarting the session. Traffic that would otherwise leave for the public API stays on the sanctioned inference path; the engineer-side change is a single environment variable. The adapter strips cache-control on every non-Anthropic upstream, a known gateway gap, and emits a structured record on every response, which is where the third finding comes from.

Figure 1 · the request path. The adapter is the only point that sees the request, the translated upstream call, and the full streamed response, so it is the natural observation point.
01
Harness
unmodified agent, messages API.
02
The adapter
shape translation, cache-control strip, ~30 log fields per request, list-priced cost estimate.
03
Gateway
project routing, auth.
04
Eight upstreams
Anthropic Opus/Sonnet/Haiku; Qwen 480B viable; Kimi, MiniMax partial; DeepSeek, Qwen 30B fail.
iiithe evaluation, in brief

Eight models sort into three tiers, with the cutoff at scale.

Every cell is a fresh worktree seeded with identical files; the agent runs non-interactively through the adapter and a hidden validator asserts behaviour, with exit-zero the only pass signal. No LLM judge, a 300-second hard timeout. The eight models split cleanly into three tiers with a sharp boundary: a model either closes the agentic loop or it does not, and the only gradient is cost, inside the viable cluster.

Table 1 · the eight-model matrix, ranked on cost per successful task (gateway-verified rates). 24 trials per model.
modelpassavg turnscost / successtier
Qwen3-Coder 480B Alibaba24/248.3$0.101A · cost leader
Claude Haiku 4.5 Anthropic24/2410.4$0.162A
Claude Sonnet 4.6 Anthropic22/249.5$0.474A
Claude Opus 4.7 Anthropic24/247.1$0.685A · ceiling
MiniMax M2.5 MiniMax17/245.5partialB · partial
Kimi K2.5 Moonshot15/244.8partialB · partial
Qwen3-Coder 30B Alibaba9/241.6mootC · toy
DeepSeek v3.2 DeepSeek0/241.0noneC · toy
ivwhere each model fails

Three failure modes, and a pricing trap in the tooling.

The non-viable runs fall into three cumulative failure modes. Prose emission: the model returns markdown instead of a structured tool call, falsely signalling success at about one turn; the fix is retraining. One-call stall: it emits one correct tool call then cannot ingest the result and continue, hitting the watchdog at about 1.6 turns; the fix is more active parameters, on the order of 100B. State loss: the loop sustains for ten to fifteen turns, but the model cannot carry forward what it changed to update an external surface; the fix is better instruction training. The single task that discriminates full from partial viability is the one that requires remembering a change across a tool boundary: the viable tier passes it every time, both partial models pass it never.

A correction worth publishing

The agent's own cost field over-stated open-source spend by four to eleven times.

The coding agent's SDK self-reported 81.55 dollars for the matrix against 34.91 verified at console rates, a 47-dollar inflation, because the SDK falls back to top-tier rates for unrecognised non-Anthropic models. Read the cost from the gateway, not the tool, or the open models look an order of magnitude more expensive than they are.

vthe third finding

Every request passes through the adapter, so every request can be logged.

The adapter is the only component that sees the full request, the translated upstream call, and the full streamed response. On every response it writes a structured record: token counts, the tool-inventory hash, the MCP servers seen, the cache strategy, the latency, the stop reason, and a list-priced cost estimate. Nothing about that is exotic, and that is the point: an observation plane for AI-assisted development already exists in the request path, as a side effect of routing.

The hard part of measuring AI-assisted work is not collection. It is the join to business context.

vithree honest layers

What is recorded, what is in the wire, and what needs a header.

The telemetry separates into three layers, and being honest about which is which is the whole contribution. Layer A is what already reaches the time-series store and dashboards today, tagged only by client name and model family. Layer B is identifiers already in the wire but not yet promoted to tags, the session id, the request id, the tool-inventory hash, the MCP-servers list, the command name, a mechanical exporter change needing no client cooperation. Layer C is the business context, project, team, industry, use-case, that the proof of concept does not capture and that would require headers the agent does not send today.

Table 2 · Layer A, what is measured today.
measurementtagsselected fields
adapter metricsclient, model familytoken totals, list-priced cost, p50/p95 latency, tool-use round-trip success, partial-message rate, upstream throttle rate, cache fields.
agent eventsevent, model, clientcount, duration, tokens, cost.
tracestrace, span, client, model familytime-to-first-token, count.

The distance from Layer A to a per-project, per-team, per-use-case cost-and-quality view is one promotion of Layer B and one header convention for Layer C. The per-segment views in the proof of concept are illustrative placeholders, not a deployed system, and the note is careful to label them as such.

viithe proposal

From a per-laptop adapter to a feature in the gateway.

The pattern the work supports is to move the validated translation inside the gateway itself, so any licensed developer can point the agent at it without running a local adapter, and per-project configuration decides which upstream each picker slot resolves to. The translation core is roughly 1500 lines in two functions plus a streaming bridge; porting it is a rewrite against existing auth and routing, not a new design, and the existing test suite carries forward as the conformance bar.

What this earns

One sanctioned path that is also a measurement plane.

Traffic stays on the governed path, model choice becomes a per-project decision, and the cost and quality of AI-assisted development become observable per workflow rather than per provider bill. The telemetry is latent capability the routing already produces; the work is to promote and join it.

·closing, and the limits

The routing was the task. The observation point was the find.

Two questions went into this work: does an unmodified coding agent route cleanly through the gateway, and can an open model keep up. Both are answered, the second turning on scale rather than vendor. The third thing, the one worth carrying forward, was not a question at all but a side effect: the adapter that makes routing work is the only place that sees the whole exchange, and so it is where AI-assisted development becomes measurable, once the data is joined to the work it belongs to.

About this note

An independent applied-AI engineering note by Arseny Gorokh. Not an official EPAM publication. EPAM's DIAL and the named models are the public subject; the adapter, tasks, and telemetry design are the author's own. The limits bound every claim: single-operator data from one laptop and one network path; a synthetic, reproducible task surface; list pricing rather than a negotiated contract; the telemetry-enrichment layer is latent capability, not a deployed system, and the per-segment views are illustrative placeholders; no human-eval cross-check, so validators catch correctness, not code quality.

References

  1. AWS Bedrock pricing console (US East, captured 2026-05-14), the canonical source for every per-million rate and every cost-per-success figure.
  2. The coding agent's SDK self-reported cost field, cited as the misleading source ($81.55 against $34.91 verified) behind the pricing-trap correction.
  3. The time-series store and dashboard stack behind the Layer-A inventory and the operational panels.
  4. The two run directories and the run harness, the artefact set from which every number reproduces.
  5. Companion note ai-02, the focused five-model viability experiment this evaluation extends.
An Applied Intelligence publication · independent · 2026 ai-03 Set in Newsreader & Spline Sans Mono · the Applied Intelligence reading style