Run Local AI Models Inside the ChatGPT Desktop App

A free open-source tool lets you swap OpenAI's cloud models for your own local hardware without leaving the familiar ChatGPT interface.
For many users, the ChatGPT desktop application is a direct line to OpenAI's cloud servers. However, a new development allows that same interface to communicate with models running entirely on local hardware. This shift means that conversations and coding tasks can be processed by your own computer, eliminating the need to send data to external servers for every query.
The tool behind this capability is called opencodex, a free and open-source utility that acts as a middleman. By intercepting the requests that the desktop app makes to OpenAI, it redirects them to alternative model providers. As reported by XDA Developers, this setup allows users to mix cloud-based models with local ones, such as Qwen 3.8 27B or GLM-5.3-Flash, within a single, unified interface.
How the proxy mechanism works
The technical core of opencodex is a proxy server that runs locally on your machine. When installed, it modifies a configuration file to change the destination address for API calls. Instead of pointing to OpenAI's servers, the application now sends its requests to a local address. The proxy then aggregates available models from various sources, presenting them as if they were all part of the standard OpenAI lineup.
This approach offers a significant advantage in stability. Because opencodex operates as a separate layer rather than modifying the ChatGPT application itself, it remains compatible even after software updates. The application continues to speak its native language, while the proxy handles the translation to whatever model backend is configured, whether that is a local runtime or a remote API.
Setup is simple but limited
Installation requires a single command to start the proxy and a web-based dashboard. Users can then add their preferred model providers, such as Ollama, vLLM, or LM Studio, which are common runtimes for local AI. The system is designed to work over a private network, meaning models can be hosted on different computers within a local network and accessed seamlessly through the desktop app.
The trade-off for this flexibility is a potential degradation in performance for complex tasks. The source material notes that some non-OpenAI models, such as MiniMax M3, struggled with the specific tool-calling structures that the Codex engine expects. While the interface remains consistent, the underlying model's ability to handle agentic workflows may vary significantly depending on the provider.
Monitoring usage and costs
One of the practical benefits of this setup is the visibility it provides into data consumption. The web dashboard included with opencodex tracks token usage, individual API calls, and estimated costs for each model. This allows users to evaluate which models are most efficient for their specific needs, providing a layer of control that is often absent when relying solely on a single vendor's ecosystem.






