@llumiverse/common 0.20.0 → 0.21.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.
- package/lib/cjs/capability/azure_foundry.js +158 -0
- package/lib/cjs/capability/azure_foundry.js.map +1 -0
- package/lib/cjs/capability.js +8 -3
- package/lib/cjs/capability.js.map +1 -1
- package/lib/cjs/options/azure_foundry.js +425 -0
- package/lib/cjs/options/azure_foundry.js.map +1 -0
- package/lib/cjs/options.js +16 -9
- package/lib/cjs/options.js.map +1 -1
- package/lib/cjs/types.js +95 -1
- package/lib/cjs/types.js.map +1 -1
- package/lib/esm/capability/azure_foundry.js +155 -0
- package/lib/esm/capability/azure_foundry.js.map +1 -0
- package/lib/esm/capability.js +8 -3
- package/lib/esm/capability.js.map +1 -1
- package/lib/esm/options/azure_foundry.js +421 -0
- package/lib/esm/options/azure_foundry.js.map +1 -0
- package/lib/esm/options.js +16 -9
- package/lib/esm/options.js.map +1 -1
- package/lib/esm/types.js +94 -0
- package/lib/esm/types.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types/capability/azure_foundry.d.ts +7 -0
- package/lib/types/capability/azure_foundry.d.ts.map +1 -0
- package/lib/types/capability.d.ts +3 -3
- package/lib/types/capability.d.ts.map +1 -1
- package/lib/types/options/azure_foundry.d.ts +52 -0
- package/lib/types/options/azure_foundry.d.ts.map +1 -0
- package/lib/types/options.d.ts +2 -2
- package/lib/types/options.d.ts.map +1 -1
- package/lib/types/types.d.ts +22 -0
- package/lib/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/capability/azure_foundry.ts +179 -0
- package/src/capability.ts +11 -7
- package/src/options/azure_foundry.ts +485 -0
- package/src/options.ts +17 -11
- package/src/types.ts +113 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getModelCapabilitiesAzureFoundry = getModelCapabilitiesAzureFoundry;
|
|
4
|
+
// Global feature flags - temporarily disable tool support for non-OpenAI models
|
|
5
|
+
const ENABLE_TOOL_SUPPORT_NON_OPENAI = false;
|
|
6
|
+
// Record of Azure Foundry model capabilities keyed by model ID (lowercased)
|
|
7
|
+
// Only include models with specific exceptions that differ from their family patterns
|
|
8
|
+
const RECORD_MODEL_CAPABILITIES = {
|
|
9
|
+
// OpenAI O-series exceptions - o1-mini doesn't have tool support like other o1 models
|
|
10
|
+
"o1-mini": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
11
|
+
// OpenAI o3 is text-only unlike other o-series models
|
|
12
|
+
"o3": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },
|
|
13
|
+
// Models with special properties not covered by family patterns
|
|
14
|
+
"deepseek-r1-0528": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
15
|
+
"deepseek-v3-0324": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
16
|
+
"mistral-medium-2505": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
17
|
+
"mistral-nemo": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
18
|
+
"llama-4-scout-17b-16e-instruct": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
19
|
+
};
|
|
20
|
+
// Populate RECORD_FAMILY_CAPABILITIES as a const record (lowest common denominator for each family)
|
|
21
|
+
const RECORD_FAMILY_CAPABILITIES = {
|
|
22
|
+
// OpenAI GPT families
|
|
23
|
+
"gpt-3.5-turbo": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
24
|
+
"gpt-35-turbo": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
25
|
+
"gpt-35": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
26
|
+
"gpt-4": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },
|
|
27
|
+
"gpt-4.1": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },
|
|
28
|
+
"gpt-4.5": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },
|
|
29
|
+
"gpt-4o": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },
|
|
30
|
+
// OpenAI O-series families
|
|
31
|
+
"o1": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },
|
|
32
|
+
"o1-preview": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },
|
|
33
|
+
"o1-pro": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },
|
|
34
|
+
"o3-mini": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },
|
|
35
|
+
"o4-mini": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },
|
|
36
|
+
"o4": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },
|
|
37
|
+
// Llama families
|
|
38
|
+
"llama-3.1": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },
|
|
39
|
+
"llama-3.2": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
40
|
+
"llama-3.3": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },
|
|
41
|
+
"llama-3": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },
|
|
42
|
+
"llama-4": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
43
|
+
"llama": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
44
|
+
// Mistral families
|
|
45
|
+
"mistral-large": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },
|
|
46
|
+
"mistral-small": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },
|
|
47
|
+
"mistral": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
48
|
+
// Microsoft Phi families
|
|
49
|
+
"phi-4": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
50
|
+
"phi": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
51
|
+
// DeepSeek families
|
|
52
|
+
"deepseek-r1": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
53
|
+
"deepseek-v3": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },
|
|
54
|
+
"deepseek": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },
|
|
55
|
+
// AI21 families
|
|
56
|
+
"ai21-jamba": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },
|
|
57
|
+
"ai21": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },
|
|
58
|
+
"jamba": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },
|
|
59
|
+
// Cohere families
|
|
60
|
+
"cohere-command": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },
|
|
61
|
+
"cohere": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },
|
|
62
|
+
"command": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },
|
|
63
|
+
// xAI families
|
|
64
|
+
"grok-3": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },
|
|
65
|
+
"grok": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true }
|
|
66
|
+
};
|
|
67
|
+
// Fallback pattern lists for inferring modalities and tool support
|
|
68
|
+
const IMAGE_INPUT_MODELS = ["image", "vision"];
|
|
69
|
+
const VIDEO_INPUT_MODELS = ["video"];
|
|
70
|
+
const AUDIO_INPUT_MODELS = ["audio"];
|
|
71
|
+
const TEXT_INPUT_MODELS = ["text"];
|
|
72
|
+
const IMAGE_OUTPUT_MODELS = ["image"];
|
|
73
|
+
const VIDEO_OUTPUT_MODELS = ["video"];
|
|
74
|
+
const AUDIO_OUTPUT_MODELS = ["audio"];
|
|
75
|
+
const TEXT_OUTPUT_MODELS = ["text"];
|
|
76
|
+
const EMBEDDING_OUTPUT_MODELS = ["embed"];
|
|
77
|
+
const TOOL_SUPPORT_MODELS = ["tool", "gpt-4", "gpt-4o", "o1", "o3", "o4", "llama-3", "mistral-large", "mistral-small", "jamba", "cohere", "command", "grok"];
|
|
78
|
+
function modelMatches(modelName, patterns) {
|
|
79
|
+
return patterns.some(pattern => modelName.includes(pattern));
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get the full ModelCapabilities for an Azure Foundry model.
|
|
83
|
+
* Checks RECORD_MODEL_CAPABILITIES first, then falls back to family pattern matching.
|
|
84
|
+
*/
|
|
85
|
+
function getModelCapabilitiesAzureFoundry(model) {
|
|
86
|
+
// Extract base model from composite ID (deployment::baseModel)
|
|
87
|
+
const { baseModel } = parseAzureFoundryModelId(model);
|
|
88
|
+
const normalized = baseModel.toLowerCase();
|
|
89
|
+
// 1. Exact match in record
|
|
90
|
+
const record = RECORD_MODEL_CAPABILITIES[normalized];
|
|
91
|
+
if (record) {
|
|
92
|
+
return applyGlobalToolSupportDisable(record, normalized);
|
|
93
|
+
}
|
|
94
|
+
// 2. Fallback: find the longest matching family prefix in RECORD_FAMILY_CAPABILITIES
|
|
95
|
+
let bestFamilyKey = undefined;
|
|
96
|
+
let bestFamilyLength = 0;
|
|
97
|
+
for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {
|
|
98
|
+
if (normalized.startsWith(key) && key.length > bestFamilyLength) {
|
|
99
|
+
bestFamilyKey = key;
|
|
100
|
+
bestFamilyLength = key.length;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (bestFamilyKey) {
|
|
104
|
+
return applyGlobalToolSupportDisable(RECORD_FAMILY_CAPABILITIES[bestFamilyKey], normalized);
|
|
105
|
+
}
|
|
106
|
+
// 3. Fallback: infer from normalized name using patterns
|
|
107
|
+
const input = {
|
|
108
|
+
text: modelMatches(normalized, TEXT_INPUT_MODELS) || true, // Default to text input
|
|
109
|
+
image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,
|
|
110
|
+
video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,
|
|
111
|
+
audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,
|
|
112
|
+
embed: false
|
|
113
|
+
};
|
|
114
|
+
const output = {
|
|
115
|
+
text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || true, // Default to text output
|
|
116
|
+
image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,
|
|
117
|
+
video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,
|
|
118
|
+
audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,
|
|
119
|
+
embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined
|
|
120
|
+
};
|
|
121
|
+
const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;
|
|
122
|
+
const tool_support_streaming = tool_support || undefined;
|
|
123
|
+
const inferredCapabilities = { input, output, tool_support, tool_support_streaming };
|
|
124
|
+
return applyGlobalToolSupportDisable(inferredCapabilities, normalized);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Apply global tool support disable for non-OpenAI models.
|
|
128
|
+
* Preserves model-specific information for future use while temporarily disabling tool support.
|
|
129
|
+
*/
|
|
130
|
+
function applyGlobalToolSupportDisable(capabilities, modelName) {
|
|
131
|
+
// Check if this is an OpenAI model
|
|
132
|
+
const isOpenAIModel = modelName.startsWith('gpt-') || modelName.startsWith('o1') || modelName.startsWith('o3') || modelName.startsWith('o4');
|
|
133
|
+
if (!ENABLE_TOOL_SUPPORT_NON_OPENAI && !isOpenAIModel) {
|
|
134
|
+
// Disable tool support for non-OpenAI models while preserving other capabilities
|
|
135
|
+
return {
|
|
136
|
+
...capabilities,
|
|
137
|
+
tool_support: false,
|
|
138
|
+
tool_support_streaming: false
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
return capabilities;
|
|
142
|
+
}
|
|
143
|
+
// Helper function to parse composite model IDs
|
|
144
|
+
function parseAzureFoundryModelId(compositeId) {
|
|
145
|
+
const parts = compositeId.split('::');
|
|
146
|
+
if (parts.length === 2) {
|
|
147
|
+
return {
|
|
148
|
+
deploymentName: parts[0],
|
|
149
|
+
baseModel: parts[1]
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
// Backwards compatibility: if no delimiter found, treat as deployment name
|
|
153
|
+
return {
|
|
154
|
+
deploymentName: compositeId,
|
|
155
|
+
baseModel: compositeId
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=azure_foundry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"azure_foundry.js","sourceRoot":"","sources":["../../../src/capability/azure_foundry.ts"],"names":[],"mappings":";;AAiGA,4EA4CC;AA3ID,gFAAgF;AAChF,MAAM,8BAA8B,GAAG,KAAK,CAAC;AAE7C,6EAA6E;AAC7E,sF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CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAE7I,IAAI,CAAC,8BAA8B,IAAI,CAAC,aAAa,EAAE,CAAC;QACpD,iFAAiF;QACjF,OAAO;YACH,GAAG,YAAY;YACf,YAAY,EAAE,KAAK;YACnB,sBAAsB,EAAE,KAAK;SAChC,CAAC;IACN,CAAC;IAED,OAAO,YAAY,CAAC;AACxB,CAAC;AAED,+CAA+C;AAC/C,SAAS,wBAAwB,CAAC,WAAmB;IACjD,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO;YACH,cAAc,EAAE,KAAK,CAAC,CAAC,CAAC;YACxB,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;SACtB,CAAC;IACN,CAAC;IAED,2EAA2E;IAC3E,OAAO;QACH,cAAc,EAAE,WAAW;QAC3B,SAAS,EAAE,WAAW;KACzB,CAAC;AACN,CAAC"}
|
package/lib/cjs/capability.js
CHANGED
|
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getModelCapabilities = getModelCapabilities;
|
|
4
4
|
exports.supportsToolUse = supportsToolUse;
|
|
5
5
|
exports.modelModalitiesToArray = modelModalitiesToArray;
|
|
6
|
+
const azure_foundry_js_1 = require("./capability/azure_foundry.js");
|
|
6
7
|
const bedrock_js_1 = require("./capability/bedrock.js");
|
|
7
8
|
const openai_js_1 = require("./capability/openai.js");
|
|
8
9
|
const vertexai_js_1 = require("./capability/vertexai.js");
|
|
10
|
+
const types_js_1 = require("./types.js");
|
|
9
11
|
function getModelCapabilities(model, provider) {
|
|
10
12
|
const capabilities = _getModelCapabilities(model, provider);
|
|
11
13
|
// Globally disable audio and video for all models, as we don't support them yet
|
|
@@ -19,12 +21,15 @@ function getModelCapabilities(model, provider) {
|
|
|
19
21
|
}
|
|
20
22
|
function _getModelCapabilities(model, provider) {
|
|
21
23
|
switch (provider?.toLowerCase()) {
|
|
22
|
-
case
|
|
24
|
+
case types_js_1.Providers.vertexai:
|
|
23
25
|
return (0, vertexai_js_1.getModelCapabilitiesVertexAI)(model);
|
|
24
|
-
case
|
|
26
|
+
case types_js_1.Providers.openai:
|
|
25
27
|
return (0, openai_js_1.getModelCapabilitiesOpenAI)(model);
|
|
26
|
-
case
|
|
28
|
+
case types_js_1.Providers.bedrock:
|
|
27
29
|
return (0, bedrock_js_1.getModelCapabilitiesBedrock)(model);
|
|
30
|
+
case types_js_1.Providers.azure_foundry:
|
|
31
|
+
// Azure Foundry uses OpenAI capabilities
|
|
32
|
+
return (0, azure_foundry_js_1.getModelCapabilitiesAzureFoundry)(model);
|
|
28
33
|
default:
|
|
29
34
|
// Guess the provider based on the model name
|
|
30
35
|
if (model.startsWith("gpt")) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.js","sourceRoot":"","sources":["../../src/capability.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"capability.js","sourceRoot":"","sources":["../../src/capability.ts"],"names":[],"mappings":";;AAMA,oDAUC;AA2BD,0CAGC;AAED,wDAIC;AApDD,oEAAiF;AACjF,wDAAsE;AACtE,sDAAoE;AACpE,0DAAwE;AACxE,yCAA2E;AAE3E,SAAgB,oBAAoB,CAAC,KAAa,EAAE,QAA6B;IAC7E,MAAM,YAAY,GAAG,qBAAqB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC5D,gFAAgF;IAChF,kDAAkD;IAClD,yCAAyC;IACzC,YAAY,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;IACjC,YAAY,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IAClC,YAAY,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IAClC,YAAY,CAAC,sBAAsB,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,CAAC,YAAY,CAAC,YAAY,CAAC;AAC3F,CAAC;AAED,SAAgB,sBAAsB,CAAC,UAA2B;IAC9D,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;SAC5B,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC;SACzC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMaxTokensLimitAzureFoundry = getMaxTokensLimitAzureFoundry;
|
|
4
|
+
exports.getAzureFoundryOptions = getAzureFoundryOptions;
|
|
5
|
+
const types_js_1 = require("../types.js");
|
|
6
|
+
// Helper function to parse composite model IDs
|
|
7
|
+
function parseAzureFoundryModelId(compositeId) {
|
|
8
|
+
const parts = compositeId.split('::');
|
|
9
|
+
if (parts.length === 2) {
|
|
10
|
+
return {
|
|
11
|
+
deploymentName: parts[0],
|
|
12
|
+
baseModel: parts[1]
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
// Backwards compatibility: if no delimiter found, treat as deployment name
|
|
16
|
+
return {
|
|
17
|
+
deploymentName: compositeId,
|
|
18
|
+
baseModel: compositeId
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function getMaxTokensLimitAzureFoundry(model) {
|
|
22
|
+
// Extract base model from composite ID (deployment::baseModel)
|
|
23
|
+
const { baseModel } = parseAzureFoundryModelId(model);
|
|
24
|
+
const modelLower = baseModel.toLowerCase();
|
|
25
|
+
// GPT models
|
|
26
|
+
if (modelLower.includes("gpt-4o")) {
|
|
27
|
+
if (modelLower.includes("mini")) {
|
|
28
|
+
return 16384;
|
|
29
|
+
}
|
|
30
|
+
return 16384;
|
|
31
|
+
}
|
|
32
|
+
if (modelLower.includes("gpt-4")) {
|
|
33
|
+
if (modelLower.includes("turbo")) {
|
|
34
|
+
return 4096;
|
|
35
|
+
}
|
|
36
|
+
if (modelLower.includes("32k")) {
|
|
37
|
+
return 32768;
|
|
38
|
+
}
|
|
39
|
+
return 8192;
|
|
40
|
+
}
|
|
41
|
+
if (modelLower.includes("gpt-35") || modelLower.includes("gpt-3.5")) {
|
|
42
|
+
return 4096;
|
|
43
|
+
}
|
|
44
|
+
// O-series models
|
|
45
|
+
if (modelLower.includes("o1")) {
|
|
46
|
+
if (modelLower.includes("preview")) {
|
|
47
|
+
return 32768;
|
|
48
|
+
}
|
|
49
|
+
if (modelLower.includes("mini")) {
|
|
50
|
+
return 65536;
|
|
51
|
+
}
|
|
52
|
+
return 100000;
|
|
53
|
+
}
|
|
54
|
+
if (modelLower.includes("o3")) {
|
|
55
|
+
if (modelLower.includes("mini")) {
|
|
56
|
+
return 100000;
|
|
57
|
+
}
|
|
58
|
+
return 100000;
|
|
59
|
+
}
|
|
60
|
+
if (modelLower.includes("o4")) {
|
|
61
|
+
return 100000;
|
|
62
|
+
}
|
|
63
|
+
// DeepSeek models
|
|
64
|
+
if (modelLower.includes("deepseek")) {
|
|
65
|
+
if (modelLower.includes("r1")) {
|
|
66
|
+
return 163840;
|
|
67
|
+
}
|
|
68
|
+
if (modelLower.includes("v3")) {
|
|
69
|
+
return 131072;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// Claude models
|
|
73
|
+
if (modelLower.includes("claude")) {
|
|
74
|
+
if (modelLower.includes("3-5") || modelLower.includes("3-7")) {
|
|
75
|
+
return 8192;
|
|
76
|
+
}
|
|
77
|
+
if (modelLower.includes("3")) {
|
|
78
|
+
return 4096;
|
|
79
|
+
}
|
|
80
|
+
return 4096;
|
|
81
|
+
}
|
|
82
|
+
// Llama models
|
|
83
|
+
if (modelLower.includes("llama")) {
|
|
84
|
+
if (modelLower.includes("3.1") || modelLower.includes("3.3")) {
|
|
85
|
+
return 8192;
|
|
86
|
+
}
|
|
87
|
+
if (modelLower.includes("4")) {
|
|
88
|
+
return 1000000; // 1M context
|
|
89
|
+
}
|
|
90
|
+
return 8192;
|
|
91
|
+
}
|
|
92
|
+
// Mistral models
|
|
93
|
+
if (modelLower.includes("mistral")) {
|
|
94
|
+
if (modelLower.includes("large")) {
|
|
95
|
+
return 4096;
|
|
96
|
+
}
|
|
97
|
+
if (modelLower.includes("small")) {
|
|
98
|
+
return 4096;
|
|
99
|
+
}
|
|
100
|
+
return 4096;
|
|
101
|
+
}
|
|
102
|
+
// Phi models
|
|
103
|
+
if (modelLower.includes("phi")) {
|
|
104
|
+
return 4096;
|
|
105
|
+
}
|
|
106
|
+
// AI21 Jamba models
|
|
107
|
+
if (modelLower.includes("jamba")) {
|
|
108
|
+
return 4096;
|
|
109
|
+
}
|
|
110
|
+
// Cohere models
|
|
111
|
+
if (modelLower.includes("cohere")) {
|
|
112
|
+
if (modelLower.includes("command-a")) {
|
|
113
|
+
return 8000;
|
|
114
|
+
}
|
|
115
|
+
return 4096;
|
|
116
|
+
}
|
|
117
|
+
// Grok models
|
|
118
|
+
if (modelLower.includes("grok")) {
|
|
119
|
+
return 131072;
|
|
120
|
+
}
|
|
121
|
+
return undefined;
|
|
122
|
+
}
|
|
123
|
+
function getAzureFoundryOptions(model, _option) {
|
|
124
|
+
// Extract base model from composite ID (deployment::baseModel)
|
|
125
|
+
const { baseModel } = parseAzureFoundryModelId(model);
|
|
126
|
+
const modelLower = baseModel.toLowerCase();
|
|
127
|
+
const max_tokens_limit = getMaxTokensLimitAzureFoundry(model);
|
|
128
|
+
// Image generation models
|
|
129
|
+
if (modelLower.includes("dall-e") || modelLower.includes("gpt-image")) {
|
|
130
|
+
return {
|
|
131
|
+
_option_id: "azure-foundry-image",
|
|
132
|
+
options: [
|
|
133
|
+
{
|
|
134
|
+
name: "size",
|
|
135
|
+
type: types_js_1.OptionType.enum,
|
|
136
|
+
enum: {
|
|
137
|
+
"256x256": "256x256",
|
|
138
|
+
"512x512": "512x512",
|
|
139
|
+
"1024x1024": "1024x1024",
|
|
140
|
+
"1792x1024": "1792x1024",
|
|
141
|
+
"1024x1792": "1024x1792"
|
|
142
|
+
},
|
|
143
|
+
default: "1024x1024",
|
|
144
|
+
description: "The size of the generated image"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "quality",
|
|
148
|
+
type: types_js_1.OptionType.enum,
|
|
149
|
+
enum: { "Standard": "standard", "HD": "hd" },
|
|
150
|
+
default: "standard",
|
|
151
|
+
description: "The quality of the generated image"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: "style",
|
|
155
|
+
type: types_js_1.OptionType.enum,
|
|
156
|
+
enum: { "Vivid": "vivid", "Natural": "natural" },
|
|
157
|
+
default: "vivid",
|
|
158
|
+
description: "The style of the generated image"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: "response_format",
|
|
162
|
+
type: types_js_1.OptionType.enum,
|
|
163
|
+
enum: { "URL": "url", "Base64 JSON": "b64_json" },
|
|
164
|
+
default: "url",
|
|
165
|
+
description: "The format of the response"
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
// Vision model options
|
|
171
|
+
const visionOptions = isVisionModel(modelLower) ? [
|
|
172
|
+
{
|
|
173
|
+
name: "image_detail",
|
|
174
|
+
type: types_js_1.OptionType.enum,
|
|
175
|
+
enum: { "Low": "low", "High": "high", "Auto": "auto" },
|
|
176
|
+
default: "auto",
|
|
177
|
+
description: "Controls how the model processes input images"
|
|
178
|
+
}
|
|
179
|
+
] : [];
|
|
180
|
+
// O-series and thinking models
|
|
181
|
+
if (modelLower.includes("o1") || modelLower.includes("o3") || modelLower.includes("o4")) {
|
|
182
|
+
const reasoningOptions = (modelLower.includes("o3") || isO1Full(modelLower)) ? [
|
|
183
|
+
{
|
|
184
|
+
name: "reasoning_effort",
|
|
185
|
+
type: types_js_1.OptionType.enum,
|
|
186
|
+
enum: { "Low": "low", "Medium": "medium", "High": "high" },
|
|
187
|
+
default: "medium",
|
|
188
|
+
description: "How much effort the model should put into reasoning"
|
|
189
|
+
}
|
|
190
|
+
] : [];
|
|
191
|
+
return {
|
|
192
|
+
_option_id: "azure-foundry-thinking",
|
|
193
|
+
options: [
|
|
194
|
+
{
|
|
195
|
+
name: types_js_1.SharedOptions.max_tokens,
|
|
196
|
+
type: types_js_1.OptionType.numeric,
|
|
197
|
+
min: 1,
|
|
198
|
+
max: max_tokens_limit,
|
|
199
|
+
integer: true,
|
|
200
|
+
description: "The maximum number of tokens to generate"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: types_js_1.SharedOptions.temperature,
|
|
204
|
+
type: types_js_1.OptionType.numeric,
|
|
205
|
+
min: 0.0,
|
|
206
|
+
max: 2.0,
|
|
207
|
+
default: 1.0,
|
|
208
|
+
step: 0.1,
|
|
209
|
+
description: "Controls randomness in the output"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: types_js_1.SharedOptions.top_p,
|
|
213
|
+
type: types_js_1.OptionType.numeric,
|
|
214
|
+
min: 0,
|
|
215
|
+
max: 1,
|
|
216
|
+
step: 0.1,
|
|
217
|
+
description: "Nucleus sampling parameter"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: types_js_1.SharedOptions.stop_sequence,
|
|
221
|
+
type: types_js_1.OptionType.string_list,
|
|
222
|
+
value: [],
|
|
223
|
+
description: "Sequences where the model will stop generating"
|
|
224
|
+
},
|
|
225
|
+
...reasoningOptions,
|
|
226
|
+
...visionOptions
|
|
227
|
+
]
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
// DeepSeek R1 models
|
|
231
|
+
if (modelLower.includes("deepseek") && modelLower.includes("r1")) {
|
|
232
|
+
return {
|
|
233
|
+
_option_id: "azure-foundry-deepseek",
|
|
234
|
+
options: [
|
|
235
|
+
{
|
|
236
|
+
name: types_js_1.SharedOptions.max_tokens,
|
|
237
|
+
type: types_js_1.OptionType.numeric,
|
|
238
|
+
min: 1,
|
|
239
|
+
max: max_tokens_limit,
|
|
240
|
+
integer: true,
|
|
241
|
+
description: "The maximum number of tokens to generate"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: types_js_1.SharedOptions.temperature,
|
|
245
|
+
type: types_js_1.OptionType.numeric,
|
|
246
|
+
min: 0.0,
|
|
247
|
+
max: 2.0,
|
|
248
|
+
default: 0.7,
|
|
249
|
+
step: 0.1,
|
|
250
|
+
description: "Lower temperatures recommended for DeepSeek R1 (0.3-0.7)"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: types_js_1.SharedOptions.top_p,
|
|
254
|
+
type: types_js_1.OptionType.numeric,
|
|
255
|
+
min: 0,
|
|
256
|
+
max: 1,
|
|
257
|
+
step: 0.1,
|
|
258
|
+
description: "Nucleus sampling parameter"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
name: types_js_1.SharedOptions.stop_sequence,
|
|
262
|
+
type: types_js_1.OptionType.string_list,
|
|
263
|
+
value: [],
|
|
264
|
+
description: "Sequences where the model will stop generating"
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
// OpenAI models (GPT-4, GPT-4o, GPT-3.5)
|
|
270
|
+
if (modelLower.includes("gpt-")) {
|
|
271
|
+
return {
|
|
272
|
+
_option_id: "azure-foundry-openai",
|
|
273
|
+
options: [
|
|
274
|
+
{
|
|
275
|
+
name: types_js_1.SharedOptions.max_tokens,
|
|
276
|
+
type: types_js_1.OptionType.numeric,
|
|
277
|
+
min: 1,
|
|
278
|
+
max: max_tokens_limit,
|
|
279
|
+
integer: true,
|
|
280
|
+
step: 200,
|
|
281
|
+
description: "The maximum number of tokens to generate"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
name: types_js_1.SharedOptions.temperature,
|
|
285
|
+
type: types_js_1.OptionType.numeric,
|
|
286
|
+
min: 0.0,
|
|
287
|
+
max: 2.0,
|
|
288
|
+
default: 0.7,
|
|
289
|
+
step: 0.1,
|
|
290
|
+
description: "Controls randomness in the output"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
name: types_js_1.SharedOptions.top_p,
|
|
294
|
+
type: types_js_1.OptionType.numeric,
|
|
295
|
+
min: 0,
|
|
296
|
+
max: 1,
|
|
297
|
+
step: 0.1,
|
|
298
|
+
description: "Nucleus sampling parameter"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: types_js_1.SharedOptions.presence_penalty,
|
|
302
|
+
type: types_js_1.OptionType.numeric,
|
|
303
|
+
min: -2.0,
|
|
304
|
+
max: 2.0,
|
|
305
|
+
step: 0.1,
|
|
306
|
+
description: "Penalize new tokens based on their presence in the text"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
name: types_js_1.SharedOptions.frequency_penalty,
|
|
310
|
+
type: types_js_1.OptionType.numeric,
|
|
311
|
+
min: -2.0,
|
|
312
|
+
max: 2.0,
|
|
313
|
+
step: 0.1,
|
|
314
|
+
description: "Penalize new tokens based on their frequency in the text"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
name: types_js_1.SharedOptions.stop_sequence,
|
|
318
|
+
type: types_js_1.OptionType.string_list,
|
|
319
|
+
value: [],
|
|
320
|
+
description: "Sequences where the model will stop generating"
|
|
321
|
+
},
|
|
322
|
+
...visionOptions
|
|
323
|
+
]
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
// General text models (Claude, Llama, Mistral, Phi, etc.)
|
|
327
|
+
const baseOptions = [
|
|
328
|
+
{
|
|
329
|
+
name: types_js_1.SharedOptions.max_tokens,
|
|
330
|
+
type: types_js_1.OptionType.numeric,
|
|
331
|
+
min: 1,
|
|
332
|
+
max: max_tokens_limit,
|
|
333
|
+
integer: true,
|
|
334
|
+
step: 200,
|
|
335
|
+
description: "The maximum number of tokens to generate"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
name: types_js_1.SharedOptions.temperature,
|
|
339
|
+
type: types_js_1.OptionType.numeric,
|
|
340
|
+
min: 0.0,
|
|
341
|
+
max: 2.0,
|
|
342
|
+
default: 0.7,
|
|
343
|
+
step: 0.1,
|
|
344
|
+
description: "Controls randomness in the output"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
name: types_js_1.SharedOptions.top_p,
|
|
348
|
+
type: types_js_1.OptionType.numeric,
|
|
349
|
+
min: 0,
|
|
350
|
+
max: 1,
|
|
351
|
+
step: 0.1,
|
|
352
|
+
description: "Nucleus sampling parameter"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
name: types_js_1.SharedOptions.stop_sequence,
|
|
356
|
+
type: types_js_1.OptionType.string_list,
|
|
357
|
+
value: [],
|
|
358
|
+
description: "Sequences where the model will stop generating"
|
|
359
|
+
}
|
|
360
|
+
];
|
|
361
|
+
// Add model-specific options
|
|
362
|
+
const additionalOptions = [];
|
|
363
|
+
// Add top_k for certain models
|
|
364
|
+
if (modelLower.includes("claude") || modelLower.includes("mistral") || modelLower.includes("phi")) {
|
|
365
|
+
additionalOptions.push({
|
|
366
|
+
name: types_js_1.SharedOptions.top_k,
|
|
367
|
+
type: types_js_1.OptionType.numeric,
|
|
368
|
+
min: 1,
|
|
369
|
+
integer: true,
|
|
370
|
+
step: 1,
|
|
371
|
+
description: "Limits token sampling to the top k tokens"
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
// Add penalty options for certain models
|
|
375
|
+
if (modelLower.includes("claude") || modelLower.includes("jamba") || modelLower.includes("cohere")) {
|
|
376
|
+
additionalOptions.push({
|
|
377
|
+
name: types_js_1.SharedOptions.presence_penalty,
|
|
378
|
+
type: types_js_1.OptionType.numeric,
|
|
379
|
+
min: -2.0,
|
|
380
|
+
max: 2.0,
|
|
381
|
+
step: 0.1,
|
|
382
|
+
description: "Penalize new tokens based on their presence in the text"
|
|
383
|
+
}, {
|
|
384
|
+
name: types_js_1.SharedOptions.frequency_penalty,
|
|
385
|
+
type: types_js_1.OptionType.numeric,
|
|
386
|
+
min: -2.0,
|
|
387
|
+
max: 2.0,
|
|
388
|
+
step: 0.1,
|
|
389
|
+
description: "Penalize new tokens based on their frequency in the text"
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
// Add seed option for certain models
|
|
393
|
+
if (modelLower.includes("mistral") || modelLower.includes("phi") || modelLower.includes("gemini")) {
|
|
394
|
+
additionalOptions.push({
|
|
395
|
+
name: types_js_1.SharedOptions.seed,
|
|
396
|
+
type: types_js_1.OptionType.numeric,
|
|
397
|
+
integer: true,
|
|
398
|
+
description: "Random seed for reproducible generation"
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
return {
|
|
402
|
+
_option_id: "azure-foundry-text",
|
|
403
|
+
options: [
|
|
404
|
+
...baseOptions,
|
|
405
|
+
...additionalOptions,
|
|
406
|
+
...visionOptions
|
|
407
|
+
]
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
function isVisionModel(modelLower) {
|
|
411
|
+
return modelLower.includes("gpt-4o") ||
|
|
412
|
+
modelLower.includes("gpt-4-turbo") ||
|
|
413
|
+
modelLower.includes("claude-3") ||
|
|
414
|
+
modelLower.includes("llama-3.2") ||
|
|
415
|
+
modelLower.includes("llama-4") ||
|
|
416
|
+
modelLower.includes("gemini") ||
|
|
417
|
+
isO1Full(modelLower);
|
|
418
|
+
}
|
|
419
|
+
function isO1Full(modelLower) {
|
|
420
|
+
if (modelLower.includes("o1")) {
|
|
421
|
+
return !modelLower.includes("mini") && !modelLower.includes("preview");
|
|
422
|
+
}
|
|
423
|
+
return false;
|
|
424
|
+
}
|
|
425
|
+
//# sourceMappingURL=azure_foundry.js.map
|