@ljoukov/llm 7.0.3 → 7.0.4

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.d.cts CHANGED
@@ -282,12 +282,6 @@ type LlmBaseRequest = {
282
282
  readonly imageAspectRatio?: string;
283
283
  readonly imageSize?: LlmImageSize;
284
284
  readonly thinkingLevel?: LlmThinkingLevel;
285
- /**
286
- * Gemini-only explicit thinking budget. When provided, this overrides
287
- * `thinkingLevel` and the model default for Gemini requests. Use `0` to
288
- * disable thinking where the selected Gemini model supports it.
289
- */
290
- readonly thinkingBudget?: number;
291
285
  readonly mediaResolution?: LlmMediaResolution;
292
286
  readonly openAiTextFormat?: ResponseTextConfig["format"];
293
287
  readonly telemetry?: TelemetrySelection;
@@ -435,7 +429,6 @@ type LlmToolLoopRequest = LlmInput & {
435
429
  readonly modelTools?: readonly LlmToolConfig[];
436
430
  readonly maxSteps?: number;
437
431
  readonly thinkingLevel?: LlmThinkingLevel;
438
- readonly thinkingBudget?: number;
439
432
  readonly mediaResolution?: LlmMediaResolution;
440
433
  readonly steering?: LlmToolLoopSteeringChannel;
441
434
  readonly onEvent?: (event: LlmStreamEvent) => void;
package/dist/index.d.ts CHANGED
@@ -282,12 +282,6 @@ type LlmBaseRequest = {
282
282
  readonly imageAspectRatio?: string;
283
283
  readonly imageSize?: LlmImageSize;
284
284
  readonly thinkingLevel?: LlmThinkingLevel;
285
- /**
286
- * Gemini-only explicit thinking budget. When provided, this overrides
287
- * `thinkingLevel` and the model default for Gemini requests. Use `0` to
288
- * disable thinking where the selected Gemini model supports it.
289
- */
290
- readonly thinkingBudget?: number;
291
285
  readonly mediaResolution?: LlmMediaResolution;
292
286
  readonly openAiTextFormat?: ResponseTextConfig["format"];
293
287
  readonly telemetry?: TelemetrySelection;
@@ -435,7 +429,6 @@ type LlmToolLoopRequest = LlmInput & {
435
429
  readonly modelTools?: readonly LlmToolConfig[];
436
430
  readonly maxSteps?: number;
437
431
  readonly thinkingLevel?: LlmThinkingLevel;
438
- readonly thinkingBudget?: number;
439
432
  readonly mediaResolution?: LlmMediaResolution;
440
433
  readonly steering?: LlmToolLoopSteeringChannel;
441
434
  readonly onEvent?: (event: LlmStreamEvent) => void;
package/dist/index.js CHANGED
@@ -7145,14 +7145,10 @@ function toGemini25ProThinkingBudget(thinkingLevel) {
7145
7145
  return 32768;
7146
7146
  }
7147
7147
  }
7148
- function resolveGeminiThinkingConfig(modelId, thinkingLevel, thinkingBudget) {
7148
+ function resolveGeminiThinkingConfig(modelId, thinkingLevel) {
7149
7149
  if (isGeminiImageModelId(modelId) || modelId === "gemini-flash-lite-latest") {
7150
7150
  return void 0;
7151
7151
  }
7152
- if (thinkingBudget !== void 0) {
7153
- const normalizedBudget = Math.max(0, Math.floor(thinkingBudget));
7154
- return normalizedBudget === 0 ? { thinkingBudget: 0 } : { includeThoughts: true, thinkingBudget: normalizedBudget };
7155
- }
7156
7152
  if (thinkingLevel) {
7157
7153
  if (modelId === "gemini-2.5-pro") {
7158
7154
  return {
@@ -7528,7 +7524,6 @@ function startLlmCallLoggerFromContents(options) {
7528
7524
  ...options.request.imageAspectRatio ? { imageAspectRatio: options.request.imageAspectRatio } : {},
7529
7525
  ...options.request.imageSize ? { imageSize: options.request.imageSize } : {},
7530
7526
  ...options.request.thinkingLevel ? { thinkingLevel: options.request.thinkingLevel } : {},
7531
- ...options.request.thinkingBudget !== void 0 ? { thinkingBudget: options.request.thinkingBudget } : {},
7532
7527
  ...options.request.mediaResolution ? { mediaResolution: options.request.mediaResolution } : {},
7533
7528
  ...options.request.openAiTextFormat ? { openAiTextFormat: sanitiseLogValue(options.request.openAiTextFormat) } : {},
7534
7529
  ...getCurrentToolCallContext() ? { toolContext: getCurrentToolCallContext() } : {}
@@ -7830,11 +7825,7 @@ async function runTextCall(params) {
7830
7825
  })
7831
7826
  )
7832
7827
  );
7833
- const thinkingConfig = resolveGeminiThinkingConfig(
7834
- modelForProvider,
7835
- request.thinkingLevel,
7836
- request.thinkingBudget
7837
- );
7828
+ const thinkingConfig = resolveGeminiThinkingConfig(modelForProvider, request.thinkingLevel);
7838
7829
  const mediaResolution = toGeminiMediaResolution(request.mediaResolution);
7839
7830
  const config = {
7840
7831
  maxOutputTokens: 32e3,
@@ -8141,7 +8132,6 @@ function startJsonStream(request, operation) {
8141
8132
  responseMimeType: request.responseMimeType ?? "application/json",
8142
8133
  responseJsonSchema,
8143
8134
  thinkingLevel: request.thinkingLevel,
8144
- thinkingBudget: request.thinkingBudget,
8145
8135
  ...openAiTextFormatForAttempt ? { openAiTextFormat: openAiTextFormatForAttempt } : {},
8146
8136
  telemetry: false,
8147
8137
  signal
@@ -9546,11 +9536,7 @@ async function runToolLoop(request) {
9546
9536
  firstModelEventAtMs = Date.now();
9547
9537
  }
9548
9538
  };
9549
- const thinkingConfig = resolveGeminiThinkingConfig(
9550
- request.model,
9551
- request.thinkingLevel,
9552
- request.thinkingBudget
9553
- );
9539
+ const thinkingConfig = resolveGeminiThinkingConfig(request.model, request.thinkingLevel);
9554
9540
  const mediaResolution = toGeminiMediaResolution(request.mediaResolution);
9555
9541
  const config = {
9556
9542
  maxOutputTokens: 32e3,