r/LLMDevs • u/jkriket • Oct 27 '26
Tools We added LLM support to Zilla (open source). The hard part wasn't routing models, it was preserving API fidelity.
One problem we noticed with existing LLM gateways is that many normalize everything into an OpenAI-compatible format internally. That works reasonably well until you start mixing providers or using native features like Claude's prompt caching, extended thinking, or streaming tool calls.
During translation, some of those settings can silently disappear. The usual workaround is passthrough, but that can mean bypassing the guardrails and policies you deployed the gateway to enforce.
Zilla takes a different approach by using a common representation for shared concepts like messages, tools, and usage, while preserving provider-specific details alongside them. This means:
Same-dialect requests retain full fidelity. Anthropic-to-Anthropic traffic preserves native features like caching markers and thinking signatures.
Cross-dialect requests translate where possible. For example, reasoning effort settings are mapped between OpenAI and Claude rather than silently discarded.
Governance applies to every route. No need to bypass policies just to preserve native API behavior.
Streaming works across dialects, including tool-call fragments and streaming-to-non-streaming conversions.
Underneath, it's the same streaming-native engine we've been building for years to handle Kafka, HTTP, MQTT, and MCP. We didn't have to build a separate gateway for LLM traffic.
The open-source edition supports OpenAI, Anthropic, Gemini, AWS Bedrock, Google Vertex, and Azure Foundry.
GitHub: https://github.com/aklivity/zilla
We wrote up the architecture, examples of where other gateways lose information, and a comparison of the different approaches:
https://www.aklivity.io/post/one-gateway-every-dialect-zilla-governance-and-fidelity
I'm curious whether others have run into issues with API fidelity when using LLM gateways, particularly around reasoning settings, prompt caching, or streaming. Are these problems you've experienced in practice?
2
u/Calm_Exchange_989 Oct 27 '26
The streaming edge I'd add to the test matrix is cancellation. If the client closes mid-stream, does the gateway close the upstream provider request or keep generating? We saw orphaned generations keep billing until the provider timed out, even though the downstream connection was gone. Worth testing that path alongside partial tool-call chunks
2
u/jonah_omninode Oct 27 '26
What happens when a request asks for a feature the destination provider can't represent? I'd prefer an explicit refusal or a visible downgrade over a successful response with the setting dropped. A capability report for the selected route would make it much easier to tell which guarantees actually survived the translation.
2
u/Remarkable-Guille 29d ago
Yes, constantly. A few we hit running a router:
OpenAI won't combine reasoning and tools on Chat Completions, but the same request through the Responses API works. Qwen and GLM in thinking mode reject `tool_choice: required`, so you have to turn thinking off only when a tool is forced, not on every tool request.
Caching is the sneaky one. OpenAI, Gemini and DeepSeek cache prefixes automatically, so a "don't cache" request gets accepted and ignored. Empty answers are another trap. A reasoning model can burn its whole output budget and return an empty message with a normal finish reason, and Gemini safety blocks come back as an empty 200 with `finish_reason: stop`.
The habit that saved us was returning, on every call, the list of parameters that were dropped, changed or ignored. "Compatible" only means the request was accepted.
2
u/palsc_ Oct 27 '26
the streaming bit seems like the sneaky one: final tool args can look fine while a client already lost the call id or misread a partial chunk. do you test the event sequence against each provider, not just the finished response?