---
id: 18678
lang: en
title: "A Chat Completions-only service will connect to just 2 of 5 coding agents"
published_at: "2026-11-30 10:29:04"
source_name: "Habr AI"
source_url: "https://habr.com/ru/articles/1113868/?utm_campaign=1113868&utm_source=habrahabr&utm_medium=rss"
canonical_url: "https://news.hamidun.com/en/news/18678"
categories: ["llm", "autonomous"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# A Chat Completions-only service will connect to just 2 of 5 coding agents

> **Краткая суть (BLUF):** If an aggregator supports only Chat Completions, the older OpenAI request format usually called the "OpenAI-compatible API," you can connect it to just 2 of 5 coding agents: opencode and DeepSeek Harness. Claude Code requires only Anthropic Messages, Codex requires only Responses, and Antigravity requires the Gemini format. Before topping up your balance, look for the names of these four protocols in the documentation: the more you find, the more agents you can connect.  • Since February 2026, Codex fails with an error when wire_api = "chat" is set • In Claude Code, do not append /v1 to the URL: requests will go to /v1/v1/messages • All four protocols are listed in the documentation of ProxyAPI and TeamoRouter

You bought access to a model aggregator, set the base URL and key, and the coding agent won't start. The reason is that the phrase "OpenAI-compatible API" on a service's website guarantees almost nothing. It usually means Chat Completions, the classic OpenAI request format. But of the five popular coding agents (Claude Code, Codex, opencode, DeepSeek Harness and Antigravity), a service that supports only this format will work with just two: opencode and Harness. The others need different protocols. The author of the Habr review checked the documentation of all five as of November 30 and showed which configs each one needs and where they break.

## Who requires which protocol

Claude Code 2.1 understands only Anthropic Messages. Its settings live in ~/.claude/settings.json, and the env block sets ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN and ANTHROPIC_MODEL. The author ran the config through a local mock and found several pitfalls. You should not append /v1 to the URL: the agent adds /v1/messages itself, and with an extra /v1 the request goes to /v1/v1/messages. Values in settings.json override environment variables from the terminal. The agent does not block unknown model names: it warns you and sets the context window to 1 million tokens. There is no OpenAI compatibility mode.

Codex CLI 0.162 works only with OpenAI Responses, and its config lives in ~/.codex/config.toml. The model and model_provider lines must appear before the first section in square brackets. If you move them to the end of the file, Codex shows no error but silently ignores the provider, goes to the official OpenAI API, and returns a 401. The second trap is wire_api = "chat" from last year's guides. OpenAI declared it deprecated in December 2025, and since February 2026 it is a hard error. You can omit the line entirely: responses is the default.

opencode 2.4 mostly speaks OpenAI Chat, although there are packages for Responses and Anthropic. The problem here is the major version change. In 2.x the keys were renamed: provider became providers, npm became package, options.baseURL became settings.baseURL, and small_model moved to agents.title.model. Configs from 1.x still work for now, but you should not mix old and new keys in one file. The author himself was on version 1.19.6, so the 2.x example was built from the documentation without being run.

DeepSeek Harness 0.2 is the least demanding: it understands all four protocols (OpenAI Chat, OpenAI Responses, Anthropic Messages and Gemini). You add a provider via Settings → Models or by editing ~/.dsh/profiles/‹profile›/cordis.patch.yml. One provider is tied to one protocol, so two protocols from the same aggregator require two entries. Harness is still in developer preview, so it is best to copy the config before updating.

According to the documentation, Antigravity supports only the agy console utility and the Gemini format. It needs the GEMINI_API_KEY and GOOGLE_GEMINI_BASE_URL variables, plus the line "modelProvider": "gemini" in ~/.gemini/antigravity-cli/settings.json. The desktop version and the IDE have no fields for a custom URL and key.

## How to hand a subagent a cheaper model

The scheme in which an expensive model plans and a cheap one handles routine work is officially supported in the first four agents. In Claude Code, you specify the model in the frontmatter of a subagent Markdown file in ~/.claude/agents/; this is the cleanest option. There are also workarounds: the haiku alias via ANTHROPIC_DEFAULT_HAIKU_MODEL, or the CLAUDE_CODE_SUBAGENT_MODEL variable for all subagents at once. The haiku alias also affects the agent's own background service tasks, so the author recommends the first method. In addition, the aggregator must serve the cheap model in the Anthropic Messages format, and Anthropic explicitly states that it does not support third-party models through gateways.

In Codex, a [agents] section with default_subagent_model is enough, but the subagent must stay on the same provider. In opencode, there are built-in general and explore subagents; models are assigned in the agents block, and without it they inherit the main model. In Harness, the relevant item is Plugins → Subagent → Model selection. The author found no such option for Antigravity CLI.

## Which aggregators fit

Based on public documentation, the author compared six services. ProxyAPI and TeamoRouter list all four protocols. AITunnel, OpenRouter and RouterAI cover Chat Completions, Responses and Anthropic Messages, but Gemini is not listed in their documentation. Polza.ai mentions Anthropic only on the Claude Code setup page, and the Gemini format is not specified. The author did not test the services themselves, and "not specified" does not mean the endpoint definitely doesn't exist.

## Limitations and conclusion

Harness was tested live, while Codex and Claude Code were tested against a local mock. Everything else was compiled from documentation, with no measurements of price, speed or quality. Extensions such as Cursor, Cline and Kilo Code are not covered in the review. The practical takeaway is simple: before topping up your balance, find the four names in the aggregator's documentation (Chat Completions, Responses, Anthropic Messages and Gemini). The more you find, the more agents you can connect.

---
- **Первоисточник:** [Habr AI](https://habr.com/ru/articles/1113868/?utm_campaign=1113868&utm_source=habrahabr&utm_medium=rss)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/18678
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
