@node-llm/core 0.4.1 → 0.6.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 (98) hide show
  1. package/README.md +89 -27
  2. package/dist/chat/Chat.d.ts +6 -1
  3. package/dist/chat/Chat.d.ts.map +1 -1
  4. package/dist/chat/Chat.js +27 -4
  5. package/dist/chat/ChatOptions.d.ts +3 -0
  6. package/dist/chat/ChatOptions.d.ts.map +1 -1
  7. package/dist/chat/ChatResponse.d.ts +3 -0
  8. package/dist/chat/ChatResponse.d.ts.map +1 -1
  9. package/dist/chat/ChatResponse.js +3 -0
  10. package/dist/index.d.ts +2 -0
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +2 -0
  13. package/dist/llm.d.ts +5 -1
  14. package/dist/llm.d.ts.map +1 -1
  15. package/dist/llm.js +22 -6
  16. package/dist/models/ModelRegistry.d.ts +39 -12
  17. package/dist/models/ModelRegistry.d.ts.map +1 -1
  18. package/dist/models/ModelRegistry.js +50 -40
  19. package/dist/models/models.d.ts +972 -0
  20. package/dist/models/models.d.ts.map +1 -0
  21. package/dist/models/models.js +7026 -0
  22. package/dist/models/types.d.ts +50 -0
  23. package/dist/models/types.d.ts.map +1 -0
  24. package/dist/models/types.js +1 -0
  25. package/dist/providers/Provider.d.ts +5 -0
  26. package/dist/providers/Provider.d.ts.map +1 -1
  27. package/dist/providers/anthropic/AnthropicProvider.d.ts +32 -0
  28. package/dist/providers/anthropic/AnthropicProvider.d.ts.map +1 -0
  29. package/dist/providers/anthropic/AnthropicProvider.js +49 -0
  30. package/dist/providers/anthropic/Capabilities.d.ts +11 -0
  31. package/dist/providers/anthropic/Capabilities.d.ts.map +1 -0
  32. package/dist/providers/anthropic/Capabilities.js +82 -0
  33. package/dist/providers/anthropic/Chat.d.ts +8 -0
  34. package/dist/providers/anthropic/Chat.d.ts.map +1 -0
  35. package/dist/providers/anthropic/Chat.js +97 -0
  36. package/dist/providers/anthropic/Errors.d.ts +2 -0
  37. package/dist/providers/anthropic/Errors.d.ts.map +1 -0
  38. package/dist/providers/anthropic/Errors.js +33 -0
  39. package/dist/providers/anthropic/Models.d.ts +9 -0
  40. package/dist/providers/anthropic/Models.d.ts.map +1 -0
  41. package/dist/providers/anthropic/Models.js +58 -0
  42. package/dist/providers/anthropic/Streaming.d.ts +8 -0
  43. package/dist/providers/anthropic/Streaming.d.ts.map +1 -0
  44. package/dist/providers/anthropic/Streaming.js +113 -0
  45. package/dist/providers/anthropic/Utils.d.ts +5 -0
  46. package/dist/providers/anthropic/Utils.d.ts.map +1 -0
  47. package/dist/providers/anthropic/Utils.js +125 -0
  48. package/dist/providers/anthropic/index.d.ts +2 -0
  49. package/dist/providers/anthropic/index.d.ts.map +1 -0
  50. package/dist/providers/anthropic/index.js +11 -0
  51. package/dist/providers/anthropic/types.d.ts +57 -0
  52. package/dist/providers/anthropic/types.d.ts.map +1 -0
  53. package/dist/providers/anthropic/types.js +1 -0
  54. package/dist/providers/gemini/Capabilities.d.ts +28 -7
  55. package/dist/providers/gemini/Capabilities.d.ts.map +1 -1
  56. package/dist/providers/gemini/Capabilities.js +37 -22
  57. package/dist/providers/gemini/Chat.d.ts +1 -0
  58. package/dist/providers/gemini/Chat.d.ts.map +1 -1
  59. package/dist/providers/gemini/Chat.js +40 -3
  60. package/dist/providers/gemini/GeminiProvider.d.ts +2 -1
  61. package/dist/providers/gemini/GeminiProvider.d.ts.map +1 -1
  62. package/dist/providers/gemini/GeminiProvider.js +3 -0
  63. package/dist/providers/gemini/Models.d.ts +1 -0
  64. package/dist/providers/gemini/Models.d.ts.map +1 -1
  65. package/dist/providers/gemini/Models.js +46 -26
  66. package/dist/providers/gemini/Streaming.d.ts +1 -0
  67. package/dist/providers/gemini/Streaming.d.ts.map +1 -1
  68. package/dist/providers/gemini/Streaming.js +34 -4
  69. package/dist/providers/openai/Capabilities.d.ts +3 -11
  70. package/dist/providers/openai/Capabilities.d.ts.map +1 -1
  71. package/dist/providers/openai/Capabilities.js +119 -122
  72. package/dist/providers/openai/Chat.d.ts.map +1 -1
  73. package/dist/providers/openai/Chat.js +19 -17
  74. package/dist/providers/openai/Embedding.d.ts.map +1 -1
  75. package/dist/providers/openai/Embedding.js +2 -1
  76. package/dist/providers/openai/Image.d.ts.map +1 -1
  77. package/dist/providers/openai/Image.js +2 -1
  78. package/dist/providers/openai/ModelDefinitions.d.ts +1 -24
  79. package/dist/providers/openai/ModelDefinitions.d.ts.map +1 -1
  80. package/dist/providers/openai/ModelDefinitions.js +1 -211
  81. package/dist/providers/openai/Models.d.ts +1 -0
  82. package/dist/providers/openai/Models.d.ts.map +1 -1
  83. package/dist/providers/openai/Models.js +46 -22
  84. package/dist/providers/openai/Moderation.d.ts.map +1 -1
  85. package/dist/providers/openai/Moderation.js +2 -1
  86. package/dist/providers/openai/Streaming.d.ts.map +1 -1
  87. package/dist/providers/openai/Streaming.js +5 -1
  88. package/dist/providers/openai/Transcription.d.ts.map +1 -1
  89. package/dist/providers/openai/Transcription.js +3 -2
  90. package/dist/providers/openai/index.d.ts.map +1 -1
  91. package/dist/providers/openai/index.js +2 -1
  92. package/dist/providers/openai/utils.d.ts +20 -0
  93. package/dist/providers/openai/utils.d.ts.map +1 -0
  94. package/dist/providers/openai/utils.js +25 -0
  95. package/dist/providers/registry.js +1 -1
  96. package/dist/utils/FileLoader.d.ts.map +1 -1
  97. package/dist/utils/FileLoader.js +1 -0
  98. package/package.json +1 -1
