Repository navigation
refactor(synapse): adopt the shared @omnidotdev/providers/ai client - #11
Merged
Merged
Conversation
Replace facet-api's hand-rolled Synapse /v1/messages client with the fleet's shared createSynapseClient, so the request/parse logic lives in one place. The local module is now a thin binding over it (Facet config -> client) that preserves the callSynapse(input, options?) surface, so the generate route and the per-user-key provisioner path are unchanged. Bump the @omnidotdev/providers git pin to the commit that ships the /ai module; tsc, the full 70-test suite, knip, and build are green against the bump (billing/auth usage unaffected).
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Replaces facet-api's hand-rolled Synapse
/v1/messagesclient with the fleet's sharedcreateSynapseClient(@omnidotdev/providers/ai, added in providers #37), so the request/parse logic lives in one place. The locallib/synapse/client.tsis now a thin binding (Facet config → shared client) that preserves thecallSynapse(input, options?)surface, so the generate route and the per-user-key provisioner path are unchanged.Bumps the
@omnidotdev/providersgit pin from#5909b95to#f381fbc(the commit that ships/ai). The 2-month delta touchesbilling/andauth/, which facet-api uses, so this was done carefully:tsc, the full 70-test suite (credit store + auth guards + generate route),knip, andbuildare all green against the bump — billing/auth usage is unaffected at the type and test level.Testing
bunx tsc --noEmit: clean (verifies the providers delta is type-compatible)bun test: 70 passbun biome check,bun knip,bun run build: green