Comment by daytonix
1 day ago
have used both pi and opencode for the last 6 months, haven't opened a proprietary harness (cc, codex, cursor) in that same amount of time. right now i'm on pi and i can switch seamlessly between any model across any provider i want, even mid session. can even point them at locally running models.
i think people don't realize how much better life is over on this side, cc and codex rely entirely on vendor lock in imo.
Does a mid-session provider switch result in loading the entire context into the new model, inflating session cost?
I don't think I understand the token/cost implications of this feature
Yes you pay a big burst right after switching. After that, everything is cached and it's smooth sailing.
Its nice if you used local, but needed å beefier modell, or more context Window. It will eat input tokens, but you do that all the time unless you have input caching.
Try the role-model Pi extension I built, to let Pi determine when to switch to a different model in your pool.
https://github.com/try-works/role-model
Haha I pretty much commented the same thing one minute apart.
You can use Claude Code with a self hosted model no problem. I don't believe you can switch during a session though.
Are you using openrouter or something else?
codex is open source https://github.com/openai/codex/ it's definitely geared towards openai but it is completely open source
why did you switch from oc to pi?
i like the more minimal design of the tui, feels more integrated with my existing terminal workflows. oc always looked a little out of place. i really like pi's extension ecosystem as well.
Same here. Moving from OC to Pi also taught me one more time that less is more and I don't need most of the features I thought I needed.
[dead]