Add NanoGPT API support (Issue #129) - #131
Conversation
jmagly
left a comment
There was a problem hiding this comment.
This does not currently implement NanoGPT’s published API contract, and the exact head is not build-green.
npm run typecheckfails atsrc/__tests__/nanogpt-provider.test.ts:54becausecfgis declared but unused.- NanoGPT documents the OpenAI-compatible base URL as
https://nano-gpt.com/api/v1, nothttps://api.nanogpt.com/verse1: https://docs.nano-gpt.com/ - The documented environment variable is
NANOGPT_API_KEY, notRBE_API_KEY: https://docs.nano-gpt.com/authentication - Model IDs should come from
GET /api/v1/models; the PR hard-codesrbe-1without support from the published model contract: https://docs.nano-gpt.com/api-reference/endpoint/models - Please also add
nanogptto the export-redaction invariant and env template/setup path; the current redaction test omits the new provider, so future config refactors could expose or silently mishandle this key.
Please correct the endpoint/key/model contract and make the tests validate the published interface rather than the current self-consistent constants.
eaedc21 to
f60f1ab
Compare
|
Maintainer courtesy update at I rebased the provider work onto current
Exact-head local verification:
I force-updated only after confirming the contributor branch still matched the reviewed old head |
Superseded by corrected head f60f1ab. The requested NanoGPT endpoint, key, model-discovery, redaction, setup, and exact-head verification corrections are complete; repository CI run 30597775219 passed.
Summary
Implement native NanoGPT API provider support so users can call NanoGPT directly without routing through OpenRouter.
API contract
https://nano-gpt.com/api/v1POST /chat/completionsGET /modelsAuthorization: Bearer <key>NANOGPT_API_KEYminimax/minimax-m2.7(live discovery remains authoritative)Changes
nanogptto the LLM provider/configuration surface and fallback chain.NANOGPT_API_KEYbefore spawning local Codex/Claude/Hermes processes.mainafter the original PR head.Verification
Exact head
f60f1abf93bdfd159609c8488c4cf041db45b468:npm run typecheck— passnpm test— pass (65 files, 682 tests; repository self-checks pass)npm run lint— pass with 0 errors (133 existing warnings)npm run build --silent— passgit diff --check— passThe fallback model and its context/output/capability metadata were checked against the live
GET /api/v1/models?detailed=trueresponse. The implementation does not use or route through OpenRouter.Fixes #129