[Feature] Support Venice USD and DIEM balances and automatic model pricing for custom provider aliases
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Start with the Venice quota probe in src/providers/quota/vendor-probes-key.ts, which currently runs only for the exact provider ID venice, calls /billing/balance, and reads balance or balance_usd. Check how providers using the official Venice base URL are matched, then switch the probe to GET /api/v1/api_keys/rate_limits and read data.balances.USD and data.balances.DIEM. Done when custom-named Venice providers show both balances in the dashboard and in ocx provider quota --json; the automatic pricing part is a separate, larger change.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Area
Multiple areas
What are you trying to accomplish?
I use Venice through OpenCodex with a custom provider name. I want to see the remaining USD and DIEM balances in the Providers dashboard and have OpenCodex use Venice's current catalog prices for cost estimates in Logs and Usage. If I configure multiple Venice providers, I want each balance report to appear under its configured provider name.
What prevents this today?
On OpenCodex Desktop 2.100.6 for Windows, inference works with a custom Venice provider such as venice-custom, but the provider has no balance entry in the dashboard or in ocx provider quota --json.
The balance probe only runs for the exact provider ID venice. It calls /billing/balance, which requires an Admin key, and looks for balance and balance_usd. Venice's current documentation shows balances.diem and balances.usd for that endpoint.
When automatic model pricing is unavailable, I have to look up and enter the rates manually, then repeat the process when Venice changes its prices.
What should OpenCodex do?
- Show the remaining USD and DIEM balances separately for providers using the official Venice API URL, including providers with custom names. Reuse each provider's existing Inference key.
- If feasible, populate and refresh cost estimates from Venice's published model prices when its catalog is refreshed. Match models by exact upstream ID and include input, output, cache read/write, and long-context rates where Venice publishes them.
- Keep manually configured prices as overrides.
Example usage or interface
- Configure
venice-customwith the base URLhttps://api.venice.ai/api/v1and a Venice Inference key. - Open the provider in the dashboard. Its balance section shows separate rows such as
USD 25.00andDIEM 90.50when Venice reports those values. (internally the values could be aggregated in case a single USD balance is needed) - Run
ocx provider quota --json. The quota report includesvenice-custom. - Refresh the model catalog. An enabled Venice model with published pricing shows an estimated cost in Logs and Usage without manual price entry. An existing manual price still takes precedence.
Alternatives or workarounds
I can check the actual balances in Venice's API settings and manually enter per-model prices in OpenCodex. I also considered using the canonical venice ID, but that only covers one configured provider and still leaves the Admin-key requirement and response-format mismatch in v2.100.6.
Additional context
- Venice documents that
GET /api/v1/api_keys/rate_limitsaccepts both Inference and Admin keys. It returns balances underdata.balances.USDanddata.balances.DIEM. API key guide · Rate Limits and Balances API - Each staked DIEM provides $1 in Venice API credit per day. Venice DIEM guide
- The public
GET /api/v1/models?type=textendpoint returns model IDs and pricing undermodel_spec.pricing. List Models API · Venice model catalog and prices - OpenCodex v2.100.6 Venice quota probe · Venice Billing Balance API
Checks
- I searched existing issues and documentation.
- This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
- I removed secrets and personal data.
- Ngôn ngữ chính
- TypeScript
- Star
- 16.9k
- Fork
- 1.3k
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 844
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của lidge-jun/opencodex
-
[Provider] antigravity-acp catalog omits gemini-4-hydrogen and gemini-4-neon that agy acp offersCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởcatalog provider provider-compatibility
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
lidge-jun/opencodex#9037 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Polish Spanish documentation wording and product namesCó thể đã có người làm @federicorv25 đã nhận 7 ngày trước. Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug cli platform service
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] Anthropic pool: one 429 leaves the active account rate limited with a fake weekly 100%, and background refresh skips it (2.100.7)Có thể đã có người làm @samirmedani đã nhận hôm nay. Đang mởaccount-pool bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
lidge-jun/opencodex#9032 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug][Windows]: ocx stop impossible when WMI GetOwnerSid exceeds the 1 s per-call capCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug cli platform service
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
lidge-jun/opencodex#9026 · 4 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của lidge-jun/opencodex
Issue tương tự
-
Project submission: xmcp DocsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
slavakurilyak/awesome-ai-agents#1005 ·
-
kind/bug triage/unresolved
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
Maintainer thường phản hồi trong vòng 1 ngày
-
effort:S P3 refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nightscout/nocturne#3735 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
wpilibsuite/systemcore-blocks-interface#641 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Site] Active section detection should respect scroll-margin-topCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởarea/web reproduced type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
anomalyco/opencode#65384 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày