Skip to content

[codex] add usage currency auto detection#64

Merged
Wangnov merged 3 commits into
mainfrom
codex/usage-currency-rules
Apr 30, 2026
Merged

[codex] add usage currency auto detection#64
Wangnov merged 3 commits into
mainfrom
codex/usage-currency-rules

Conversation

@Wangnov
Copy link
Copy Markdown
Owner

@Wangnov Wangnov commented Apr 29, 2026

Summary

  • Add configurable usage currency display with currency = "auto" plus fixed currency overrides.
  • Detect auto currency from custom endpoint/model rules, upstream cost.currency, built-in endpoint rules, and built-in model fallbacks.
  • Cover common Claude Code provider hosts including DeepSeek, GLM/Z.ai, MiniMax, Kimi, DashScope/Model Studio, Volcengine/BytePlus, Tencent Hunyuan, Baidu Qianfan, and Xiaomi MiMo.
  • Document the new configuration and expose the fixed currency field in the TUI config metadata.

Validation

  • cargo test usage --all-targets
  • make ci

Closes #62

@Wangnov Wangnov marked this pull request as ready for review April 29, 2026 17:12
Copy link
Copy Markdown
Owner Author

Wangnov commented Apr 29, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3fb32fdcd5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/tui/sections.rs Outdated
Comment thread src/components/usage.rs
Copy link
Copy Markdown
Owner Author

Wangnov commented Apr 29, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58a0f93221

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/components/usage.rs
Comment thread src/components/usage.rs Outdated
Copy link
Copy Markdown
Owner Author

Wangnov commented Apr 29, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Wangnov Wangnov merged commit 864bd4c into main Apr 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: 支持多币种显示,根据 provider 自动选择货币符号

1 participant