@mate-academy/llm-gateway 6.2.0 → 6.3.0

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.
Files changed (50) hide show
  1. package/README.md +18 -12
  2. package/dist/LLMService.constants.d.ts +471 -7
  3. package/dist/providers/GoogleGenerativeAI/GoogleGenerativeAI.constants.d.ts +295 -3
  4. package/dist/providers/GoogleGenerativeAI/GoogleGenerativeAI.constants.js +101 -0
  5. package/dist/providers/GoogleGenerativeAI/GoogleGenerativeAI.constants.js.map +1 -1
  6. package/dist/providers/GoogleGenerativeAI/GoogleGenerativeAI.typedefs.d.ts +6 -2
  7. package/dist/providers/GoogleGenerativeAI/GoogleGenerativeAI.typedefs.js +4 -0
  8. package/dist/providers/GoogleGenerativeAI/GoogleGenerativeAI.typedefs.js.map +1 -1
  9. package/dist/providers/GoogleGenerativeAI/services/GoogleGenerativeAIAssistance.service.d.ts +4 -0
  10. package/dist/providers/GoogleGenerativeAI/services/GoogleGenerativeAIAssistance.service.js +145 -163
  11. package/dist/providers/GoogleGenerativeAI/services/GoogleGenerativeAIAssistance.service.js.map +1 -1
  12. package/dist/providers/LLMAPI/LLMAPI.constants.d.ts +3 -3
  13. package/dist/providers/LLMAPI/LLMAPI.constants.js +1 -1
  14. package/dist/providers/LLMAPI/LLMAPI.constants.js.map +1 -1
  15. package/dist/providers/LLMAPI/LLMAPI.entity.js +1 -2
  16. package/dist/providers/LLMAPI/LLMAPI.entity.js.map +1 -1
  17. package/dist/providers/LLMAPI/LLMAPI.typedefs.js.map +1 -1
  18. package/dist/providers/LLMAPI/services/LLMAPIAssistance.service.d.ts +5 -2
  19. package/dist/providers/LLMAPI/services/LLMAPIAssistance.service.js +145 -142
  20. package/dist/providers/LLMAPI/services/LLMAPIAssistance.service.js.map +1 -1
  21. package/dist/providers/LLMAPI/services/LLMAPICompletion.service.d.ts +0 -1
  22. package/dist/providers/LLMAPI/services/LLMAPICompletion.service.js +10 -16
  23. package/dist/providers/LLMAPI/services/LLMAPICompletion.service.js.map +1 -1
  24. package/dist/providers/LLMAPI/utilities/LLMAPIJsonFixer.js +2 -4
  25. package/dist/providers/LLMAPI/utilities/LLMAPIJsonFixer.js.map +1 -1
  26. package/dist/providers/LLMAPI/utilities/index.d.ts +2 -0
  27. package/dist/providers/LLMAPI/utilities/index.js +5 -1
  28. package/dist/providers/LLMAPI/utilities/index.js.map +1 -1
  29. package/dist/providers/LLMAPI/utilities/parseXmlToolCalls.d.ts +7 -0
  30. package/dist/providers/LLMAPI/utilities/parseXmlToolCalls.js +35 -0
  31. package/dist/providers/LLMAPI/utilities/parseXmlToolCalls.js.map +1 -0
  32. package/dist/providers/LLMAPI/utilities/stripThinkingTags.d.ts +1 -0
  33. package/dist/providers/LLMAPI/utilities/stripThinkingTags.js +7 -0
  34. package/dist/providers/LLMAPI/utilities/stripThinkingTags.js.map +1 -0
  35. package/dist/providers/OpenAI/OpenAI.constants.d.ts +222 -2
  36. package/dist/providers/OpenAI/OpenAI.constants.js +44 -0
  37. package/dist/providers/OpenAI/OpenAI.constants.js.map +1 -1
  38. package/dist/providers/OpenAI/OpenAI.typedefs.d.ts +3 -1
  39. package/dist/providers/OpenAI/OpenAI.typedefs.js +2 -0
  40. package/dist/providers/OpenAI/OpenAI.typedefs.js.map +1 -1
  41. package/dist/providers/OpenAI/services/OpenAIAssistance.service.d.ts +3 -0
  42. package/dist/providers/OpenAI/services/OpenAIAssistance.service.js +100 -156
  43. package/dist/providers/OpenAI/services/OpenAIAssistance.service.js.map +1 -1
  44. package/dist/providers/OpenAICompatible/OpenAICompatibleCompletion.service.d.ts +2 -0
  45. package/dist/providers/OpenAICompatible/OpenAICompatibleCompletion.service.js +60 -76
  46. package/dist/providers/OpenAICompatible/OpenAICompatibleCompletion.service.js.map +1 -1
  47. package/dist/services/chatState/CompletionsChatState.js.map +1 -1
  48. package/dist/services/fileStorage/fileStorageTools.js +2 -1
  49. package/dist/services/fileStorage/fileStorageTools.js.map +1 -1
  50. package/package.json +3 -3
