Codex in JetBrains Air without an OpenAI subscription: my own models through agentgateway

Lead: In JetBrains Air I actively use Codex without an OpenAI subscription. The client itself is open and charges nothing for the program, and I connect my own models, through agentgateway. That is what I was putting together. The rest — providers, limits, Figma, the journal and the cost — is only context below: I also look at this setup so a team can actually manage it.

Updated December 2, 2026.

How it is put together

Air in IDEs is not a model provider here. It is a plugin in IntelliJ IDEA, the place where I start an agent and see what it changed. According to JetBrains documentation, the plugin itself has no separate license, and local agents through Agent Client Protocol (ACP) do not need a JetBrains AI subscription.

The chain looks like this: Air in IDEs talks to the agent over ACP, a wrapper injects a personal key only from an environment variable and never writes it to a file, then the agent runs, for example Codex CLI or Qwen Code. I run Qwen Code as an agent in IntelliJ IDEA, and it talks to QwenCloud Token Plan directly, without the gateway: under the terms, that endpoint may be used only in tools like this. Requests from Codex CLI go to agentgateway; for Qwen models behind the gateway you need QwenCloud Pay-as-you-go, not Token Plan. There is no OpenAI subscription in this setup.

Diagram of the setup: the developer calls Grok Bot and IntelliJ IDEA with the Air in IDEs plugin; the link from Grok Bot to the MCP Server inside the IDE is still being checked; from Air in IDEs, through an ACP wrapper, the agents Codex CLI, Qwen Code and others fan out: Qwen Code goes directly to QwenCloud Token Plan; Codex CLI and the others go to the agentgateway gateway, provider keys are stored in OpenBao, and the developer holds only the gateway key; behind the gateway are OpenCode Go, QwenCloud Pay-as-you-go, NVIDIA NIM, OpenRouter and other providers, including OrcaRouter, TokenRouter and DeepSeek API; Codex CLI separately calls the remote Figma MCP server, still outside the journal; the gateway writes a Langfuse journal over OpenTelemetry

Diagram as of November 15, 2026.

The files below are not a production config, they are a sketch. Instead of addresses and secrets there are only placeholders: the key lives in the environment, and the gateway base URL is not baked into the repository either.

{
  "agents": [
    {
      "name": "codex",
      "command": ["codex-wrapper"],
      "env": {
        "API_KEY": "${API_KEY}"
      }
    }
  ]
}
# agent profile, a sketch
model = "gpt-6-luna"
base_url = "${GATEWAY_URL}"

The model changes with the profile, the tool stays the same. Next to it I also run Qwen Code, another open client. Several agents are described in Air, and I can switch the agent without changing the IDE. Besides Codex and Qwen Code, I also use Junie, Claude, GitHub Copilot, Cursor and Mistral Vibe there.

To switch the model for Codex, for now I have set up separate agents: Codex AGW glm, Codex AGW haiku, Codex AGW kimi, Codex AGW luna and Codex AGW minimax. I will redo this later so that everything runs in one Codex and the model can be chosen there.

For your own models, Codex CLI shows a Model metadata not found warning if there is no metadata catalog, that is how the documentation puts it. I have already set the provider and a separate Codex config for Air on the wrapper, and after that setup I no longer see the warning.

Another direction: an external agent calls the IDE over MCP

Agents reach my IDE in two directions.

The first I have already described: inside the IDE, in Air, the agent works over ACP. I start it there and see what it changed.

The second direction is the reverse. Starting with version 2025.2, IntelliJ IDEA has a built-in MCP Server. The MCP Server plugin ships with the IDE and is enabled by default, but the server itself has to be turned on in the settings, under AI, MCP Server. When you turn it on, the IDE shows what access third-party apps will get to the open projects. From the outside, I have tried sending Grok Bot into this IDE: asking it to write tests, gather information about the project, and things in the same vein. I do not use this actively; a real scenario may come later. Other external agents can come in the same way.

According to JetBrains documentation, an external client gets the IDE’s own tools: work with files and patches within the project, search, inspections, run configurations, the built-in terminal, and rename as a refactoring. The debugger joins that set starting with version 2026.1.3. You can review the tool list and turn them on one by one in the settings, under Exposed Tools; the full list is also in a JetBrains help article. Terminal commands and run configurations ask for confirmation by default, until you turn on the no-confirmation mode, brave mode. For some clients, such as Codex, Claude Code, VS Code and Air, the IDE can write the connection itself; the rest you connect by hand, by copying an SSE, stdio or HTTP Stream configuration. I have brave mode on, so commands and configurations run without confirmation. The list of tools is described in the IntelliJ IDEA documentation.

For a team, what matters to me here is the idea itself. One IDE becomes the place where the work actually happens: the agent can live inside it, as in Air, or come in from the outside, as Grok Bot does, but the code, the tests and the runs go through one place, with the IDE’s indexing and checks, not around them. Calls from this side are already visible in the shared journal.

I have not published IntelliJ IDEA as an MCP Server through agentgateway yet: I do not yet see a scenario where this would be needed. The gateway can do that; it is MCP federation.

Why this matters for a team

I look at this setup not as a trick to “dodge a subscription”, but as a circuit a team can actually run, if there are several people.

One gateway gives one entry point. Each person has their own key, not a shared secret in a settings file. The model is chosen by profile: if one door does not answer or has hit a limit, you can switch to another without changing the tool. Requests and tool calls go over OpenTelemetry into Langfuse, which I run myself: you can see who called what, how many tokens and calls there were, and what it cost in money. I watch OpenCode Go spend in the subscription’s dollar window. Secrets in the journal are masked. Provider keys live in OpenBao; I only hold the gateway key. Codex CLI itself also writes OpenTelemetry traces, on top of the gateway.

