genai-lite 0.8.0 → 0.8.1

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.
@@ -617,6 +617,7 @@ exports.SUPPORTED_MODELS = [
617
617
  },
618
618
  // Google Gemma 3 Models (Open weights, free via Gemini API)
619
619
  // Note: Gemma models don't support system instructions - system content is prepended to user message
620
+ // Note: Gemma models don't support JSON mode/structured output via Google's API
620
621
  {
621
622
  id: "gemma-3-27b-it",
622
623
  name: "Gemma 3 27B",
@@ -629,6 +630,10 @@ exports.SUPPORTED_MODELS = [
629
630
  supportsImages: true,
630
631
  supportsPromptCache: false,
631
632
  supportsSystemMessage: false,
633
+ structuredOutput: {
634
+ supported: false,
635
+ notes: "Gemma models do not support JSON mode via Google's API",
636
+ },
632
637
  },
633
638
  // OpenAI Models - GPT-5 Series
634
639
  {
@@ -890,6 +895,11 @@ exports.SUPPORTED_MODELS = [
890
895
  maxTokens: 8192,
891
896
  supportsImages: true,
892
897
  supportsPromptCache: false,
898
+ structuredOutput: {
899
+ supported: true,
900
+ strictMode: true,
901
+ notes: "Structured output supported via OpenRouter",
902
+ },
893
903
  },
894
904
  {
895
905
  id: "mistralai/mistral-small-3.1-24b-instruct:free",
@@ -902,6 +912,11 @@ exports.SUPPORTED_MODELS = [
902
912
  maxTokens: 8192,
903
913
  supportsImages: false,
904
914
  supportsPromptCache: false,
915
+ structuredOutput: {
916
+ supported: true,
917
+ strictMode: true,
918
+ notes: "Structured output supported via OpenRouter",
919
+ },
905
920
  },
906
921
  ];
907
922
  /**
@@ -140,11 +140,14 @@ class RequestValidator {
140
140
  // If model has explicit structuredOutput capabilities defined, check them
141
141
  if (modelInfo.structuredOutput !== undefined) {
142
142
  if (!modelInfo.structuredOutput.supported) {
143
+ const notes = modelInfo.structuredOutput.notes;
144
+ const baseMessage = `Structured output is not available for ${request.modelId} on ${request.providerId}`;
145
+ const message = notes ? `${baseMessage}. ${notes}` : baseMessage;
143
146
  return {
144
147
  provider: request.providerId,
145
148
  model: request.modelId,
146
149
  error: {
147
- message: `Model ${request.modelId} does not support structured output`,
150
+ message,
148
151
  type: 'validation_error',
149
152
  code: 'structured_output_not_supported'
150
153
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genai-lite",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "A lightweight, portable toolkit for interacting with various Generative AI APIs.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",