package/README.md CHANGED
@@ -621,7 +621,7 @@ const customGPT5Model = {
621
621
  config: {
622
622
  ...gpt5Model.config,
623
623
  temperature: 1, // Note: GPT-5 only supports temperature=1
624
- reasoning_effort: 'high', // 'minimal' | 'medium' | 'high'
624
+ reasoning_effort: 'high', // 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'
625
625
  verbosity: 'low', // 'low' | 'medium' | 'high'
626
626
  }
627
627
  };
@@ -634,26 +634,26 @@ const customGPT51Model = {
634
634
  config: {
635
635
  ...gpt51Model.config,
636
636
  temperature: 1, // Note: GPT-5.1 only supports temperature=1
637
- reasoning_effort: 'none', // 'none' | 'minimal' | 'medium' | 'high'
637
+ reasoning_effort: 'none', // 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'
638
638
  verbosity: 'low', // 'low' | 'medium' | 'high'
639
639
  }
640
640
  };
641
641
  ```
642
642
 
643
- **Note:** All GPT-5 models require `temperature: 1` and cannot be changed. GPT-5, GPT-5-MINI, and GPT-5-NANO support reasoning_effort values of 'minimal', 'medium', or 'high'. GPT-5.1 and GPT-5.2 additionally supports 'none' as a reasoning_effort value.
643
+ **Note:** All GPT-5 models require `temperature: 1` and cannot be changed. GPT-5, GPT-5-MINI, and GPT-5-NANO support reasoning_effort values of 'minimal', 'low', 'medium', 'high', or 'xhigh'. GPT-5.1, GPT-5.2, and GPT-5.4 additionally support 'none'.
644
644
 
645
- **Gemini 3 Pro Preview** has special configuration options:
645
+ **Gemini 3.x thinking models** (gemini-3-flash-preview, gemini-3-pro-preview, gemini-3.1-pro-preview) have special configuration options:
646
646
 
647
647
  ```typescript
648
648
  import { ThinkingLevel } from '@google/genai';
649
649
 
650
- const gemini3Model = models[GoogleGenerativeAIModelNames.GEMINI_3_PRO_PREVIEW];
650
+ const gemini31Model = models[GoogleGenerativeAIModelNames.GEMINI_3_1_PRO_PREVIEW];
651
651
 