But individual subscriptions do not scale on their own. OpenCode Go is meant for a workspace with one member; for several people you need Go Teams, $20 per person per month, two people minimum. QwenCloud Token Plan Individual is also for personal use only: you can put the key on several of your own devices, you cannot share it, and a team needs Team Edition. I do not put this key on the gateway. A personal gateway for one person with their own OpenCode Go or QwenCloud Pay-as-you-go key still fits this picture. I would not describe one key handed out through a shared gateway to several people, and I would not do it myself.

I write the full text of prompts in the journal only for myself, in the lab. In a team, with other people’s data, you need separate instances and your own rules for what to write and who can look.

Providers and limits

I have several doors wired into the gateway. OpenCode Go costs $10 a month, and the limits are not a request count, but a separate dollar window for each model: 20% per five hours, 50% per week, 100% per month. Also connected through the gateway are QwenCloud Pay-as-you-go, NVIDIA NIM trial access, OpenRouter, OrcaRouter, TokenRouter, DeepSeek API and other providers. NVIDIA NIM allows up to 40 requests per minute for most models, for prototyping only; for OpenRouter’s free models: 20 requests per minute and 50 per day, and after you buy credits from $10 the daily limit is 1,000. QwenCloud Token Plan Individual, Standard tier: on November 15, 2026 I paid a year in advance, $195.00 before tax ($214.99 with tax). The plan includes 80,000 credits a month, a rough guide of 3–4 agents at once. I use this plan from Qwen Code directly, under the Token Plan terms, not through the gateway.

I did a narrow run on eight of my own tasks, but this is not a benchmark. On it gpt-6-luna closed 8 out of 8 in about 17 seconds, claude-haiku-5-5 in about 21 seconds, and kimi-k3, glm-5.3 and minimax-m3 also 8 out of 8. I do not have exact times for those three, or a full check of deepseek-v4-flash against the log, right now. The earlier deepseek-v4-flash took about 188 seconds on the same tasks.

My day-to-day place

Air with Codex through the gateway is now my main place of work. Cursor and Grok Bot remain in use too. The Cursor Pro+ subscription, by the invoice of May 24, 2026, is $576.00 a year; in the account that shows as $48 a month, and the next renewal is May 24, 2027. Grok Bot is listed in the account as included in Pro+, with a weekly limit.

Context: Figma

Figma matters in my daily work, and the subscription is paid: Professional, one Full seat, $192.00 a year by the invoice of June 21, 2026, 3,000 AI credits a month. It connects to the agent through the official remote Figma MCP server; in Codex CLI that is codex mcp add and codex mcp login. Figma MCP calls now go through the gateway and land in the shared journal. Most MCP tools do not spend credits; generate_image, generate_vector_illustration and send_prompt in Make do. Reads on my seat are limited to 200 calls a day and 10 a minute; writes are not part of this limit. Starting November 19, 2026, the built-in Figma agent in Slides and FigJam begins to spend credits. If you build a presentation through Codex and the ordinary MCP write tools, the documentation says credits are not charged for that.

What it costs

The figures come from my invoices and a check of the official pages on November 14–15, 2026, before tax and without hardware.

ComponentPlanPriceSource
Codex CLIopen client, Apache 2.0$0 for the programgithub.com/openai/codex
Air in IDEsIDE plugin, no required JetBrains AI subscription for local ACP agents$0 for the plugin; I am not publishing the IDE license itself, or what I pay for it, for nowAir in IDEs
agentgatewayself-hosted, Apache 2.0$0 for the programFAQ
Langfuse v4self-hosted; core is MIT, EE catalogs under a separate license$0 for the open coreSelf-Hosted Pricing
OpenCode Goindividual, one member$10/mo, $120 a year if paid monthlyGo documentation
QwenCloud Token PlanIndividual Standard, yearly payment from my invoice$195.00 a year before tax ($214.99 with tax), paid November 15, 2026my invoice; Token Plan page
Cursor and Grok BotPro+, yearly payment from my invoice$576.00 a year, invoice of May 24, 2026. This plan is no longer sold to new buyers; the comparable Super plan is $1000 a yearmy invoice; Cursor pricing, Grok Bot
FigmaProfessional, 1 Full, year$192.00, invoice of June 21, 2026my invoice; figma.com/pricing
NVIDIA NIM, OpenRouter :freetrial access and free models$0 within the published limitsNIM, OpenRouter limits
Hardware for the gateway and Langfusemy ownI have not added up the amount yetno public price

In actual payments of mine, before tax: $576 + $192 + $120 + $195 = $1083 a year, about $90 a month, without hardware.

If I were putting together a similar place from scratch today, instead of my Pro+ I would most likely have to take Super at $1000 a year. Then Super, Figma Full, OpenCode Go and QwenCloud Token Plan at my yearly payment of $195 would come to about $1507 a year. The Token Plan figure here is my payment, not the price on the storefront. This is a storefront estimate plus my payment for QwenCloud Token Plan, not my full invoice for a new set. For a team, individual OpenCode Go and QwenCloud Token Plan cannot be shared: those already have team plans.

For now

I know that Codex can be set up in Air without an OpenAI subscription and fed my own models through a gateway. I already use this setup actively. Right now it seems to me that this is the setup that gives you control: keys, model choice, the journal and the cost in one place, not in five separate subscriptions.

MCP, including Figma, already goes through the gateway and lands in the shared journal. I have not added up the hardware cost for the gateway and Langfuse yet. I am not publishing the IDE license itself, or what I pay for it, for now.

I am very interested in how others organize team work with AI tools: observability, money, convenience and everything else. If you want, tell me how it is set up for you.