{"slug": "using-jetbrains-air-with-codex-and-azure-openai", "title": "Using JetBrains Air with Codex and Azure OpenAI", "summary": "A developer configured JetBrains Air to run a separate \"Codex Azure\" agent through the Agent Client Protocol (ACP), letting the Codex CLI use OpenAI models deployed in Azure OpenAI without editing Codex's config.toml or restarting the app. The setup pins @agentclientprotocol/codex-acp at version 2.2.2 and installs it locally under ~/.local/share/codex-acp rather than running it via npx, to avoid pulling unpinned dependencies, and sets MODEL_PROVIDER to \"azure\" in Air's acp.json file stored under ~/Library/Application Support/JetBrains/Air. The author says the approach works and is \"quite pleasant,\" while noting Air still needs access to the API key environment variable named in the env_key setting.", "body_md": "So I’ve been switching between using the CLI<sup>[1](#fn:1)</sup> for coding and the Codex Mac app for everything else. I’m a Codex guy myself, but if you use Claude I will not judge, nor make any load bearing puns. For now.\n\nAnyways, since the great unification of July 2026, I’ve found the Codex app to be a jumbled mess of threads and chats and projects and whatnot, to the point where I’m using chatgpt.com just to be able to focus on a thread. I am definitely not using it for coding, although it happily displays any and all threads I’ve started across a myriad of projects, making them…challenging to follow and understand.\n\nAlso, I like to switch to using OpenAI models [deployed in Azure](https://vladiliescu.net/notes-on-using-codex-with-azureopenai/) every now and then when tokens are low or when working on something private-er. And, to do this with Codex app you need to set a key in its `config.toml`, restart it, lose the “official openai” threads you had, get new “local” ones, etc. Annoying.  In the CLI it’s just `codex -c model_provider=\"azure\"` :/.\n\nAt the same time, I had access to JetBrains’ attempt at maintaining an edge in the dev tooling space, [Air](https://www.jetbrains.com/air/). Something lighter, more colorful, where copy/paste mostly works as God intended, where I can scroll back upwards on previous threads with no fear, something sane (as compared to the CLI).\n\nPlus, it supports custom agents via ACP, sooooo I used this to set up a separate `Codex Azure` agent for my Azure deployments. And..it works. It’s quite pleasant. Some things are annoying<sup>[2](#fn:2)</sup>, but not enough to stop using it. Here’s how I did it.\n\n## Set up[#](#set-up)\n\nThis is all done using the [Add custom agents](https://www.jetbrains.com/help/air/select-agents-and-models.html#add-acp-agent) feature by the way, so start off by choosing it right after choosing a `New Task`. It will open up an `acp.json` file that you can edit, stored under `~/Library/Application Support/JetBrains/Air`.\n\nNow, this all assumes you’ve gone ahead and added an `azure` configuration for Codex, as mentioned in my [previous post](https://vladiliescu.net/notes-on-using-codex-with-azureopenai/). Note that Air **will** need access to the API key environment variable from your `env_key` setting.\n\nThe easy way (which I **don’t recommend**), is putting in something like:\n\n```\n{\n  \"agent_servers\": {\n    \"Codex Custom\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@agentclientprotocol/codex-acp\"\n      ],\n      \"env\": {\n        \"MODEL_PROVIDER\": \"azure\"\n      }\n    }\n  }\n}\n```\n\nThe reason I don’t like this, is that I’ve become very wary of supply chain security issues and try to avoid very hard getting the latest and greatest version of **anything**, until someone has the chance to look at it and make sure it’s not compromised. `npx -y @agentclientprotocol/codex-acp` will happily run the latest version so that’s a no no for me.\n\nNow, one could do something like this of course, and pin the codex-acp version. But this will not guarantee immutable dependencies :/\n\n```\n{\n  \"agent_servers\": {\n    \"Codex Azure\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"--yes\",\n        \"@agentclientprotocol/codex-acp@2.2.2\"\n      ],\n      \"env\": {\n        \"MODEL_PROVIDER\": \"azure\"\n      }\n    }\n  }\n}\n```\n\nSo, just because I like to make things hard for myself, I saved the entire package on my disk, in a dedicated directory.\n\n```\nmkdir -p ~/.local/share/codex-acp\ncd ~/.local/share/codex-acp\n\nnpm init -y\nnpm install --save-exact @agentclientprotocol/codex-acp@2.2.2\n```\n\nSo now I run something like this.\n\n```\n{\n  \"agent_servers\": {\n    \"Codex Azure\": {\n      \"command\": \"/Users/<YOU>/.local/share/codex-acp/node_modules/.bin/codex-acp\",\n      \"args\": [],\n      \"env\": {\n        \"MODEL_PROVIDER\": \"azure\"\n      }\n    }\n  }\n}\n```\n\nAnd it works, I now have access to the Codex Azure set up right from the Air UI.\n\n## Notes[#](#notes)\n\n- The default model and its reasoning effort are set via `~/.codex/config.toml` . While you can change the model, I haven’t found a way to change the effort. I wasn’t even sure of what value Air was using for effort when using custom agents (the effort selector is missing for them at this time), but a quick look at the day’s sessions under`~/.codex/sessions/` confirmed this.\n\n```\nmodel = \"gpt-6-sol\"\nmodel_reasoning_effort = \"xhigh\"\n```\n\n- Air will list supported models even if you haven’t deployed them in Azure. For any model you pick, its Azure deployment name needs to match the Codex model ID (for example, `gpt-6-sol` for “6 Sol”).", "url": "https://wpnews.pro/news/using-jetbrains-air-with-codex-and-azure-openai", "canonical_source": "https://vladiliescu.net/jetbrains-air-with-codex-and-azure-openai/", "published_at": "2026-10-22 10:52:57+00:00", "updated_at": "2026-10-22 11:10:43.433432+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents", "agent-protocols", "ai-products"], "entities": ["JetBrains Air", "Codex", "Azure OpenAI", "OpenAI", "Agent Client Protocol", "@agentclientprotocol/codex-acp", "Claude"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/using-jetbrains-air-with-codex-and-azure-openai", "markdown": "https://wpnews.pro/news/using-jetbrains-air-with-codex-and-azure-openai.md", "text": "https://wpnews.pro/news/using-jetbrains-air-with-codex-and-azure-openai.txt", "jsonld": "https://wpnews.pro/news/using-jetbrains-air-with-codex-and-azure-openai.jsonld"}}