@bubblebrain-ai/bubble 0.0.51 → 0.0.52

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.
@@ -357,7 +357,13 @@ export class ProviderRegistry {
357
357
  else {
358
358
  // 2. Fall back to config.json providers (interactive TUI style)
359
359
  providers = this.config.getProviders().map((provider) => {
360
- const baseURL = upgradeLegacyBaseURL(provider.id, provider.baseURL, provider.protocol);
360
+ // config.json entries may omit baseURL (a bare {id, apiKey} written
361
+ // by minimal setups / benchmark harnesses); merge the builtin default
362
+ // the same way the models.json path above does, instead of propagating
363
+ // undefined into provider construction.
364
+ const builtinBase = getBuiltinProvider(provider.id)?.baseURL ?? "";
365
+ const rawBaseURL = provider.baseURL || builtinBase;
366
+ const baseURL = upgradeLegacyBaseURL(provider.id, rawBaseURL, provider.protocol);
361
367
  return {
362
368
  ...provider,
363
369
  baseURL,
package/dist/provider.js CHANGED
@@ -201,9 +201,9 @@ export function createProviderInstance(options) {
201
201
  // paths already wrap — this generic chat-completions path did not).
202
202
  try {
203
203
  yield* translateOpenAIStream(stream, {
204
- toolArgsMergeMode: resolveToolArgsMergeMode(options.providerId || "", options.baseURL),
205
- reasoningMergeMode: resolveReasoningMergeMode(options.providerId || "", options.baseURL),
206
- textMergeMode: resolveTextMergeMode(options.providerId || "", options.baseURL),
204
+ toolArgsMergeMode: resolveToolArgsMergeMode(options.providerId || "", options.baseURL || ""),
205
+ reasoningMergeMode: resolveReasoningMergeMode(options.providerId || "", options.baseURL || ""),
206
+ textMergeMode: resolveTextMergeMode(options.providerId || "", options.baseURL || ""),
207
207
  debugProviderId: options.providerId || "",
208
208
  debugModelId: chatOptions.model,
209
209
  });
@@ -246,7 +246,7 @@ function resolveProviderProtocol(options) {
246
246
  if (options.protocol)
247
247
  return options.protocol;
248
248
  const providerId = (options.providerId || "").toLowerCase();
249
- const baseURL = options.baseURL.toLowerCase();
249
+ const baseURL = (options.baseURL || "").toLowerCase();
250
250
  if (providerId === "doubao"
251
251
  && baseURL.replace(/\/+$/, "") === "https://ark.cn-beijing.volces.com/api/v3") {
252
252
  return "ark-responses";
@@ -260,7 +260,7 @@ function resolveProviderProtocol(options) {
260
260
  }
261
261
  function isMiniMaxOpenAICompatible(options) {
262
262
  const providerId = (options.providerId || "").toLowerCase();
263
- const baseURL = options.baseURL.toLowerCase();
263
+ const baseURL = (options.baseURL || "").toLowerCase();
264
264
  return providerId === "minimax-openai"
265
265
  || (providerId === "minimax" && !baseURL.includes("/anthropic"))
266
266
  || baseURL.includes("api.minimaxi.com/v1")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bubblebrain-ai/bubble",
3
- "version": "0.0.51",
3
+ "version": "0.0.52",
4
4
  "description": "A terminal coding agent",
5
5
  "type": "module",
6
6
  "engines": {