Conversation
SiliconFlow serves the System One contract at https://api.siliconflow.cn/v1/systemone and hosts the Jev model family (semif, diffusiongemma, kev-4b), giving callers a carrier where TypeSafe and OpenRouter are hard to reach. The driver follows src/transports/ exactly: name, isConfigured, assertConfigured, create; fixed-string errors only; jev-latest maps to the always-current semif alias, other model ids go to the wire verbatim. Auto-detection sits last, after the four existing carriers, so existing credential sets keep their provider. Hermetic tests cover registry precedence, forced selection, the wire envelope, the latest mapping, redacted errors, and the usage matrix.
Owner
|
Thank you for moving this over to this repo and for the careful driver and tests. I apologize if my redirect from jev-mcp was unclear. I'm keeping built-ins to the current set for now, so I won't merge this for now. It would be welcome as a third-party driver package using the transport interface. If you publish one, a PR linking it from the READMEs of both packages is welcome. Thanks again! |
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.
Follows the add-a-provider guide; moved here per the guidance on jev-mcp#39, where this transport originally landed in the wrong layer.
What
src/transports/siliconflow.tsfollowing the existing driver shape exactly:name,isConfigured,assertConfigured,create.SILICONFLOW_API_KEY. Auto-detection sits last, after the four existing carriers, so every existing credential set keeps its provider;JEV_PROVIDER=siliconflowforces it.POST https://api.siliconflow.cn/v1/systemonewith the standard{ model, state, questions }envelope and Bearer auth, the same contract the other fetch drivers speak.jev-latestmaps tosemif, the always-current alias SiliconFlow serves (the OpenRoutertypesafe/jev-1.13and Cloudflaretypesafe/jevpattern). Other model ids (diffusiongemma,kev-4b) go to the wire verbatim.SiliconFlow system one API HTTP <status> (reason; N response bytes)); no response bodies or credentials in messages.BuiltinDriverunion, theUnknown JEV_PROVIDERlist, the no-credentials diagnostic (now namesSILICONFLOW_API_KEY), and the trusted provider-name allowlist inask().JEV_PROVIDERenumeration updated.Why
SiliconFlow hosts the Jev model family on a System One endpoint and is one of the largest model API carriers in China, which makes it a practical default for callers there where TypeSafe and OpenRouter are hard to reach. The original implementation and live testing came out of jev-mcp#39.
Testing
Hermetic suite passes: 13 tests, with registry precedence extended to five carriers, forced-selection and missing-key cases for siliconflow, a wire test pinning the exact URL/headers/envelope and the
jev-latest→semifmapping, error redaction (401 body, malformed 200 body, network throw), and a siliconflow row in the absent-vs-malformed usage matrix.Notes
resolveTransportonce released; its local fetch transports stay as they are, per the consumer-side wiring note.