QVAC-16464 feat[api]: update SDK nmtcpp plugin for @qvac/translation-nmtcpp 2.0.1#1563
Merged
RamazTs merged 6 commits intoApr 22, 2026
Conversation
….1, which moves away from base inference inheritance
olyasir
previously approved these changes
Apr 14, 2026
gianni-cor
requested changes
Apr 14, 2026
Contributor
Tier-based Approval Status |
gianni-cor
requested changes
Apr 14, 2026
gianni-cor
left a comment
Contributor
There was a problem hiding this comment.
also remove any change not related to translation addon. those will be addressed by other teams
Reverts non-NMT changes (model-registry, cancel, embed, transcribe, translate, completion-stream, ocr-stream, text-to-speech, diffusion) back to their original state. Those broader SDK type changes will be addressed by other teams. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…pp-plugin-update-removal-of-fs-loader # Conflicts: # packages/sdk/bun.lock # packages/sdk/package.json
Alok-Ranjan23
approved these changes
Apr 20, 2026
gianni-cor
approved these changes
Apr 22, 2026
Contributor
Author
|
/review |
Proletter
pushed a commit
that referenced
this pull request
May 24, 2026
…nmtcpp 2.0.1 (#1563) feat: update SDK NMTCPP plugin to support @qvac/translaton-nmtcpp@2.0.1, which moves away from base inference inheritance
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.
What problem does this PR solve?
The
@qvac/translation-nmtcppaddon was migrated to v2.0.1, removing the loader/WeightsProvider abstraction. The addon now takes afilesobject with resolved file paths instead ofloader/diskPath/modelName. The SDK NMT plugin was still using the old 1.x interface and couldn't work with the new addon.Additionally, the SDK's
model-registry.tsimportedBaseInferencefrom@qvac/infer-baseto defineAnyModel, which caused SDK-wide type resolution failures when the new addon's dependency on@qvac/infer-base@^0.4.0conflicted with other addons' versions.How does it solve it?
NMT plugin migration (
nmtcpp-translation/plugin.ts):FilesystemDL,asLoader,parseModelPath,Loadertypefilesobject from resolved artifact paths (model, vocabs, pivot)bergamotPivotModel(with loader/paths) toconfig.pivotConfig(generation params only) +files.pivotModel/pivotSrcVocab/pivotDstVocabnew TranslationNmtcpp({ files, params, config, logger, opts })loader: null(fullPluginModelResult.loaderremoval deferred to after all addons migrate)SDK type cleanup (
model-registry.ts):BaseInferenceimport from@qvac/infer-base— eliminates the SDK's only direct dependency on that packageAnyModelis now a standalone interface with only what the registry/ops layer uses:load(),run(),unload?(),reload?()PluginModel(schemas) stays minimal:load(),unload?()— the plugin contractDependency bump (
package.json):@qvac/translation-nmtcpp:^0.6.1→^2.0.1New API
How was it tested?
bun run build— cleanbun run lint— clean (eslint + tsc)bun run test:unit— all passbun run bare:example examples/translation/translation-bergamot.ts— EN→FR ✅bun run bare:example examples/translation/translation-bergamot-batch.ts— batch 4 texts ✅bun run bare:example examples/translation/translation-bergamot-pivot.ts— ES→EN→IT pivot ✅bun run bare:example examples/translation/translation-indic.ts— EN→HI IndicTrans ✅