fix(provider): register the hosted demo loader under its real id (synsci)#119
Merged
Merged
Conversation
…sci) The CUSTOM_LOADERS entry for the zero-cost hosted demo was keyed 'openscience', but the catalog provider id is 'synsci' (the Atlas wire-contract id). The loader loop looked up database['openscience'], found nothing, logged 'Provider does not exist in model list openscience', and skipped the loader entirely. Consequences: the demo's apiKey:'public' sentinel was never set, so a brand-new user with no key couldn't use the zero-cost demo at all; and the 'drop paid models when no key' gating never ran. Rename the loader key to 'synsci' and read the provider via input.id.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Audit finding #16 (High). The
CUSTOM_LOADERSentry for the zero-cost hosted demo was keyedopenscience, but the catalog provider id issynsci(confirmed:models-api.jsonuses"id":"synsci", and everything else —managedProviderAllowed,getSmallModel,defaultModel— keys offsynsci). The loader loop diddatabase["openscience"]→ undefined → loggedProvider does not exist in model list openscienceandcontinued, so the loader never ran:apiKey: "public"sentinel was never set → a brand-new user with no key couldn't use the zero-cost demo at all;Rename the loader key to
synsci(the id that must not change, per the wire contract) and read the provider viainput.id. Only keyless users are affected — it enables the demo they currently can't reach; a user with asynscikey is unchanged (hasKey → options {}).Typecheck + full backend suite (929 tests) green.