Repository navigation
Add OpenAI Decisions as a native System One provider - #762
Open
genglintong wants to merge 2 commits into
Open
genglintong wants to merge 2 commits into
genglintong wants to merge 2 commits into
Conversation
Add the provider to the repository README and synchronize its package README, English/Chinese registry summaries, changelog and verification scope. Explain released/source installation, native decision-group/classifier setup, credential storage, shared OpenAI API allowance and quota/error handling. Runtime modules, dependencies and the initial unpublished 0.1.0 version are unchanged. Follow the community README's layout and loader conventions; keep the canonical OpenCode bridge untouched. Related PR: magpie-community#762. Verification on this tree: - npm test in packages/openai-decisions: 18 pass, 0 fail. - Bun package tests: 18 pass, 0 fail. - bun scripts/check.mjs openai-decisions: registry and provider pass. - scripts/try.sh openai-decisions with Magpie 0.1.3039: sandbox installation and unsigned provider listing pass, one model, no vendor call. - Documentation checks: six local links and one JSON request example pass; registry descriptions and local source docs match; bridge is identical. - git diff --check and credential/private-data scan pass. No live model requests were made for this documentation follow-up. The full community suite was not run locally; upstream CI remains required. Live OpenCode decision workflows and Windows/Linux execution remain unverified.
Contributor
|
Thanks — the adapter is careful work: the request/answer mapping matches OpenAI's create-decision reference, the only outbound address is api.openai.com/v1/decisions, and the tests stay offline (18/18 on Bun and Node, whole-repo check and
|
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.
Magpie can use System One models as routing classifiers and decision-group
members, but OpenAI's native Decisions API uses a different path and
array-shaped questions and answers. This package exposes
openai-decisions/gpt-6-lunathrough the existing/v1/systemoneinterface, so an existing chat group can select it as
classifier=openai-decisions/gpt-6-lunawitheffort=auto.The adapter maps choice, score and noul/predicate questions and retains
structured evidence, instructions, probabilities, confidence and usage.
It preserves upstream errors, retry headers and cancellation; unsupported
requests return 400 and invalid successful upstream answers return 502.
Existing System One-compatible providers continue through Magpie's native path.
Standard API-key sign-in uses Magpie's account store. An optional explicit
method stores a reference to Magpie's enabled official
openaiproviderand reads its current primary key at request time. Calls use the key's
OpenAI API allowance and the fixed
https://api.openai.com/v1/decisionsendpoint, with fresh headers and no redirects. The adapter does not rewrite
the saved OpenAI provider.
The package follows the community's loader layout, canonical OpenCode 2.x
bridge, MIT attribution and bilingual registry entry. The root README now
lists the provider; its package README documents released/source installation,
credential storage, classifier and decision-group setup, error/quota handling
and compatibility limits. Changelog, registry descriptions and verification
scope are synchronized. Public examples are synthetic.
Validation:
credential selection, invalid answers, errors and cancellation.
bun scripts/check.mjs openai-decisions: provider and registry pass.scripts/try.sh openai-decisions: installs and lists onedecision model in the sandbox without sign-in or OpenAI requests.
compatibility bridge remains byte-identical to the canonical copy.
through OpenAI and TypeSafe, and for their shared decision group. A real
OpenAI classifier call was recorded as
kind=routing, HTTP 200, beforethe downstream chat completed with
OK. This documentation follow-updoes not change the runtime or repeat live quota-consuming checks.
The full community test suite was not run locally and remains an upstream
CI requirement. Live OpenCode decision workflows and Windows/Linux execution
are not verified. Limits and real-check scope are in
packages/openai-decisions/VERIFICATION.md.Related: yetone/magpie#4316.
Latest locally verified head:
ba568b4f02bac32f7fa4640a3344b5518d562260.