Ollama: Modernizing Codex Configuration
Today we're diving into a nice cleanup effort by Eva H who tackled some deprecation warnings in the Ollama-Codex integration. The main pull request replaces the old OPENAI_BASE_URL environment variable with a proper config.toml profile system, making the setup more robust and future-proof. It's one of those satisfying maintenance tasks that makes the developer experience just a little bit smoother.
Duration: PT3M48S
https://podlog.io/listen/ollama-3aed006f/episode/ollama-modernizing-codex-configuration-65cb786c
Transcript
Hey there, developers! Welcome back to another episode of the Ollama podcast. I'm your host, and it's April 2nd, 2026 - hope you're having a fantastic start to your week! You know that feeling when you finally clean up that one nagging deprecation warning that's been staring at you from the logs? Well, today we're talking about exactly that kind of satisfying cleanup work.
We've got some really nice quality-of-life improvements to dive into, thanks to the excellent work from Eva H. Let's jump right in!
Our main story today is all about modernizing how Ollama integrates with Codex. Eva H stepped up with pull request 15041, and honestly, this is the kind of thoughtful maintenance work that makes me genuinely excited. She tackled replacing the deprecated OPENAI_BASE_URL environment variable with a proper configuration system using config.toml profiles.
Now, if you've been using the Ollama-Codex integration, you might have seen that warning message: "OPENAI_BASE_URL is deprecated. Set openai_base_url in config.toml instead." Well, Eva didn't just fix the warning - she completely revamped how this configuration works to make it more robust and user-friendly.
The new approach uses a profiles.ollama section in your config.toml file at ~/.codex/config.toml, and you launch codex with the --profile ollama flag. It's cleaner, more explicit, and follows modern configuration patterns. But here's what I really love - she also replaced the old --oss flag with an explicit model_providers.ollama-launch entry that gets written directly to the config file. This means codex can route requests straight to your local Ollama server without any unnecessary detours.
The pull request touched three key files - the main codex launch code, comprehensive tests, and updated documentation. Speaking of tests, Eva added over 200 lines of test coverage, which is fantastic. That's the kind of thorough approach that gives you confidence in your changes. One reviewer gave it their approval after nine thoughtful comments, which tells me this was a well-reviewed, collaborative effort.
What makes this particularly nice is that it's not just a quick fix - it's a thoughtful migration path. The old way was working, but this new approach is more maintainable and aligns with how modern tools handle configuration. It's the difference between a quick hack and doing it right.
The fact that this spans 304 lines of additions and only 22 deletions tells us Eva was building something new rather than just patching the old system. That's often the right call when you're dealing with deprecated patterns - sometimes it's better to do it properly than to keep applying band-aids.
For those of you working on similar integrations or dealing with your own deprecation warnings, this is a great example of how to approach modernization. Document the changes clearly, provide a smooth migration path, add comprehensive tests, and update your documentation so future developers understand the new way of doing things.
Today's focus: If you're using the Ollama-Codex integration, this is a perfect time to migrate to the new configuration approach. Check out the updated documentation and make the switch to the config.toml profile system. And if you have your own deprecated patterns lurking in your codebase, maybe take inspiration from Eva's thorough approach here.
That's a wrap for today's episode! It's always satisfying to see deprecation warnings get the attention they deserve, and Eva H really delivered a quality solution here. Thanks for tuning in, keep shipping great code, and I'll catch you tomorrow for another dose of development goodness. Until then, happy coding!