Repository navigation
feat(extension): decision-model providers (Clef, Perplexity Decider, OpenAI Decisions) - #3102
Draft
miguelg719 wants to merge 2 commits into
Draft
miguelg719 wants to merge 2 commits into
miguelg719 wants to merge 2 commits into
Conversation
…ty Decider, OpenAI Decisions next to TypeSafe Jev
🦋 Changeset detectedLatest commit: d523d42 The changes in this PR will be included in the next version bump. This PR includes changesets to release 21 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This was referenced Oct 4, 2026
Draft
Draft
…after the decisions rename
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack
#2951 → #2952 → #2953 → #2954 → #2955 → #2988 → #2993 → #2994 → this PR. Base:
jev/8-target-readiness.Why
The decisions path was written against one model (TypeSafe Jev). In the same week Cloudflare shipped Clef, Perplexity shipped Decider, and OpenAI announced a Decisions API: all answer typed questions with probabilities instead of text. Nothing above the HTTP client depends on which one answers, so the client becomes a provider seam.
What
decisions/providers.ts— one codec per provider: how to address it, encode a request, read answers.typesafe(default): unchanged wire, byte for byte (asserted by a test).cloudflare: Clef /clef-flashon Workers AI (/accounts/{accountId}/ai/run/@cf/cloudflare/<model>), System One body, answers inside{ result }.perplexity:pplx-decider-v1-27bon/v1/decisions, System One body.openai: Decisions API preview. No public schema exists; this follows the request/response recorded by a preview user (the same recording other libraries use):{ input, questions: [{type: "predicate"|"choice", name, …}] }→{ answers: [...] }with probability lists.decisions/client.ts(wastypesafeClient.ts) — everything shared, so the pipeline sees one behaviour:Retry-After-aware retry, and the circuit breaker now keyed per provider + endpoint + key.experimentalDecisions.providerand.accountId(schema + regenerated artefacts). Evals:EVAL_DECISIONS_PROVIDER.Testing
decisionsProviders.test.ts(26)403 Decision API is not enabledgate named. Mutation-checked: breaking the Perplexity codec or the splitter fails the suite.decisionsCrossProvider.test.ts(24)decisionsProvidersLive.test.tsDECISIONS_LIVE=1+ a key), skipped in CI.Live status, stated plainly: TypeSafe passes the live conformance run (
jev-1.13.0, 203 ms). Our OpenAI key gets403 Decision API is not enabled for this user, reported as a skip. No Cloudflare or Perplexity credentials were available, so those two are verified against their documented formats only. Thresholds were tuned on Jev; other models' probabilities are not calibrated the same way and need their own eval pass.Summary by cubic
Adds Cloudflare Clef, Perplexity Decider, and OpenAI's Decisions API preview as decision-model providers for the experimental decisions path, alongside the default TypeSafe Jev. Every provider's answers are now validated before they are acted on, and invalid answers fall back to the LLM pipeline.
Providers and shared client
providers.tsdefines one codec per provider: addressing, request encoding, and answer reading.Retry-Afterretry, and the circuit breaker are now keyed per provider, endpoint, and key.Config and live status
experimentalDecisionsgainsproviderandaccountIdoptions, with regenerated SDK artefacts andEVAL_DECISIONS_PROVIDERfor evals.403 Decision API is not enabled; Cloudflare and Perplexity are verified against their documented formats only.Written for commit d523d42. Summary will update on new commits.