@openclaw/baseten-provider 2026.10.5-beta.4 → 2026.10.10-beta.2

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/models.js CHANGED
@@ -1,2 +1 @@
1
- import { a as buildBasetenModelCompat, c as resolveBasetenDynamicModel, i as BASETEN_MODEL_CATALOG, l as usesBasetenChatTemplateThinking, n as BASETEN_DEFAULT_MODEL_ID, o as buildStaticBasetenModels, r as BASETEN_DEFAULT_MODEL_REF, s as projectBasetenLiveModels, t as BASETEN_BASE_URL } from "./.setup/models-CXwQahwx.mjs";
2
- export { BASETEN_BASE_URL, BASETEN_DEFAULT_MODEL_ID, BASETEN_DEFAULT_MODEL_REF, BASETEN_MODEL_CATALOG, buildBasetenModelCompat, buildStaticBasetenModels, projectBasetenLiveModels, resolveBasetenDynamicModel, usesBasetenChatTemplateThinking };
1
+ export { t as BASETEN_BASE_URL, n as BASETEN_DEFAULT_MODEL_ID, r as BASETEN_DEFAULT_MODEL_REF, i as BASETEN_MODEL_CATALOG, a as buildBasetenModelCompat, o as buildStaticBasetenModels, s as projectBasetenLiveModels, c as resolveBasetenDynamicModel, l as usesBasetenChatTemplateThinking } from "./.setup/models-CXwQahwx.mjs";
package/dist/stream.js CHANGED
@@ -1,18 +1,30 @@
1
- import { l as usesBasetenChatTemplateThinking } from "./.setup/models-CXwQahwx.mjs";
1
+ import { l as usesBasetenChatTemplateThinking, t as BASETEN_BASE_URL } from "./.setup/models-CXwQahwx.mjs";
2
2
  import { asNonArrayRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import { streamSimple } from "openclaw/plugin-sdk/llm";
4
4
  import { normalizeOpenAICompatibleReasoningReplay, streamWithPayloadPatch } from "openclaw/plugin-sdk/provider-stream-shared";
5
5
  //#region extensions/baseten/stream.ts
6
- /** Baseten request payload policy for models with opt-in chat-template reasoning. */
7
- /** Adds Baseten's `chat_template_args.enable_thinking` without dropping caller args. */
6
+ /** Baseten session affinity and model-specific thinking policy. */
8
7
  function createBasetenThinkingWrapper(ctx) {
9
8
  const underlying = ctx.streamFn ?? streamSimple;
10
9
  return (model, context, options) => {
11
10
  if (model.provider !== "baseten" || (ctx.sourceApi ?? model.api) !== "openai-completions") return underlying(model, context, options);
11
+ const affinity = options?.promptCacheKey ?? options?.sessionId;
12
+ const cacheRetention = options?.cacheRetention ?? ctx.extraParams?.cacheRetention;
13
+ let streamOptions = options;
14
+ if (affinity && cacheRetention !== "none" && model.baseUrl?.trim().replace(/\/+$/u, "") === BASETEN_BASE_URL && !Object.keys({
15
+ ...model.headers,
16
+ ...options?.headers
17
+ }).some((name) => name.toLowerCase() === "x-session-affinity")) streamOptions = {
18
+ ...options,
19
+ headers: {
20
+ ...options?.headers,
21
+ "x-session-affinity": affinity
22
+ }
23
+ };
12
24
  const optIn = usesBasetenChatTemplateThinking(model.id);
13
25
  const thinkingLevel = options?.reasoning ?? (ctx.thinkingLevel === "adaptive" ? "max" : ctx.thinkingLevel) ?? (optIn ? "off" : void 0);
14
- return streamWithPayloadPatch(underlying, model, context, thinkingLevel === void 0 ? options : {
15
- ...options,
26
+ return streamWithPayloadPatch(underlying, model, context, thinkingLevel === void 0 ? streamOptions : {
27
+ ...streamOptions,
16
28
  reasoning: thinkingLevel
17
29
  }, (payload) => {
18
30
  const normalizedModelId = model.id.trim().toLowerCase();
@@ -22,7 +34,7 @@ function createBasetenThinkingWrapper(ctx) {
22
34
  stripAssistantMessagesOnly: true,
23
35
  replaceNullReasoningContent: true
24
36
  });
25
- if (normalizedModelId === "deepseek-ai/deepseek-v4-pro-0813" && payload.reasoning_effort !== void 0) payload.thinking = { type: "enabled" };
37
+ if (normalizedModelId === "deepseek-ai/deepseek-v4-pro-0813" && payload.reasoning_effort !== void 0) payload.thinking = { type: payload.reasoning_effort === "none" ? "disabled" : "enabled" };
26
38
  }
27
39
  if (optIn) payload.chat_template_args = {
28
40
  ...asNonArrayRecord(payload.chat_template_args),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/baseten-provider",
3
- "version": "2026.10.5-beta.4",
3
+ "version": "2026.10.10-beta.2",
4
4
  "description": "OpenClaw Baseten provider plugin.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,10 +18,10 @@
18
18
  "minHostVersion": ">=2026.7.2"
19
19
  },
20
20
  "compat": {
21
- "pluginApi": ">=2026.10.5-beta.4"
21
+ "pluginApi": ">=2026.10.10-beta.2"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.10.5-beta.4",
24
+ "openclawVersion": "2026.10.10-beta.2",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -40,7 +40,7 @@
40
40
  "assets/activity.svg"
41
41
  ],
42
42
  "peerDependencies": {
43
- "openclaw": ">=2026.10.5-beta.4"
43
+ "openclaw": ">=2026.10.10-beta.2"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "openclaw": {