Most agent harnesses now support three ways to talk to a model: OpenAI’s Chat Completions, Anthropic’s Messages API, and OpenAI’s newer Responses API. Hermes Agent supports all three, and many providers now serve the same model through all three as well.
So it’s tempting to accept whatever the setup wizard picks. If the model and provider are the same, the results should be too.
They often aren’t. The API format decides what your harness can actually tell the model. Some of the most valuable features, such as prompt caching, reasoning that carries across turns, and tool calls with thinking turned on, only work fully in one format.
Three formats, three design philosophies
In Hermes, every provider and model pair resolves to an api_mode: chat_completions, anthropic_messages or codex_responses.
Chat Completions is the format nearly everyone speaks. It’s the most portable option and the most heavily tested across gateways. It’s also the oldest design. System prompts, tool calls and reasoning are all packed into one message format, and there’s no standard place for cache hints or reasoning state.
Anthropic Messages keeps the system prompt separate and gives every content block its own type. It also lets the client mark exactly what should be cached using cache_control breakpoints. On Claude, writing to the cache costs 1.25× the normal input price for the 5-minute tier or 2× for the 1-hour tier, and reading from it costs about 0.1× Source.
OpenAI Responses is OpenAI’s own native format, and OpenAI recommends it for all new projects. OpenAI reports better results from reasoning models on Responses, including a 3% gain on SWE-bench in its internal evals. It also reports 40–80% better cache utilization than Chat Completions, and reasoning can be carried between turns as encrypted items Source. For newer GPT models, using Responses isn’t optional. Starting with GPT-5.4, Chat Completions only allows tool calls when reasoning is turned off, and GPT-6 Astra can’t call tools there at all Source.
Same model, same provider, very different outcomes
Two real Hermes bug reports show what’s at stake. In both cases, nothing produced an error.
In the first, a user ran Claude through OpenRouter’s OpenAI-compatible endpoint. Hermes believed caching was on and added the cache markers. But because the request went out in Chat Completions format, the markers never reached the provider. Every call was billed for the full 16–19K-token system prompt, about $0.057 per call instead of roughly $0.006 with caching Source. That’s a 10× cost increase that nobody was warned about.
The second went the other way. A user ran Gemini models through an OpenAI-compatible router in Responses mode. Old encrypted reasoning kept getting sent back to the model, so the agent kept trying to resume a task that had finished days earlier. 14 of 22 reasoning entries were contaminated. Switching the same model on the same endpoint to Chat Completions fixed the problem completely and produced 77–87% cache hits Source.
Neither format was “bad” in these cases. Each was a poor match for the model and gateway it was used with.
“Use the native format” is the start, not the answer
The simple rule is Claude on Messages and GPT on Responses. That’s a good starting point. It gets harder with models like Qwen, DeepSeek, GLM or Kimi, which providers now serve through all three formats. For those, “native” depends on what the provider has actually built behind each endpoint, not on who made the model.
Be careful with published benchmarks too. One independent test sent identical calls through both of OpenAI’s formats and saw 99.7% cache hits and nearly identical answers on each Source. That test was single-turn with no tools, though, so it left out the agent workloads where the formats differ most. Your results will depend on your harness, your model, your gateway and how you work.
An example: Qwen3.8-flash on Alibaba’s Token Plan
My own setup shows why the default isn’t always the best choice. I run Hermes with qwen3.8-flash on Alibaba Cloud Model Studio’s Token Plan in the Beijing region, where all three formats are available for this model.
Alibaba offers two caching modes. Explicit cache guarantees hits for 5 minutes, and the timer resets on each hit. Writes typically cost 125% of the input price and hits about 10%. Implicit cache is automatic, but hits aren’t guaranteed and cached tokens are typically billed at about 20%. The two modes can’t be combined, and you only get explicit caching if the request carries cache_control markers Source. Alibaba notes that some models, qwen3.8-flash included, have their own region-specific ratios, so check your console for the real numbers.
Reading around turned up a mismatch. Hermes’s built-in “Token Plan, China” provider uses the OpenAI-compatible /compatible-mode/v1 endpoint by default Source. Alibaba’s caching guide, however, lists Hermes as a tool that connects over the Anthropic protocol and supports explicit cache natively Source. The Responses endpoint has a separate “session cache” that stays off unless you send a special header Source. Anyone who accepted the default would have no way of knowing which kind of caching they were getting.
Based on the documentation, the Anthropic endpoint is the strongest candidate for this setup:
model:
default: qwen3.8-flash
provider: custom
base_url: https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic
api_mode: anthropic_messages
api_key: YOUR_TOKEN_PLAN_API_KEY
prompt_caching:
cache_ttl: auto
Two other details matter here. First, a longer cache TTL wouldn’t help on this provider. Hermes’s docs say the DashScope backend caps cache TTL at 5 minutes Source. Second, the tool list should stay stable, because Alibaba caches tool definitions as part of the prompt and any reordering breaks the cache Source.
Documentation only gets you to a well-informed starting point. The OpenAI-compatible endpoint also accepts cache markers, and a future Hermes release could change what gets sent on each path. Checking against your own usage data is still the only way to be sure.
How to choose for your own setup
Don’t pick the format that’s easiest to set up, and don’t trust the one the wizard picks for you. Set aside some time to read and experiment:
- Read the provider’s docs, not just the harness’s. Look for which formats support explicit caching, which cache TTLs are actually offered, and which harnesses the provider names.
- Find out which mode you’re actually on. In Hermes, check the resolved
api_modeandbase_url. One bug report found that switching models through the/modelcommand could rewritebase_urlwithout warning Source. - Try each format you have access to. Run the same short session on each one, with a few turns inside the cache window and some real tool calls.
- Measure, don’t assume. Compare cache-write and cache-read tokens per turn, total cost or credits, and whether reasoning and tool calls behave sensibly across turns. If cache reads stay at zero, caching isn’t working, whatever your config says.
- Re-check after upgrades. Harness releases, gateway changes and new model versions can all change which format works best.
The takeaway
The API format is part of your agent’s design, not a setup step you can ignore. With three formats now widely supported, the default is often a choice nobody actually made. The right format can mean paying for your system prompt once per session instead of on every turn, and reasoning that stays on track instead of drifting. Read the docs, try the alternatives and go with what your own numbers show.


Leave a Comment