@@ -0,0 +1,125 @@
1
+ export function formatSystemPrompt(messages) {
2
+ let systemPrompt;
3
+ for (const msg of messages) {
4
+ if (msg.role === "system") {
5
+ if (typeof msg.content === "string") {
6
+ systemPrompt = msg.content;
7
+ }
8
+ else if (Array.isArray(msg.content)) {
9
+ systemPrompt = msg.content
10
+ .filter((p) => p.type === "text")
11
+ .map(p => p.text)
12
+ .join("\n");
13
+ }
14
+ else if (msg.content) {
15
+ systemPrompt = String(msg.content);
16
+ }
17
+ }
18
+ }
19
+ return systemPrompt;
20
+ }
21
+ export function formatMessages(requestMessages) {
22
+ const messages = [];
23
+ for (const msg of requestMessages) {
24
+ if (msg.role === "system")
25
+ continue;
26
+ const formatted = formatSingleMessage(msg);
27
+ const lastMsg = messages[messages.length - 1];
28
+ if (lastMsg && lastMsg.role === formatted.role) {
29
+ // Merge content
30
+ let existingContent = Array.isArray(lastMsg.content)
31
+ ? lastMsg.content
32
+ : [{ type: "text", text: lastMsg.content }];
33
+ const newContent = Array.isArray(formatted.content)
34
+ ? formatted.content
35
+ : [{ type: "text", text: formatted.content }];
36
+ lastMsg.content = [...existingContent, ...newContent];
37
+ }
38
+ else {
39
+ messages.push(formatted);
40
+ }
41
+ }
42
+ return messages;
43
+ }
44
+ function formatSingleMessage(msg) {
45
+ const role = msg.role === "user" ? "user" : "assistant";
46
+ // Handle Tool Responses (role: "tool")
47
+ if (msg.role === "tool") {
48
+ return {
49
+ role: "user",
50
+ content: [{
51
+ type: "tool_result",
52
+ tool_use_id: msg.tool_call_id,
53
+ content: typeof msg.content === "string" ? msg.content : JSON.stringify(msg.content)
54
+ }]
55
+ };
56
+ }
57
+ // Handle Assistant Messages (which might have tool_calls)
58
+ if (msg.role === "assistant" && msg.tool_calls) {
59
+ const blocks = [];
60
+ // Assistant text content
61
+ const text = String(msg.content || "");
62
+ if (text.length > 0) {
63
+ blocks.push({ type: "text", text });
64
+ }
65
+ // Assistant tool uses
66
+ for (const toolCall of msg.tool_calls) {
67
+ blocks.push({
68
+ type: "tool_use",
69
+ id: toolCall.id,
70
+ name: toolCall.function.name,
71
+ input: JSON.parse(toolCall.function.arguments)
72
+ });
73
+ }
74
+ return { role: "assistant", content: blocks };
75
+ }
76
+ const contentText = String(msg.content || "");
77
+ if (contentText && typeof msg.content === "string") {
78
+ return { role, content: contentText };
79
+ }
80
+ if (contentText && msg.content instanceof String) {
81
+ return { role, content: contentText };
82
+ }
83
+ // Handle multimodal content (images)
84
+ const blocks = [];
85
+ if (Array.isArray(msg.content)) {
86
+ for (const part of msg.content) {
87
+ if (part.type === "text") {
88
+ blocks.push({ type: "text", text: part.text });
89
+ }
90
+ else if (part.type === "image_url") {
91
+ const url = part.image_url.url;
92
+ if (url.startsWith("data:")) {
93
+ const parts = url.split(",");
94
+ const meta = parts[0];
95
+ const data = parts.slice(1).join(",");
96
+ if (meta && data) {
97
+ const mimeMatch = meta.match(/:(.*?);/);
98
+ const mediaType = mimeMatch ? mimeMatch[1] : "image/jpeg";
99
+ if (mediaType === "application/pdf") {
100
+ blocks.push({
101
+ type: "document",
102
+ source: {
103
+ type: "base64",
104
+ media_type: "application/pdf",
105
+ data: data
106
+ }
107
+ });
108
+ }
109
+ else {
110
+ blocks.push({
111
+ type: "image",
112
+ source: {
113
+ type: "base64",
114
+ media_type: mediaType || "image/jpeg",
115
+ data: data
116
+ }
117
+ });
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
123
+ }
124
+ return { role, content: blocks };
125
+ }
@@ -0,0 +1,2 @@
1
+ export declare function registerAnthropicProvider(): void;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/anthropic/index.ts"],"names":[],"mappings":"AAGA,wBAAgB,yBAAyB,SAQxC"}
@@ -0,0 +1,11 @@
1
+ import { providerRegistry } from "../registry.js";
2
+ import { AnthropicProvider } from "./AnthropicProvider.js";
3
+ export function registerAnthropicProvider() {
4
+ providerRegistry.register("anthropic", () => {
5
+ const apiKey = process.env.ANTHROPIC_API_KEY;
6
+ if (!apiKey) {
7
+ throw new Error("ANTHROPIC_API_KEY environment variable is not set");
8
+ }
9
+ return new AnthropicProvider({ apiKey: apiKey.trim() });
10
+ });
11
+ }
@@ -0,0 +1,57 @@
1
+ export interface AnthropicMessage {
2
+ role: "user" | "assistant";
3
+ content: string | Array<AnthropicContentBlock>;
4
+ }
5
+ export interface AnthropicContentBlock {
6
+ type: "text" | "image" | "tool_use" | "tool_result" | "document";
7
+ text?: string;
8
+ source?: {
9
+ type: "base64";
10
+ media_type: string;
11
+ data: string;
12
+ };
13
+ id?: string;
14
+ name?: string;
15
+ input?: any;
16
+ tool_use_id?: string;
17
+ content?: string | Array<AnthropicContentBlock>;
18
+ is_error?: boolean;
19
+ }
20
+ export interface AnthropicMessageRequest {
21
+ model: string;
22
+ messages: AnthropicMessage[];
23
+ max_tokens: number;
24
+ system?: string;
25
+ metadata?: any;
26
+ stop_sequences?: string[];
27
+ stream?: boolean;
28
+ temperature?: number;
29
+ top_p?: number;
30
+ top_k?: number;
31
+ tools?: any[];
32
+ tool_choice?: any;
33
+ }
34
+ export interface AnthropicUsage {
35
+ input_tokens: number;
36
+ output_tokens: number;
37
+ cache_creation_input_tokens?: number;
38
+ cache_read_input_tokens?: number;
39
+ }
40
+ export interface AnthropicMessageResponse {
41
+ id: string;
42
+ type: "message";
43
+ role: "assistant";
44
+ content: AnthropicContentBlock[];
45
+ model: string;
46
+ stop_reason: "end_turn" | "max_tokens" | "stop_sequence" | "tool_use" | null;
47
+ stop_sequence: string | null;
48
+ usage: AnthropicUsage;
49
+ }
50
+ export interface AnthropicErrorResponse {
51
+ type: "error";
52
+ error: {
53
+ type: string;
54
+ message: string;
55
+ };
56
+ }
57
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/anthropic/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,GAAG,UAAU,CAAC;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM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CAAC;IAC7B,KAAK,EAAE,cAAc,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH"}
@@ -0,0 +1 @@
1
+ export {};
@@ -4,27 +4,48 @@ export declare class Capabilities {
4
4
  static supportsVision(modelId: string): boolean;
5
5
  static supportsTools(modelId: string): boolean;
6
6
  static supportsStructuredOutput(modelId: string): boolean;
7
+ static supportsSystemInstructions(modelId: string): boolean;
7
8
  static supportsJsonMode(modelId: string): boolean;
8
9
  static supportsEmbeddings(modelId: string): boolean;
9
10
  static supportsImageGeneration(modelId: string): boolean;
10
11
  static supportsTranscription(modelId: string): boolean;
11
12
  static supportsModeration(modelId: string): boolean;
12
- static normalizeTemperature(temperature: number | undefined, _modelId: string): number | undefined | null;
13
- static getFamily(modelId: string): string;
13
+ static normalizeTemperature(temperature: number | undefined, model: string): number | undefined;
14
14
  static getModalities(modelId: string): {
15
15
  input: string[];
16
16
  output: string[];
17
17
  };
18
18
  static getCapabilities(modelId: string): string[];
19
19
  static getPricing(modelId: string): {
20
- text_tokens: {
21
- standard: {
22
- input_per_million: number;
23
- output_per_million: number;
20
+ text_tokens?: {
21
+ standard?: {
22
+ input_per_million?: number;
23
+ cached_input_per_million?: number;
24
+ output_per_million?: number;
25
+ reasoning_output_per_million?: number;
26
+ };
27
+ batch?: {
28
+ input_per_million?: number;
29
+ output_per_million?: number;
30
+ };
31
+ };
32
+ images?: {
33
+ standard?: {
34
+ input?: number;
35
+ output?: number;
36
+ };
37
+ batch?: {
38
+ input?: number;
39
+ output?: number;
40
+ };
41
+ };
42
+ audio_tokens?: {
43
+ standard?: {
44
+ input_per_million?: number;
45
+ output_per_million?: number;
24
46
  };
25
47
  };
26
48
  };
27
- static formatDisplayName(modelId: string): string;
28
49
  private static normalizeModelId;
29
50
  }
30
51
  //# sourceMapping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EAAE,MAAM,GAAG,MAAM,EAAE;IAUjD,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM;;oBArI8C,CAAC;iCAA6B,CAAC;wCAE5G,CAAF;kCAC8B,CAAC;4CAGvB,CAAC;;iBAA+B,CAAA;iCAGtC,CAAF;kCAAoC,CAAC;;;;oBAG3B,CAAC;qBACP,CAAF;sBAEA,CAAD;;iBAGM,CAAC;qBAAiB,CAAC;sBAAyB,CAAA;;;;oBACD,CAAC;iCACxC,CAAC;kCAAoC,CAAC;;;;IA8IjD,OAAO,CAAC,MAAM,CAAC,gBAAgB;CAGhC"}
@@ -1,5 +1,9 @@
1
+ import { ModelRegistry } from "../../models/ModelRegistry.js";
1
2
  export class Capabilities {
2
3
  static getContextWindow(modelId) {
4
+ const val = ModelRegistry.getContextWindow(modelId, "gemini");
5
+ if (val !== undefined && val !== null)
6
+ return val;
3
7
  const id = this.normalizeModelId(modelId);
4
8
  if (id.match(/gemini-2\.5-pro-exp-03-25|gemini-2\.0-flash|gemini-2\.0-flash-lite|gemini-1\.5-flash|gemini-1\.5-flash-8b/)) {
5
9
  return 1_048_576;
@@ -19,6 +23,9 @@ export class Capabilities {
19
23
  return 32_768;
20
24
  }
21
25
  static getMaxOutputTokens(modelId) {
26
+ const val = ModelRegistry.getMaxOutputTokens(modelId, "gemini");
27
+ if (val !== undefined && val !== null)
28
+ return val;
22
29
  const id = this.normalizeModelId(modelId);
23
30
  if (id.match(/gemini-2\.5-pro-exp-03-25/)) {
24
31
  return 64_000;
@@ -35,6 +42,9 @@ export class Capabilities {
35
42
  return 4_096;
36
43
  }
37
44
  static supportsVision(modelId) {
45
+ const model = ModelRegistry.find(modelId, "gemini");
46
+ if (model?.modalities?.input?.includes("image"))
47
+ return true;
38
48
  const id = this.normalizeModelId(modelId);
39
49
  if (id.match(/text-embedding|embedding-001|aqa/)) {
40
50
  return false;
@@ -42,6 +52,9 @@ export class Capabilities {
42
52
  return !!id.match(/gemini|flash|pro|imagen/);
43
53
  }
44
54
  static supportsTools(modelId) {
55
+ const model = ModelRegistry.find(modelId, "gemini");
56
+ if (model?.capabilities?.includes("function_calling"))
57
+ return true;
45
58
  const id = this.normalizeModelId(modelId);
46
59
  if (id.match(/text-embedding|embedding-001|aqa|flash-lite|imagen|gemini-2\.0-flash-lite/)) {
47
60
  return false;
@@ -49,46 +62,48 @@ export class Capabilities {
49
62
  return !!id.match(/gemini|pro|flash/);
50
63
  }
51
64
  static supportsStructuredOutput(modelId) {
52
- // Explicitly disabled until implementation is validated
53
- return false;
65
+ const model = ModelRegistry.find(modelId, "gemini");
66
+ if (model?.capabilities?.includes("structured_output"))
67
+ return true;
68
+ const id = this.normalizeModelId(modelId);
69
+ if (id.match(/text-embedding|embedding-001|aqa|imagen/)) {
70
+ return false;
71
+ }
72
+ return true;
73
+ }
74
+ static supportsSystemInstructions(modelId) {
75
+ return true;
54
76
  }
55
77
  static supportsJsonMode(modelId) {
56
78
  return this.supportsStructuredOutput(modelId);
57
79
  }
58
80
  static supportsEmbeddings(modelId) {
81
+ const model = ModelRegistry.find(modelId, "gemini");
82
+ if (model?.modalities?.output?.includes("embeddings"))
83
+ return true;
59
84
  const id = this.normalizeModelId(modelId);
60
85
  return !!id.match(/text-embedding|embedding|gemini-embedding/);
61
86
  }
62
87
  static supportsImageGeneration(modelId) {
88
+ const model = ModelRegistry.find(modelId, "gemini");
89
+ if (model?.capabilities?.includes("image_generation") || model?.modalities?.output?.includes("image"))
90
+ return true;
63
91
  const id = this.normalizeModelId(modelId);
64
92
  return !!id.match(/imagen/);
65
93
  }
66
94
  static supportsTranscription(modelId) {
95
+ const model = ModelRegistry.find(modelId, "gemini");
96
+ if (model?.modalities?.input?.includes("audio"))
97
+ return true;
67
98
  const id = this.normalizeModelId(modelId);
68
99
  return !!id.match(/gemini|flash|pro/);
69
100
  }
70
101
  static supportsModeration(modelId) {
71
102
  return false;
72
103
  }
73
- static normalizeTemperature(temperature, _modelId) {
104
+ static normalizeTemperature(temperature, model) {
74
105
  return temperature;
75
106
  }
76
- static getFamily(modelId) {
77
- const id = this.normalizeModelId(modelId);
78
- if (id.startsWith("gemini-1.5-pro"))
79
- return "gemini-1.5-pro";
80
- if (id.startsWith("gemini-1.5-flash"))
81
- return "gemini-1.5-flash";
82
- if (id.startsWith("gemini-2.0-flash"))
83
- return "gemini-2.0-flash";
84
- if (id.startsWith("gemini-2.0-flash-lite"))
85
- return "gemini-2.0-flash-lite";
86
- if (id.startsWith("text-embedding"))
87
- return "text-embedding";
88
- if (id.startsWith("imagen"))
89
- return "imagen";
90
- return "other";
91
- }
92
107
  static getModalities(modelId) {
93
108
  const input = ["text"];
94
109
  const output = ["text"];
@@ -115,6 +130,9 @@ export class Capabilities {
115
130
  return caps;
116
131
  }
117
132
  static getPricing(modelId) {
133
+ const model = ModelRegistry.find(modelId, "gemini");
134
+ if (model?.pricing)
135
+ return model.pricing;
118
136
  const id = this.normalizeModelId(modelId);
119
137
  let input = 0;
120
138
  let output = 0;
@@ -139,9 +157,6 @@ export class Capabilities {
139
157
  }
140
158
  };
141
159
  }
142
- static formatDisplayName(modelId) {
143
- return modelId.replace("models/", "").replace(/-/g, " ").replace(/\b\w/g, l => l.toUpperCase());
144
- }
145
160
  static normalizeModelId(modelId) {
146
161
  return modelId.replace("models/", "");
147
162
  }
@@ -4,5 +4,6 @@ export declare class GeminiChat {
4
4
  private readonly apiKey;
5
5
  constructor(baseUrl: string, apiKey: string);
6
6
  execute(request: ChatRequest): Promise<ChatResponse>;
7
+ private sanitizeSchema;
7
8
  }
8
9
  //# sourceMappingURL=Chat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/providers/gemini/Chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAM3D,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,OAAO;IAAU,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAxC,OAAO,EAAE,MAAM,EAAmB,MAAM,EAAE,MAAM;IAEvE,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;CAqE3D"}
1
+ {"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/providers/gemini/Chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAS,MAAM,gBAAgB,CAAC;AAOlE,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,OAAO;IAAU,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAxC,OAAO,EAAE,MAAM,EAAmB,MAAM,EAAE,MAAM;IAEvE,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAyF1D,OAAO,CAAC,cAAc;CAwBvB"}
@@ -1,6 +1,7 @@
1
1
  import { Capabilities } from "./Capabilities.js";
2
2
  import { handleGeminiError } from "./Errors.js";
3
3
  import { GeminiChatUtils } from "./ChatUtils.js";
4
+ import { ModelRegistry } from "../../models/ModelRegistry.js";
4
5
  export class GeminiChat {
5
6
  baseUrl;
6
7
  apiKey;
@@ -12,12 +13,27 @@ export class GeminiChat {
12
13
  const temperature = Capabilities.normalizeTemperature(request.temperature, request.model);
13
14
  const url = `${this.baseUrl}/models/${request.model}:generateContent?key=${this.apiKey}`;
14
15
  const { contents, systemInstructionParts } = await GeminiChatUtils.convertMessages(request.messages);
16
+ const generationConfig = {
17
+ temperature: temperature ?? undefined,
18
+ maxOutputTokens: request.max_tokens,
19
+ };
20
+ if (request.response_format?.type === "json_object") {
21
+ generationConfig.responseMimeType = "application/json";
22
+ }
23
+ else if (request.response_format?.type === "json_schema") {
24
+ generationConfig.responseMimeType = "application/json";
25
+ if (request.response_format.json_schema?.schema) {
26
+ generationConfig.responseSchema = this.sanitizeSchema(request.response_format.json_schema.schema);
27
+ }
28
+ }
29
+ const { model: _model, messages: _messages, tools: _tools, temperature: _temp, max_tokens: _max, response_format: _format, headers: _headers, ...rest } = request;
15
30
  const payload = {
16
31
  contents,
17
32
  generationConfig: {
18
- temperature: temperature ?? undefined,
19
- maxOutputTokens: request.max_tokens,
33
+ ...generationConfig,
34
+ ...(rest.generationConfig || {})
20
35
  },
36
+ ...rest
21
37
  };
22
38
  if (systemInstructionParts.length > 0) {
23
39
  payload.systemInstruction = { parts: systemInstructionParts };
@@ -64,6 +80,27 @@ export class GeminiChat {
64
80
  output_tokens: json.usageMetadata.candidatesTokenCount,
65
81
  total_tokens: json.usageMetadata.totalTokenCount,
66
82
  } : undefined;
67
- return { content, tool_calls, usage };
83
+ const calculatedUsage = usage ? ModelRegistry.calculateCost(usage, request.model, "gemini") : undefined;
84
+ return { content, tool_calls, usage: calculatedUsage };
85
+ }
86
+ sanitizeSchema(schema) {
87
+ if (typeof schema !== "object" || schema === null)
88
+ return schema;
89
+ const sanitized = { ...schema };
90
+ // Remove unsupported fields
91
+ delete sanitized.additionalProperties;
92
+ delete sanitized.$schema;
93
+ delete sanitized.$id;
94
+ delete sanitized.definitions;
95
+ // Recursively sanitize
96
+ if (sanitized.properties) {
97
+ for (const key in sanitized.properties) {
98
+ sanitized.properties[key] = this.sanitizeSchema(sanitized.properties[key]);
99
+ }
100
+ }
101
+ if (sanitized.items) {
102
+ sanitized.items = this.sanitizeSchema(sanitized.items);
103
+ }
104
+ return sanitized;
68
105
  }
69
106
  }
@@ -1,4 +1,4 @@
1
- import { Provider, ChatRequest, ChatResponse, ModelInfo, ChatChunk, ImageRequest, ImageResponse, TranscriptionRequest, TranscriptionResponse } from "../Provider.js";
1
+ import { Provider, ChatRequest, ChatResponse, ModelInfo, ChatChunk, ImageRequest, ImageResponse, TranscriptionRequest, TranscriptionResponse, ModerationRequest, ModerationResponse } from "../Provider.js";
2
2
  import { EmbeddingRequest, EmbeddingResponse } from "../Embedding.js";
3
3
  export interface GeminiProviderOptions {
4
4
  apiKey: string;
@@ -30,5 +30,6 @@ export declare class GeminiProvider implements Provider {
30
30
  paint(request: ImageRequest): Promise<ImageResponse>;
31
31
  embed(request: EmbeddingRequest): Promise<EmbeddingResponse>;
32
32
  transcribe(request: TranscriptionRequest): Promise<TranscriptionResponse>;
33
+ moderate(_request: ModerationRequest): Promise<ModerationResponse>;
33
34
  }
34
35
  //# sourceMappingURL=GeminiProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GeminiProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/gemini/GeminiProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAQrK,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEtE,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,cAAe,YAAW,QAAQ;IAoBjC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAnBpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IACzC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAkB;IACnD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAe;IAC7C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAc;IAC3C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmB;IACpD,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAsB;IAEpD,YAAY;gCACO,MAAM;+BACP,MAAM;0CACK,MAAM;oCACZ,MAAM;yCACD,MAAM;uCACR,MAAM;oCACT,MAAM;kCACR,MAAM;MAChC;gBAE2B,OAAO,EAAE,qBAAqB;IAUrD,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,C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,MAAM;uCACR,MAAM;oCACT,MAAM;kCACR,MAAM;MAChC;gBAE2B,OAAO,EAAE,qBAAqB;IAUrD,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAIhD,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,cAAc,CAAC,SAAS,CAAC;IAIxD,UAAU,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAIlC,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC;IAIpD,KAAK,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAI5D,UAAU,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAIzE,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAGzE"}
@@ -52,4 +52,7 @@ export class GeminiProvider {
52
52
  async transcribe(request) {
53
53
  return this.transcriptionHandler.execute(request);
54
54
  }
55
+ async moderate(_request) {
56
+ throw new Error("Gemini doesn't support moderation");
57
+ }
55
58
  }
@@ -4,5 +4,6 @@ export declare class GeminiModels {
4
4
  private readonly apiKey;
5
5
  constructor(baseUrl: string, apiKey: string);
6
6
  execute(): Promise<ModelInfo[]>;
7
+ find(modelId: string): import("../../models/types.js").Model | undefined;
7
8
  }
8
9
  //# sourceMappingURL=Models.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Models.d.ts","sourceRoot":"","sources":["../../../src/providers/gemini/Models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAI3C,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,OAAO;IAAU,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAxC,OAAO,EAAE,MAAM,EAAmB,MAAM,EAAE,MAAM;IAEvE,OAAO,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;CAgCtC"}
1
+ {"version":3,"file":"Models.d.ts","sourceRoot":"","sources":["../../../src/providers/gemini/Models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAK3C,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,OAAO;IAAU,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAxC,OAAO,EAAE,MAAM,EAAmB,MAAM,EAAE,MAAM;IAEvE,OAAO,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAkDrC,IAAI,CAAC,OAAO,EAAE,MAAM;CAGrB"}
@@ -1,4 +1,5 @@
1
1
  import { Capabilities } from "./Capabilities.js";
2
+ import { ModelRegistry } from "../../models/ModelRegistry.js";
2
3
  export class GeminiModels {
3
4
  baseUrl;
4
5
  apiKey;
@@ -7,32 +8,51 @@ export class GeminiModels {
7
8
  this.apiKey = apiKey;
8
9
  }
9
10
  async execute() {
10
- const url = `${this.baseUrl}/models?key=${this.apiKey}`;
11
- const response = await fetch(url);
12
- if (!response.ok) {
13
- const errorText = await response.text();
14
- throw new Error(`Gemini error (${response.status}): ${errorText}`);
15
- }
16
- const json = (await response.json());
17
- return json.models
18
- .filter(m => m.supportedGenerationMethods.includes("generateContent"))
19
- .map((model) => {
20
- const id = model.name.replace("models/", "");
21
- return {
22
- id: id,
23
- name: model.displayName || Capabilities.formatDisplayName(id),
24
- provider: "gemini",
25
- family: Capabilities.getFamily(id),
26
- context_window: model.inputTokenLimit || Capabilities.getContextWindow(id),
27
- max_output_tokens: model.outputTokenLimit || Capabilities.getMaxOutputTokens(id),
28
- modalities: Capabilities.getModalities(id),
29
- capabilities: Capabilities.getCapabilities(id),
30
- pricing: Capabilities.getPricing(id),
31
- metadata: {
32
- description: model.description,
33
- version: model.version,
11
+ try {
12
+ const response = await fetch(`${this.baseUrl}/models?key=${this.apiKey}`, {
13
+ method: "GET",
14
+ headers: {
15
+ "Content-Type": "application/json",
34
16
  },
35
- };
36
- });
17
+ });
18
+ if (response.ok) {
19
+ const { models } = await response.json();
20
+ return models.map(m => {
21
+ const modelId = m.name.replace("models/", "");
22
+ const registryModel = ModelRegistry.find(modelId, "gemini");
23
+ const info = {
24
+ id: modelId,
25
+ name: registryModel?.name || m.displayName || modelId,
26
+ provider: "gemini",
27
+ family: registryModel?.family || modelId,
28
+ context_window: registryModel?.context_window || Capabilities.getContextWindow(modelId),
29
+ max_output_tokens: registryModel?.max_output_tokens || Capabilities.getMaxOutputTokens(modelId),
30
+ modalities: registryModel?.modalities || Capabilities.getModalities(modelId),
31
+ capabilities: Capabilities.getCapabilities(modelId),
32
+ pricing: registryModel?.pricing || Capabilities.getPricing(modelId),
33
+ metadata: {
34
+ ...(registryModel?.metadata || {}),
35
+ description: m.description,
36
+ input_token_limit: m.inputTokenLimit,
37
+ output_token_limit: m.outputTokenLimit,
38
+ supported_generation_methods: m.supportedGenerationMethods
39
+ }
40
+ };
41
+ return info;
42
+ });
43
+ }
44
+ }
45
+ catch (_error) {
46
+ // Fallback
47
+ }
48
+ return ModelRegistry.all()
49
+ .filter(m => m.provider === "gemini")
50
+ .map(m => ({
51
+ ...m,
52
+ capabilities: Capabilities.getCapabilities(m.id)
53
+ }));
54
+ }
55
+ find(modelId) {
56
+ return ModelRegistry.find(modelId, "gemini");
37
57
  }
38
58
  }
@@ -4,5 +4,6 @@ export declare class GeminiStreaming {
4
4
  private readonly apiKey;
5
5
  constructor(baseUrl: string, apiKey: string);
6
6
  execute(request: ChatRequest): AsyncGenerator<ChatChunk>;
7
+ private sanitizeSchema;
7
8
  }
8
9
  //# sourceMappingURL=Streaming.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Streaming.d.ts","sourceRoot":"","sources":["../../../src/providers/gemini/Streaming.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAMxD,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,OAAO;IAAU,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAxC,OAAO,EAAE,MAAM,EAAmB,MAAM,EAAE,MAAM;IAEtE,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,cAAc,CAAC,SAAS,CAAC;CAoEhE"}
1
+ {"version":3,"file":"Streaming.d.ts","sourceRoot":"","sources":["../../../src/providers/gemini/Streaming.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAMxD,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,OAAO;IAAU,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAxC,OAAO,EAAE,MAAM,EAAmB,MAAM,EAAE,MAAM;IAEtE,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,cAAc,CAAC,SAAS,CAAC;IAgF/D,OAAO,CAAC,cAAc;CAwBvB"}