@ljoukov/llm 7.0.4 → 7.0.5

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.js CHANGED
@@ -7135,25 +7135,16 @@ function toGeminiThinkingLevel(thinkingLevel) {
7135
7135
  return ThinkingLevel.HIGH;
7136
7136
  }
7137
7137
  }
7138
- function toGemini25ProThinkingBudget(thinkingLevel) {
7139
- switch (thinkingLevel) {
7140
- case "low":
7141
- return 256;
7142
- case "medium":
7143
- return 4096;
7144
- case "high":
7145
- return 32768;
7146
- }
7147
- }
7148
7138
  function resolveGeminiThinkingConfig(modelId, thinkingLevel) {
7149
7139
  if (isGeminiImageModelId(modelId) || modelId === "gemini-flash-lite-latest") {
7150
7140
  return void 0;
7151
7141
  }
7152
7142
  if (thinkingLevel) {
7153
- if (modelId === "gemini-2.5-pro") {
7143
+ const thinkingBudget = resolveGeminiThinkingBudget(modelId, thinkingLevel);
7144
+ if (thinkingBudget !== void 0) {
7154
7145
  return {
7155
7146
  includeThoughts: true,
7156
- thinkingBudget: toGemini25ProThinkingBudget(thinkingLevel)
7147
+ thinkingBudget
7157
7148
  };
7158
7149
  }
7159
7150
  return {
@@ -7175,6 +7166,39 @@ function resolveGeminiThinkingConfig(modelId, thinkingLevel) {
7175
7166
  return { includeThoughts: true };
7176
7167
  }
7177
7168
  }
7169
+ function resolveGeminiThinkingBudget(modelId, thinkingLevel) {
7170
+ if (modelId === "gemini-2.5-pro") {
7171
+ switch (thinkingLevel) {
7172
+ case "low":
7173
+ return 256;
7174
+ case "medium":
7175
+ return 4096;
7176
+ case "high":
7177
+ return 32768;
7178
+ }
7179
+ }
7180
+ if (modelId === "gemini-flash-latest") {
7181
+ switch (thinkingLevel) {
7182
+ case "low":
7183
+ return 256;
7184
+ case "medium":
7185
+ return 8192;
7186
+ case "high":
7187
+ return 24576;
7188
+ }
7189
+ }
7190
+ if (modelId === "gemini-3-flash-preview") {
7191
+ switch (thinkingLevel) {
7192
+ case "low":
7193
+ return 256;
7194
+ case "medium":
7195
+ return 8192;
7196
+ case "high":
7197
+ return 16384;
7198
+ }
7199
+ }
7200
+ return void 0;
7201
+ }
7178
7202
  function decodeInlineDataBuffer(base64) {
7179
7203
  try {
7180
7204
  return Buffer5.from(base64, "base64");