Repository navigation
Description
Summary
OpenCodex 2.72.0's JEV Combo cannot use a self-hosted JEV-compatible typed-decision service, even when the jev provider is configured with a local endpoint and allowPrivateNetwork: true.
This prevents local replacements such as Laya-MLX from serving the decision step while keeping the normal Combo targets unchanged.
Reproduction
Environment: macOS, OpenCodex 2.72.0, local jev provider, Combo strategy jev.
Example provider configuration (the key is only a non-secret placeholder):
{
"jev": {
"adapter": "jev-decision",
"baseUrl": "http://127.0.0.1:8001/v1/systemone",
"authMode": "key",
"apiKey": "local-placeholder",
"allowPrivateNetwork": true
}
}The local service implements the System One decision contract, exposes a /models discovery endpoint, and returns a typed route choice such as answers.route.choice.
Observed behavior:
- Model discovery succeeds with HTTP 200.
- A
6-Astrarequest also succeeds with HTTP 200. - The local service receives the discovery GET, but no decision POST.
- OpenCodex request history records
jevDecision.gate = "missing_key"and routes to the first eligible target instead.
Root cause in v2.72.0
The current implementation has three coupled constraints:
src/combos/jev.tsonly treats the configuredjevprovider as authoritative whenproviderMatchesRegistryTransport("jev", configured)is true. A local base URL does not match the registry's official TypeSafe URL, so the configured key and destination are ignored.- The resolver posts to the hard-coded
JEV_API_URLinstead of the configured provider base URL. src/lib/provider-outbound.tsrejects every non-HTTPS POST before the private-network policy can evaluate an explicitly opted-in loopback/private destination.- The provider connectivity probe in
src/server/management/provider-routes.tsonly runs the JEV decision probe for the canonical registry transport.
Relevant source files:
Proposed behavior
Please add an explicit, backward-compatible opt-in for self-hosted JEV-compatible endpoints:
- When the
jevprovider usesadapter: "jev-decision", a non-emptybaseUrl, andallowPrivateNetwork: true, use that configured endpoint and configured API key for the JEV decision request. - Keep the current official TypeSafe JEV URL and credential behavior as the default when no custom endpoint is configured.
- Allow
http:only for destinations proven to be loopback/localhost/private and explicitly allowed byallowPrivateNetwork; continue requiring HTTPS for public destinations. - Continue rejecting metadata, link-local, and unspecified destinations, and preserve redirect blocking.
- Use the same configured endpoint in the provider connectivity probe.
- Keep the existing fail-open behavior for timeout, network, HTTP, malformed, or invalid decisions.
A separate provider field such as decisionService would also work if that is preferable to extending the jev provider semantics. The important part is an explicit opt-in rather than silently accepting arbitrary JEV destinations.
Suggested acceptance coverage
- Existing canonical TypeSafe JEV tests remain unchanged.
- A loopback HTTP fixture receives the decision POST and produces
gate: "apply". - Missing credentials, timeout/network errors, malformed responses, and invalid choices still fall back safely.
- The connectivity test succeeds for an opted-in self-hosted endpoint.
- Security tests reject public HTTP, metadata, link-local, and unspecified destinations.
Activity
Ingwannu commentedon Oct 1, 2026
There are overlapping implementations for this request: #6275 and the JEV work in #6302 (the separate #6348 was closed after being folded into #6302). Please converge on one owner-selected contract before integration rather than landing competing endpoint/key resolution behavior. In particular, discovery success is not decision-POST proof: acceptance needs the actual outbound policy against an explicitly configured local service, the matching credential destination, typed-decision parsing, and unchanged fallback when unavailable. None of these draft PRs is a shipped fix yet.
github-actions commentedon Oct 1, 2026
Automated translation bookkeeping — detected language: English.
lidge-jun commentedon Oct 1, 2026
Fixed on
devby #6364 (squash06cc3815c0). A JEV combo can now point its decision at a self-hosted System One-compatible endpoint: add ajev-decisionprovider whosebaseUrlis the full/v1/systemoneURL and set the combo'sdecisionProvider. Private-network endpoints requireallowPrivateNetwork: trueon that row, and TypeSafe credentials are never sent there. A combo can also decide with any model opencodex already routes. The setup is in the combo guide. It ships in the next release. Thanks for the report, @jyu-zhou.