@rulvar/bridge-ai-sdk 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -102,7 +102,7 @@ var BridgeIdMap = class {
|
|
|
102
102
|
*/
|
|
103
103
|
function bridgeAiSdk(model, options = {}) {
|
|
104
104
|
const version = model.specificationVersion;
|
|
105
|
-
if (version !== "v4") throw new ConfigError(`bridgeAiSdk requires a LanguageModelV4 (specificationVersion 'v4'); received ${JSON.stringify(version)}. A mismatched @ai-sdk/provider major cannot be bridged
|
|
105
|
+
if (version !== "v4") throw new ConfigError(`bridgeAiSdk requires a LanguageModelV4 (specificationVersion 'v4'); received ${JSON.stringify(version)}. A mismatched @ai-sdk/provider major cannot be bridged.`, { data: { received: typeof version === "string" ? version : null } });
|
|
106
106
|
const id = options.id ?? model.provider;
|
|
107
107
|
if (id === void 0 || id === "") throw new ConfigError("bridgeAiSdk requires a non-empty adapter id (model.provider was empty)");
|
|
108
108
|
const family = options.provider ?? model.provider;
|
|
@@ -204,7 +204,7 @@ function buildCallOptions(req, context) {
|
|
|
204
204
|
function applyNamespacedOptions(req, callOptions, adapterId) {
|
|
205
205
|
const ns = req.providerOptions?.[adapterId];
|
|
206
206
|
if (ns === void 0) return;
|
|
207
|
-
for (const key of CANONICAL_CONFLICT_KEYS) if (key in ns) throw new ConfigError(`providerOptions.${adapterId}.${key} contradicts a canonical ChatRequest field; canonical fields always win
|
|
207
|
+
for (const key of CANONICAL_CONFLICT_KEYS) if (key in ns) throw new ConfigError(`providerOptions.${adapterId}.${key} contradicts a canonical ChatRequest field; canonical fields always win`);
|
|
208
208
|
for (const key of LIFTED_OPTION_KEYS) if (ns[key] !== void 0) callOptions[key] = ns[key];
|
|
209
209
|
if (ns.providerOptions !== void 0) callOptions.providerOptions = ns.providerOptions;
|
|
210
210
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulvar/bridge-ai-sdk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "rulvar bridge adapter wrapping any Vercel AI SDK LanguageModelV4 as a ProviderAdapter.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@ai-sdk/provider": "^4.0.0",
|
|
26
|
-
"@rulvar/core": "1.3.
|
|
26
|
+
"@rulvar/core": "1.3.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@ai-sdk/google": "^4.0.0",
|