@jaypie/llm 1.2.38 → 1.2.39

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/esm/index.js CHANGED
@@ -54,8 +54,8 @@ const MODEL = {
54
54
  GEMINI_PRO: "gemini-3.1-pro-preview",
55
55
  // OpenAI
56
56
  GPT: "gpt-5.5",
57
- GPT_MINI: "gpt-5.5-mini",
58
- GPT_NANO: "gpt-5.5-nano",
57
+ GPT_MINI: "gpt-5.4-mini",
58
+ GPT_NANO: "gpt-5.4-nano",
59
59
  // xAI
60
60
  GROK: "grok-latest",
61
61
  };
@@ -2068,8 +2068,7 @@ class BedrockAdapter extends BaseProviderAdapter {
2068
2068
  if (request.system) {
2069
2069
  bedrockRequest.system = [{ text: request.system }];
2070
2070
  }
2071
- if (request.temperature !== undefined &&
2072
- this.supportsTemperature(model)) {
2071
+ if (request.temperature !== undefined && this.supportsTemperature(model)) {
2073
2072
  bedrockRequest.inferenceConfig = {
2074
2073
  ...bedrockRequest.inferenceConfig,
2075
2074
  temperature: request.temperature,
@@ -2210,10 +2209,7 @@ class BedrockAdapter extends BaseProviderAdapter {
2210
2209
  return {
2211
2210
  ...rest,
2212
2211
  toolConfig: {
2213
- tools: [
2214
- ...(rest.toolConfig?.tools ?? []),
2215
- fakeTool,
2216
- ],
2212
+ tools: [...(rest.toolConfig?.tools ?? []), fakeTool],
2217
2213
  },
2218
2214
  };
2219
2215
  }
@@ -2437,7 +2433,8 @@ class BedrockAdapter extends BaseProviderAdapter {
2437
2433
  return this.extractStructuredOutput(response) !== undefined;
2438
2434
  }
2439
2435
  // Fake-tool path: last content block is a structured_output toolUse
2440
- const content = (bedrockResponse.output?.message?.content ?? []);
2436
+ const content = (bedrockResponse.output?.message?.content ??
2437
+ []);
2441
2438
  const last = content[content.length - 1];
2442
2439
  return (!!last &&
2443
2440
  "toolUse" in last &&
@@ -2446,14 +2443,16 @@ class BedrockAdapter extends BaseProviderAdapter {
2446
2443
  extractStructuredOutput(response) {
2447
2444
  const bedrockResponse = response;
2448
2445
  if (bedrockResponse.__jaypieStructuredOutput) {
2449
- const content = (bedrockResponse.output?.message?.content ?? []);
2446
+ const content = (bedrockResponse.output?.message?.content ??
2447
+ []);
2450
2448
  const textBlock = content.find((b) => "text" in b);
2451
2449
  if (!textBlock)
2452
2450
  return undefined;
2453
2451
  return extractJson(textBlock.text);
2454
2452
  }
2455
2453
  // Fake-tool path
2456
- const content = (bedrockResponse.output?.message?.content ?? []);
2454
+ const content = (bedrockResponse.output?.message?.content ??
2455
+ []);
2457
2456
  const last = content[content.length - 1];
2458
2457
  if (last &&
2459
2458
  "toolUse" in last &&