Skip to content

Add cached price per million in model list - #1368

Merged
HaiHui886 merged 1 commit into
mainfrom
sync_mr_2836_bbedf6b
Aug 17, 2026
Merged

Add cached price per million in model list#1368
HaiHui886 merged 1 commit into
mainfrom
sync_mr_2836_bbedf6b

Conversation

@Rader

@Rader Rader commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary:

  • Added CachedPricePerMillion field to the ModelTokenPrice struct to expose cached token pricing in the /v1/models API, which was previously missing.
  • Populated the new field in toTokenPrice() by calculating it from SkuCachedPrice (using the same conversion logic as standard prices), setting it to nil when unconfigured (SkuCachedPrice < 0) to maintain backward compatibility via omitempty.

@Rader

Rader commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator Author

Depends on #1367

@HaiHui886 HaiHui886 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@HaiHui886
HaiHui886 merged commit 5fca294 into main Aug 17, 2026
7 checks passed
@HaiHui886
HaiHui886 deleted the sync_mr_2836_bbedf6b branch August 17, 2026 01:15
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