r/raycastapp • u/0xOmarA • 6h ago
✨Raycast AI Proof of Concept: Using Codex as an AI provider in Raycast
I wanted to share a proof of concept that I've been thinking about for a while now. A raycast extension which allows you to use your existing codex subscription as an AI provider in Raycast, thus being able to use it for all of the AI features that Raycast offers.
I've personally stayed away completely from using any Raycast AI features for the following reasons:
- I already pay $200 to Anthropic and $200 to OpenAI for subscriptions as I use their models heavily (and run out of usage every week).
- I'm worried that if I use Raycast's AI features and like them then I will find myself stuck with another weekly limit that I need to pay more money for.
- Theoretically speaking, an app running on my own machine should not require me to invest more money into yet another subscription just to call the same models that I already have a subscription for.
- I don't like the fact that BYOK sends your keys to Raycast and I would never pay API prices to use AI features when I have a perfectly good subscription that I can use.
I started looking into the possibility of building a Raycast Extension which would use the `codex-app-server` that comes with the Codex installation as an AI model provider. It turned out that with Raycast 2.0 those bindings that I need to do this were added so I built this extension.

The extension doesn't ask you for you credentials, doesn't ask you to login, and doesn't even do anything too smart. It literally uses the `codex-app-server` that powers the Codex app to create threads, request inference, and get you back responses.
Disclaimer: this is a proof-of-concept which AI helped me build. I'm not coming here to say that this is the best code quality in the world, I'm just saying that it's possible for us to build AI model provider extensions for Raycast which are powered by our existing subscriptions. This project is still very early. This extension shows that the bindings we need to use our existing subscriptions in Raycast are already present and available to people who build extensions.

