Uh oh!
There was an error while loading. Please reload this page.
feat(opencode): add codex estimated cost flag - #35131
Conversation
The following comment was made by an LLM, it may be inaccurate: The only potentially related PR found is #30164 "feat(tui): show estimated live token throughput in footer", but this appears to be about displaying token throughput in the UI rather than adding a cost estimation flag for Codex. They are separate features. No duplicate PRs found |
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
- keep Codex subscription cost zeroed by default - add opt-in API-equivalent estimates via environment flag - document and test both pricing modes Signed-off-by: Major Hayden <major@mhtx.net>
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes#35133
Type of change
What does this PR do?
Keeps ChatGPT/Codex subscription auth showing actual marginal cost as
$0.00by default.Adds
OPENCODE_CODEX_SHOW_ESTIMATED_COST=trueso users can opt in to API-equivalent estimated costs for Codex models.Documents the flag and covers default/opt-in model pricing behavior.
How did you verify your code works?
bunx prettier --check packages/opencode/src/effect/runtime-flags.ts packages/opencode/src/plugin/index.ts packages/opencode/src/plugin/openai/README.md packages/opencode/src/plugin/openai/codex.ts packages/opencode/test/plugin/codex.test.tscd packages/opencode && bun test test/plugin/codex.test.tscd packages/opencode && bun typecheckbun turbo typecheckScreenshots / recordings
Not a UI change.
Checklist