[Feature]: Codiv (api.codiv.ai) as a JEV-compatible decision provider with pacing, retry and fallback
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
- 22/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 jev-decision call in src/combos/jev.ts (around lines 743-800), then src/lib/provider-outbound.ts, which currently bypasses requestPacing, retryOn429 and the provider headers. src/lib/upstream-retry.ts (around line 435) shows why 529 is not retried. Done means the opt-in pacing, header forwarding and retry apply to decision traffic, and an ordered decisionProviders list falls back in order, with unchanged behaviour when these settings are unset. The issue leaves the design open, so confirm the scope with maintainers first.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Area
Proxy and routing
What are you trying to accomplish?
Codiv exposes a JEV/TypeSafe-compatible System One decision API (POST /v1/systemone, model openjev-0.1). We want to use it through OpenCodex in two ways:
- as a decision provider for
jevcombos, and as a fallback for the TypeSafejevprovider: if TypeSafe errors or times out, Codiv makes the decision; - as a shared, rate-limited path for our own services that call Choice/Noul directly, so that several clients sharing one Codiv key stay under its limit.
What prevents this today?
We checked 2.81.0:
jev-decisionis only called internally by thejevcombo strategy (src/combos/jev.ts~743-800). There is no client-facing System One route, only/api/combos/decision-testand/api/combos/decision-discovery.jev-decisionrequests go throughproviderOutboundPost(src/lib/provider-outbound.ts). That path bypassesrequestPacingandretryOn429, and does not forward the provider's configuredheaders; the User-Agent defaults toopencodex.- A combo has one decision provider. There is no ordered fallback chain between decision backends.
529(overloaded) is not retried (src/lib/upstream-retry.ts~435).
What should OpenCodex do?
All opt-in, current behaviour unchanged when unset:
- Apply
requestPacing(requestsPerMinute,maxConcurrentRequests) andretryOn429withRetry-Aftersupport tojev-decisiontraffic, and allow529to be treated as retryable for such providers. - Forward the provider's
headerson decision requests. Codiv requires aUser-Agentheader; without it Cloudflare returns 403/1010. - Allow an ordered list of decision backends, each with its own model, e.g.
jev(TypeSafe) followed bycodiv(openjev-0.1), with the existing fail-open behaviour after the last one. - Optional: a data-plane passthrough route (e.g.
/v1/systemone) authenticated with a data key, so external clients share the same pacing and fallback.
Example usage or interface
"providers": {
"codiv": {
"adapter": "jev-decision",
"baseUrl": "https://api.codiv.ai/v1/systemone",
"apiKey": "${CODIV_API_KEY}",
"headers": { "User-Agent": "my-client/1.0" }, // proposal: forwarded
"requestPacing": { "enabled": true, "requestsPerMinute": 250, "maxConcurrentRequests": 8 }, // proposal: applied
"retryOn429": { "enabled": true, "maxAttempts": 3, "intervalMs": 5000, "maxIntervalMs": 30000 }
}
},
"combos": { "jev-auto": {
"strategy": "jev",
"decisionProviders": [ // proposal
{ "provider": "jev" },
{ "provider": "codiv", "model": "openjev-0.1" }
],
"targets": [ … ]
}}
Alternatives or workarounds
- Point the single
jevprovider at Codiv instead of TypeSafe. This loses TypeSafe and still has no pacing or retry. - Rate-limit in each client separately. This does not coordinate clients that share one key.
Additional context
Codiv's limit is per key (1200 rpm). With several services on one key we already see 429s at about 300 rpm, which is why central pacing matters.
Related: #6268 (self-hosted JEV-compatible decision endpoints), #6384 (configurable decision endpoints), #6665 (demand-level routing for JEV combos).
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 4 giờ
- Pull request đã merge (30 ngày)
- 814
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
-
bug gui platform
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
lidge-jun/opencodex#9172 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature]: Include provider, model and account label in the `upstream failure` service.log lineCó thể đã có người làm @EnesKartal đã nhận 4 ngày trước. Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
lidge-jun/opencodex#9057 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Provider] antigravity-acp catalog omits gemini-4-hydrogen and gemini-4-neon that agy acp offersCó thể đã có người làm @sedoll đã nhận 6 ngày trước. Đ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
-
bug cli
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
lidge-jun/opencodex#9171 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
account-pool enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
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ự
-
manually bump balena-preload to ^19.0.6Có thể đã có người làm @shaunmulligan đã nhận hôm nay. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 66/100
balena-io/balena-cli#3200 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`MaterializedChatMessage._text` is quadratic in the number of text chunks (`+=` followed by `endsWith`), driving the extension host to heap OOMCó thể đã có người làm @olegius88 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
microsoft/vscode-prompt-tsx#205 ·
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 64/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
melgarafael/DeskcommCRM#5340 ·
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 83/100
ehmpathy/rhachet-roles-ehmpathy#1529 ·
Maintainer thường phản hồi trong vòng 1 ngày