la-machina-engine 0.10.0 → 0.11.0
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.cjs +33 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
package/dist/index.cjs
CHANGED
|
@@ -1039,8 +1039,18 @@ var ModelProviderEnum = import_zod.z.enum([
|
|
|
1039
1039
|
"openai",
|
|
1040
1040
|
"google",
|
|
1041
1041
|
"openai-compatible",
|
|
1042
|
+
// Plan 034 — native per-provider AI SDK adapters. Use these for
|
|
1043
|
+
// any non-OpenAI-native endpoint instead of multiplexing through
|
|
1044
|
+
// openai-compatible (which drops tool_use.input fidelity for
|
|
1045
|
+
// Anthropic-shape streams).
|
|
1046
|
+
"openrouter",
|
|
1047
|
+
"xai",
|
|
1048
|
+
"groq",
|
|
1049
|
+
"gateway",
|
|
1042
1050
|
"bedrock",
|
|
1051
|
+
// enum only; adapter not yet wired
|
|
1043
1052
|
"vertex",
|
|
1053
|
+
// enum only; adapter not yet wired
|
|
1044
1054
|
"proxy"
|
|
1045
1055
|
]);
|
|
1046
1056
|
var StorageProviderEnum = import_zod.z.enum(["local", "r2", "r2-binding"]);
|
|
@@ -2008,6 +2018,10 @@ var import_anthropic = require("@ai-sdk/anthropic");
|
|
|
2008
2018
|
var import_openai = require("@ai-sdk/openai");
|
|
2009
2019
|
var import_google = require("@ai-sdk/google");
|
|
2010
2020
|
var import_openai_compatible = require("@ai-sdk/openai-compatible");
|
|
2021
|
+
var import_ai_sdk_provider = require("@openrouter/ai-sdk-provider");
|
|
2022
|
+
var import_xai = require("@ai-sdk/xai");
|
|
2023
|
+
var import_groq = require("@ai-sdk/groq");
|
|
2024
|
+
var import_gateway = require("@ai-sdk/gateway");
|
|
2011
2025
|
var AISdkAdapter = class {
|
|
2012
2026
|
options;
|
|
2013
2027
|
model = null;
|
|
@@ -2086,6 +2100,25 @@ var AISdkAdapter = class {
|
|
|
2086
2100
|
modelId
|
|
2087
2101
|
);
|
|
2088
2102
|
break;
|
|
2103
|
+
// Plan 034 — native per-provider AI SDK adapters. Each
|
|
2104
|
+
// adapter knows its upstream's streaming shape and
|
|
2105
|
+
// assembles tool_use.input correctly, unlike routing
|
|
2106
|
+
// non-OpenAI-format streams through openai-compatible.
|
|
2107
|
+
case "openrouter":
|
|
2108
|
+
this.model = (0, import_ai_sdk_provider.createOpenRouter)({ apiKey })(modelId);
|
|
2109
|
+
break;
|
|
2110
|
+
case "xai":
|
|
2111
|
+
this.model = (0, import_xai.createXai)({ apiKey, ...baseURL !== void 0 ? { baseURL } : {} })(modelId);
|
|
2112
|
+
break;
|
|
2113
|
+
case "groq":
|
|
2114
|
+
this.model = (0, import_groq.createGroq)({ apiKey, ...baseURL !== void 0 ? { baseURL } : {} })(modelId);
|
|
2115
|
+
break;
|
|
2116
|
+
case "gateway":
|
|
2117
|
+
if (typeof process !== "undefined" && process.env !== void 0) {
|
|
2118
|
+
process.env.AI_GATEWAY_API_KEY = apiKey;
|
|
2119
|
+
}
|
|
2120
|
+
this.model = (0, import_gateway.gateway)(modelId);
|
|
2121
|
+
break;
|
|
2089
2122
|
default:
|
|
2090
2123
|
throw new Error(`AI SDK: unsupported provider "${provider}".`);
|
|
2091
2124
|
}
|