Repository navigation
#183: Add scripts/gateway-ping-g23.mjs, one AI Gateway call through Factory's relay - #184
Merged
Merged
Conversation
…actory's relay Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Factory: validation green on cada341; ready for the reviewer. |
Contributor
Author
There was a problem hiding this comment.
Factory reviewer: one comment-only pass, 1 comment(s).
Acceptance as the reviewer judged it:
- 1: met (The script imports
createGatewayandgenerateTextfromai;package.jsonpinsaiat 7.0.165, the installed version is 7.0.165, and the commit changes onlyscripts/gateway-ping-g23.mjs, sopackage.jsonandpackage-lock.jsonare untouched.) - 2: met (Lines 25-28 build the gateway with the exact
apiKeyandbaseURLexpressions; line 29 callsgenerateTextwithnvidia/nemotron-3.5-lightning-freeandSay ok.; line 31 printstext:andcost:fromproviderMetadata.gateway.cost; lines 22-23 and 32-38 write one stderr line naming … - 3: met (The PR body reports one run with exit code 0 and quotes stdout verbatim (
text: ok/cost: 0), which matches the two-line format line 31 writes; the run itself cannot be checked from the diff and was not repeated here, to keep the one-call rule.) - 4: met (Rerun on the PR head:
npm run checkpassed andnpm testpassed with 855 tests, 0 failed;git diff --statshows one file changed, the new script (+42).)
Contributor
Author
|
Factory: cada341 is reviewed and validated; it merges once its required checks are green. |
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.
Adds
scripts/gateway-ping-g23.mjs, a manual check that sends one prompt through Factory's AI Gateway relay and prints the answer and the cost the gateway reports. It has the same shape asscripts/gateway-ping-c5.mjs. No test calls it and CI never runs it.Acceptance
aidevDependency pinned at7.0.165;package.jsonandpackage-lock.jsonunchangedscripts/gateway-ping-g23.mjsimports fromaigit diff --stat origin/mainshows onlyscripts/gateway-ping-g23.mjs(1 file, +42)createGateway({ apiKey, baseURL: <FACTORY_GATEWAY_URL>/v4/ai }), callsgenerateTextwithnvidia/nemotron-3.5-lightning-freeandSay ok., printstext:andcost:; on a missing variable or a failed call it writes one stderr line and exits non-zero; the key is never printedscripts/gateway-ping-g23.mjsnode --check scripts/gateway-ping-g23.mjspasses. The failure paths were reviewed in code only, because a second run would break the one-call rule.npm run checkandnpm testpass; the only change is the new scriptThe one run of
node scripts/gateway-ping-g23.mjs(exit code 0)stdout, verbatim:
stderr had only Node's
EnvHttpProxyAgent is experimentalwarning, which the sandbox's proxy setup triggers.Validation
npm run check: passed.npm test: passed, 855 tests, 0 failed.npm run test:db: not run here. Factory's validation runs it. This change adds no source file or test file.Fake-only proofs
none
Design checklist
n/a: the repository has no design checklist.
Assumptions
scripts/gateway-ping-c5.mjs: the stderr line is prefixedgateway-ping-g23:, the key is masked as***if it shows up in an error message, and the HTTP status is added as(HTTP <status>)when the error has one.cost: undefinedrather than failing.npm run checkonly coverssrc/andtest/, so the script's syntax was checked separately withnode --check. The script is not added tocheck, becausepackage.jsonmust not change.Undone
none
🤖 Generated with Claude Code
Closes #183