nori_regression: correct the plugin's Synthefy-facing details (key env var, model list, required model) - #154
Merged
caterryan merged 3 commits intoSep 1, 2026
Conversation
An InfluxDB host runs plugins from several authors, and an unprefixed NORI_API_KEY does not say whose service it authenticates against. The vendor prefix makes the name unambiguous and matches how the key is issued (from the Synthefy console). The X-Nori-Api-Key header is unchanged, and so is the resolution order: a non-empty header wins, otherwise the environment variable. No compatibility shim: the plugin is BETA with no known deployments, and a missing key already fails with a message naming the variable to set, so an upgrade cannot fail silently.
…uplicating it The README, the model argument's help text, the retired-slug error and the TOML config each carried their own list of Nori slugs. That list is Synthefy's to publish and changes when they release a variant, so the copies went stale: they name only nori-30m and nori-6m, while nori-100m and nori-30m-thinking-medium are current. Each copy is now a pointer to https://docs.synthefy.com/nori/quickstart#models, which is the authoritative list. The plugin still names its own default, since that is the plugin's behaviour rather than the vendor's catalogue. The two cold-start figures quoted per slug are replaced by a range, for the same reason: they were measured against particular variants and a cold start has since been observed close to four minutes.
…ori-30m The slug selects a priced model, so defaulting it spends the operator's money on a variant they never named, and pins them to a slug that can be retired out from under them. That already happened once: the bare synthefy/nori slug was retired while it was this plugin's default. Synthefy's own client and local package both refuse to default a model and raise instead, for the same reason. The plugin now matches them: model joins measurement, field and feature_fields as a required trigger argument, and the error names the published list of slugs. `model` is required: the Nori gateway slug to call, for example 'synthefy/nori-30m'. There is no default, because the slug selects a priced model. The current slugs are listed at https://docs.synthefy.com/nori/quickstart#models. The shipped TOML template now sets model rather than commenting it out.
caterryan
approved these changes
Sep 1, 2026
Contributor
Author
|
thanks @caterryan , is it possible to get it merged soon? It's blocking some tasks |
Collaborator
|
Thanks for the contribution! |
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.
Three corrections to the plugin's Synthefy-facing details, one per commit, so any of them can be dropped.
1. Rename the API key environment variable to
SYNTHEFY_NORI_API_KEYAn InfluxDB host runs plugins from several authors and shares one environment. An unprefixed
NORI_API_KEYdoes not say whose service it authenticates against, and it is the kind of name that collides. The vendor prefix makes it unambiguous and matches how operators receive the key, from the Synthefy console.The
X-Nori-Api-Keyheader is unchanged, and so is the resolution order: a non-empty header wins (HTTP trigger), otherwise the environment variable.No compatibility shim. The plugin is
[BETA]in the registry with no known deployments, and a missing key is already a loud failure that names the variable to set:So an operator who upgrades with only the old variable set is told exactly what to change. Happy to add a transitional fallback if you would rather not break even an unknown user.
2. Point the model list at Synthefy's docs instead of duplicating it
The plugin kept its own list of model slugs in four places: the README's "Supported models" table, the
modelargument's help text, the retired-slug error, and the commented TOML config. All four listedsynthefy/nori-30mandsynthefy/nori-6monly, while Synthefy currently publishes four entries includingsynthefy/nori-100m. A reader of this README would not know the larger model exists.Which models exist is not something this plugin can keep correct: it changes when Synthefy releases a variant, with no signal to this repository. Each copy is now a pointer to docs.synthefy.com/nori/quickstart#models. The plugin still names its own default, since that is the plugin's behaviour rather than the vendor's catalogue.
The per-slug cold-start figures ("about 69 seconds for nori-6m and 125 seconds for nori-30m") become a range in the same change. They were measured against two specific variants, and a cold start has since been observed at close to four minutes, so a precise pair of numbers reads as more of a guarantee than it is. The
request_timeoutdefault of300sis unchanged and still absorbs it.3. Require an explicit
modelThe plugin defaulted
modeltosynthefy/nori-30m. That slug selects a priced model, so defaulting it spends the operator's money on a variant they never named, and pins them to a slug that can be retired from under them. That has already happened once: the baresynthefy/norislug was retired while it was this plugin's default.Synthefy's own client and local package both refuse to default a model and raise instead, for exactly this reason. The plugin now matches them.
modeljoinsmeasurement,fieldandfeature_fieldsas required, and the error names the published list:The shipped TOML template now sets
modelrather than commenting it out, and the README moves it to the required-parameter table.Testing
Unit tests: 194 passed, up from 190 on
main. The four added tests pin the environment variable name and cover themodelrequirement, both of which are public contract because the error messages instruct operators about them.End to end against InfluxDB 3 Core with the modified plugin mounted, a 72-row table whose last 12 rows are missing the target, and the production Nori gateway with a production key and
model=synthefy/nori-30m:SYNTHEFY_NORI_API_KEYset,modelnamed{"status": "success", "result": {"written": 12}}modelargument`model` is requiredmodelset in the request bodyNORI_API_KEYsetSYNTHEFY_NORI_API_KEYSYNTHEFY_NORI_API_KEYX-Nori-Api-Key{"status": "success", "result": {"written": 12}}The README also passes the repository's own validator (
scripts/validate_readme.py --plugins nori_regression): 0 errors, 0 warnings.The retired-slug error was rendered to confirm the new interpolation:
Note
NORI_GATEWAY_URL, the optional private-gateway override, keeps its current name here to keep the change reviewable. Say the word if you would prefer both renamed together.