652
- const customGemini3Model = {
653
- ...gemini3Model,
652
+ const customGemini31Model = {
653
+ ...gemini31Model,
654
654
  config: {
655
- ...gemini3Model.config,
656
- temperature: 1, // Note: Gemini 3 Pro Preview only supports temperature=1
655
+ ...gemini31Model.config,
656
+ temperature: 1, // Note: Gemini 3.x thinking models only support temperature=1
657
657
  thinkingConfig: {
658
658
  thinkingLevel: ThinkingLevel.HIGH, // LOW | HIGH | THINKING_LEVEL_UNSPECIFIED
659
659
  },
@@ -661,7 +661,7 @@ const customGemini3Model = {
661
661
  };
662
662
  ```
663
663
 
664
- **Note:** Gemini 3 Pro Preview requires `temperature: 1` and cannot be changed. The `thinkingConfig` allows you to control the model's reasoning depth.
664
+ **Note:** Gemini 3.x thinking models require `temperature: 1` and cannot be changed. The `thinkingConfig` allows you to control the model's reasoning depth.
665
665
 
666
666
  #### File-based Assistance
667
667
 
@@ -1311,9 +1311,11 @@ Supports all service types: completion, assistance, speech-to-text, and text-to-
1311
1311
  |-------|---------|-----------|------------|-------|
1312
1312
  | gpt-4.1 | Completion, Assistance | 1M+ | 32K | Extended context window |
1313
1313
  | gpt-4.1-mini | Completion, Assistance | 1M+ | 32K | Cost-effective extended context |
1314
+ | gpt-4.1-nano | Completion, Assistance | 1M+ | 32K | Fastest, most cost-efficient GPT-4.1 |
1314
1315
  | gpt-5 | Completion, Assistance | 400K | 128K | Advanced reasoning, requires temperature=1 |
1315
1316
  | gpt-5.1 | Completion, Assistance | 400K | 128K | Advanced reasoning with 'none' reasoning_effort support, requires temperature=1 |
1316
1317
  | gpt-5.2 | Completion, Assistance | 400K | 128K | Advanced reasoning with 'none' reasoning_effort support, requires temperature=1 |
1318
+ | gpt-5.4 | Completion, Assistance | 1M+ | 128K | Flagship model, supports 'none'/'xhigh' reasoning_effort, requires temperature=1 |
1317
1319
  | gpt-5-mini | Completion, Assistance | 400K | 128K | Smaller GPT-5 variant, requires temperature=1 |
1318
1320
  | gpt-5-nano | Completion, Assistance | 400K | 128K | Fastest GPT-5 variant, requires temperature=1 |
1319
1321
  | gpt-4o-transcribe | Speech-to-Text | 16K | 2K | Optimized for transcription |
@@ -1332,13 +1334,17 @@ Supports completion, assistance, speech-to-text, and text-to-speech APIs through
1332
1334
  | gemini-2.5-flash | Completion, Assistance, Speech-to-Text | 1M+ | 65K | Fast, cost-effective, supports caching for long context |
1333
1335
  | gemini-2.5-flash-lite | Completion, Assistance, Speech-to-Text | 1M+ | 65K | Fastest, most cost-effective, supports caching |
1334
1336
  | gemini-2.5-pro | Completion, Assistance, Speech-to-Text | 1M+ | 65K | Advanced reasoning, supports caching for long context |
1335
- | gemini-3-pro-preview | Completion, Assistance, Speech-to-Text | 1M+ | 65K | Advanced reasoning with thinking capabilities, requires temperature=1, supports configurable thinking levels |
1337
+ | gemini-3-flash-preview | Completion, Assistance, Speech-to-Text | 1M+ | 65K | Thinking model, requires temperature=1, configurable thinking levels |
1338
+ | gemini-3.1-flash-lite-preview | Completion, Assistance, Speech-to-Text | 1M+ | 65K | Most cost-efficient Gemini 3.x model |
1339
+ | gemini-3-pro-preview | Completion, Assistance, Speech-to-Text | 1M+ | 65K | **Deprecated** (shutdown March 9, 2026). Migrate to gemini-3.1-pro-preview |
1340
+ | gemini-3.1-pro-preview | Completion, Assistance, Speech-to-Text | 1M+ | 65K | Advanced reasoning with thinking capabilities, requires temperature=1 |
1336
1341
  | gemini-2.5-flash-preview-tts | Text-to-Speech | 8K | 16K | Preview TTS model with flash performance |
1337
1342
  | gemini-2.5-pro-preview-tts | Text-to-Speech | 8K | 16K | Preview TTS model with pro capabilities |
1338
1343
 
1339
1344
  **Note:** Google Generative AI models support context caching for content longer than 32,768 tokens, which can significantly reduce costs for repeated queries on the same large context.
1340
1345
 
1341
- **Gemini 3 Pro Preview Configuration:**
1346
+ **Gemini 3.x Thinking Model Configuration:**
1347
+ - Applies to: gemini-3-pro-preview, gemini-3-flash-preview, gemini-3.1-pro-preview
1342
1348
  - Requires `temperature: 1` (cannot be changed)
1343
1349
  - Supports `thinkingConfig` with `thinkingLevel` property (LOW, HIGH, THINKING_LEVEL_UNSPECIFIED)
1344
1350
  - Default thinking level is LOW