Repository navigation
feat(319): OpenAI's Decisions API behind the same decision step - #132
Merged
Merged
Conversation
A second decision model, so a space with an OpenAI key runs decision skills with no TypeSafe account. - ai-client: gpt-6-luna-decisions (alias luna-decisions) on the existing OpenAI credential, called through the SDK client's generic post so auth, retries and errors are the adapter's own. Every decision model carries a measured profile (questionsPerCall, imageContext, confidence); a request past the per-call limit is split and merged; a declined question is a refusal; images ride as data URLs. `yarn models:verify-decisions` re-reads each profile from the live API - schemas: the step takes images (stored-media references), answers may be a refusal that is never decided, and the output states its calibration. modelDefaults.decision names a space's decision model - executor-ai: the model is the step's, else the space's, else the first decision model the space holds a key for (one that reads images when the step carries them) - cybernetic-runtime: a named model that reads no images is an error; a threshold on self-reported confidence is an advisory - web-product: a Decisions row in the Agent settings Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Top-level await does not transform for tsx's CommonJS output, so the probe runs inside main() like the reasoning probe. Both decision profiles match the live APIs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
munchist
approved these changes
Oct 17, 2026
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.
Plan 319 — OpenAI's Decisions API as a second model behind
ai.decision.decide. Spec:docs/plans/319-a-second-decision-model-openai-decisions.md.What changes
gpt-6-luna-decisions(aliasluna-decisions) on the space's existing OpenAI credential. The adapter callsPOST /v1/decisionsthrough the OpenAI client's genericpost, so no SDK bump. Skills don't change when a space switches models.{ questionsPerCall?, imageContext, confidence: 'calibrated' | 'self_reported' }, held by a contract test. Requests over the per-call limit are split and merged.{ type: 'refusal', decided: false }, so adecided == falseroute takes it.calibration. AminConfidenceon a model with self-reported confidence raises the advisorydecision_confidence_self_reported.modelDefaults.decisionin space directives, plus a Decisions row on the Agent settings page. Unset resolves to the first decision model the space holds a key for, skipping models that read no images when the step carries images.decision_model_reads_no_images).yarn models:verify-decisionschecks each profile against the live API.Verification
yarn models:verify-decisionsagainst the live APIs:luna-decisionsanswers choice, score and yes/no in one call, accepts 200 questions and refuses 201, and reads an image;jevanswers all three types in one call. All profiles match.main:yarn build,yarn typecheck,yarn format:checkclean.yarn test:changed: 16,319 passed, 2 failed, neither from this branch:checkoutReplacement.test.ts(host sandbox) fails identically on a branch with no host changes.ownershipEnv.test.tstimed out under load and passes on its own.🤖 Generated with Claude Code