Repository navigation
feat(openrouter-decisions): add System One API, Box, images, and question design - #201
Conversation
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
Original prompt from Matt
|
…n design into openrouter-decisions
w0nche0l
left a comment
There was a problem hiding this comment.
approving to unblock with one opinion
…t-call-decision # Conflicts: # skills/openrouter-decisions/SKILL.md
…xclude image data from fit estimate
…route uncertain presence to fallback
Co-Authored-By: Matt Apperson <me@mattapperson.com>
|
Heads-up from the daily skills sync: openrouter-web#54599, merged 2026-10-27, makes OpenRouter accept TypeSafe's top-level
Current behavior is documented in the multimodal decisions guide, Asset references. The same correction is on the sync PR #195. I have not pushed anything to this branch. |
…t for image requests Co-Authored-By: Matt Apperson <me@mattapperson.com>
Superseded by updated Perry review
…ection Co-Authored-By: Matt Apperson <me@mattapperson.com>
Summary
Folds TypeSafe's
typesafe-aiSystem One skill intoopenrouter-decisionsinstead of shipping it as a second skill. Both skills had the same job and the same API contract.openrouter-decisionsalready triggers on "Jev, TypeSafe, or System One", so a sibling skill would have competed with it for the same requests. This PR adds the parts the TypeSafe skill had andopenrouter-decisionslacked.What changes in
skills/openrouter-decisions:box, Jev 1.14 only).scripts/lib.tsgainsBoxQuestionandBoxAnswertypes.parseQuestionandparseAnswernow acceptboxand rejectboxwithcriteria.@openrouter/sdkis bumped from^1.3.23to^1.5.13, which addsDecisionsBoxQuestion, sodecide.ts --sdksends Box too.references/decisions-api.mddocuments:image_urldata-URL parts instate;assetsmap, which OpenRouter accepts: the asset shape, the rule that every asset is referenced, and where Jev and the other models read references;models.tsfit is nowfitVerdict(textTokens, maxInput, hasImages)inlib.ts. The text estimate leaves out inline image parts, so a request with images reportsunknown, ornowhen its text alone is over the cap. Offline tests are inscripts/lib.test.ts(npm test).POST /api/v1/systemonetakes the same request and returns the same answers. Bare IDs map onto thetypesafe/namespace (jev-1.14→typesafe/jev-1.14).TypeSafeClientworks withbaseURL: 'https://openrouter.ai/api'and an OpenRouter key, butclient.models.list()does not.references/question-design.md. Holds TypeSafe's design guidance: truth tables, the human test, wording, criteria, speculative questions, how to read answers, probing, the order of checks when an answer looks wrong, yellow flags, and cookbooks. The cookbooks include translation notes from TypeSafe's API to OpenRouter's, and OpenRouter's own cookbooks are added.SKILL.mdbehavior changes:noul(TypeSafe's Jev 1.14 guidance), replacing the "add anoneoption" rule. Readers are told to probe both on other models.choiceorboxonly in the presencenoul's yes branch. The no branch goes to no-match, and the uncertain band goes to the fallback.noulgate now allows a 0.7/0.3 band, with the middle routed to the fallback when one exists.descriptiongains the Box and TypeSafe/System One triggers.skills/agent-call-decisionfrom the first commit is removed, along with its root README row.Verified
decide.tssends a Box+Noul image request totypesafe/jev-1.14over both HTTP and--sdk, and returns typedboxanswers.boxquestion withcriteriais rejected locally.npm testpasses 4 fit and estimate tests.models.tswith an image request printsunknownfor each model's fit, exceptnofor models whose cap is 0.tsc --stricton the scripts reports no errors apart from the existing missing@types/node.TypeSafeClientsnippet indecisions-api.mdruns against OpenRouter.SKILL.mdfrontmatter parses. TheValidate skillsCI check passes on this PR.What still doesn't work
noulwas 0.99. The skill tells readers to probe images with distractors. The fix is on the model side.assets.decide.tsandmodels.tsaccept only inline image parts. Requests that useassetswork against the API but need the caller's own client.unknownfor image requests rather than modeling each provider's image accounting.none. Thedecisions-api.mdrequest example still uses anoneoption on ajev-1.13Choice, which is still valid there. I left it as is rather than rewrite the canonical example.Env vars
OPENROUTER_API_KEYis needed only fordecide.tsand live probes.models.ts,npm test, and reading the skill need no key.Link to Devin session: https://openrouter.devinenterprise.com/sessions/b6c66f70018a448883eb7d40a75958e3
Open in Devin Desktop: https://openrouter.devinenterprise.com/desktop/session/b6c66f70018a448883eb7d40a75958e3?variant=devin
Requested by: @mattapperson