The author tested a local LLM integration using a MacBook Pro 16 (2019) with an Intel Core i7, 16 GB of RAM, and a Radeon Pro 5300M GPU. The setup utilized Ollama with Gemma 3 4B and Gemma 2 2B models connected to Codex via an MCP server to automate routine tasks like log analysis and commit message generation.
The experiment revealed that using a local model as an intermediary for simple tasks did not reduce cloud token consumption. In fact, the process often doubled the input token usage compared to a direct Codex query, as the cloud model required two passes: one to call the tool and another to process the local output.
Technical limitations were identified during the testing. The local models struggled with security reviews and complex business logic, often providing incorrect code suggestions. Furthermore, the Gemma 3 4B model failed to function as a fully local agent because it lacked support for the tool-calling schemas required by Codex.
The author concluded that small local models are effective for mechanical text processing but insufficient for critical security or logic tasks. Future plans involve shifting to a local-first architecture where tasks are initially processed by Ollama, escalating to the cloud only when necessary to achieve actual cost savings.






