Skip to content

fix(usage): reduce price input step to 0.0001 for sub-cent precision#2793

Merged
farion1231 merged 1 commit into
farion1231:mainfrom
rogerdigital:fix/pricing-cache-read-step
May 18, 2026
Merged

fix(usage): reduce price input step to 0.0001 for sub-cent precision#2793
farion1231 merged 1 commit into
farion1231:mainfrom
rogerdigital:fix/pricing-cache-read-step

Conversation

@rogerdigital

Copy link
Copy Markdown
Contributor

Summary

  • Reduce all price input step from 0.01 to 0.0001 to allow sub-cent precision (e.g. DeepSeek cache read cost $0.0028/million tokens)
  • Extract step value to PRICE_INPUT_STEP constant
  • Add tests covering step attribute on all four price fields and precise value input

Closes #2503

Test plan

  • npx vitest run tests/components/PricingEditModal.test.tsx — 3/3 passed
  • Manual: open pricing edit modal, verify all price fields accept values like 0.0028

The step was 0.01, preventing input of prices like DeepSeek's cache read
cost ($0.0028/million tokens). Extract step value to a constant and apply
to all four price fields.

Closes farion1231#2503
@farion1231

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ 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".

@farion1231 farion1231 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you for your contribution!

@farion1231
farion1231 merged commit 6e8ee09 into farion1231:main May 18, 2026
dfbb pushed a commit to dfbb/cc-switch that referenced this pull request May 20, 2026
…arion1231#2793)

The step was 0.01, preventing input of prices like DeepSeek's cache read
cost ($0.0028/million tokens). Extract step value to a constant and apply
to all four price fields.

Closes farion1231#2503
@rogerdigital
rogerdigital deleted the fix/pricing-cache-read-step branch May 20, 2026 16:49
royccai pushed a commit to royccai/cc-switch-mod that referenced this pull request May 31, 2026
…arion1231#2793)

The step was 0.01, preventing input of prices like DeepSeek's cache read
cost ($0.0028/million tokens). Extract step value to a constant and apply
to all four price fields.

Closes farion1231#2503
delta-lo pushed a commit to delta-lo/cc-switch-mod that referenced this pull request May 31, 2026
…arion1231#2793)

The step was 0.01, preventing input of prices like DeepSeek's cache read
cost ($0.0028/million tokens). Extract step value to a constant and apply
to all four price fields.

Closes farion1231#2503
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.

模型定价缓存读取成本步长过大导致无法设置准确价格

2 participants