@opengeni/config 0.10.9 → 0.10.11
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.d.ts +10 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +37 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/config",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.11",
|
|
4
4
|
"description": "OpenGeni runtime configuration: settings resolution, deployment knobs, and config validation shared across the server packages.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@opengeni/codex": "^0.2.10",
|
|
37
|
-
"@opengeni/contracts": "^0.
|
|
37
|
+
"@opengeni/contracts": "^0.38.1",
|
|
38
38
|
"zod": "^4.2.1"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
package/src/index.ts
CHANGED
|
@@ -1306,6 +1306,7 @@ const RegistryModelSchema = z
|
|
|
1306
1306
|
upstreamModelId: z.string().min(1).optional(), // exact provider slug; defaults to id
|
|
1307
1307
|
aliases: z.array(z.string().min(1)).optional(), // accepted input only; never sent upstream
|
|
1308
1308
|
label: z.string().min(1).optional(), // display name; defaults to id
|
|
1309
|
+
shortLabel: z.string().min(1).max(64).optional(), // compact UI label; optional
|
|
1309
1310
|
contextWindowTokens: z.number().int().positive().optional(),
|
|
1310
1311
|
effectiveContextWindowTokens: z.number().int().positive().optional(),
|
|
1311
1312
|
autoCompactTokenLimit: z.number().int().positive().optional(),
|
|
@@ -1406,6 +1407,8 @@ export interface ConfiguredModel {
|
|
|
1406
1407
|
id: string;
|
|
1407
1408
|
aliases: string[];
|
|
1408
1409
|
label: string;
|
|
1410
|
+
/** Optional curated compact label for dense UI (e.g. mobile composer). */
|
|
1411
|
+
shortLabel?: string | undefined;
|
|
1409
1412
|
providerId: string;
|
|
1410
1413
|
providerLabel: string;
|
|
1411
1414
|
api: ModelProviderApi;
|
|
@@ -1491,6 +1494,7 @@ export const OPENGENI_GATEWAY_MODELS = {
|
|
|
1491
1494
|
workspaceProductId: `${WORKSPACE_GATEWAY_MODEL_ID_PREFIX}deepseek-v4-flash-0731`,
|
|
1492
1495
|
upstreamModelId: "deepseek/deepseek-v4-flash-0731",
|
|
1493
1496
|
label: "DeepSeek V4 Flash 0731",
|
|
1497
|
+
shortLabel: "V4 Flash",
|
|
1494
1498
|
providers: ["baseten", "novita", "deepinfra"],
|
|
1495
1499
|
implicitCaching: true,
|
|
1496
1500
|
},
|
|
@@ -1499,6 +1503,7 @@ export const OPENGENI_GATEWAY_MODELS = {
|
|
|
1499
1503
|
workspaceProductId: `${WORKSPACE_GATEWAY_MODEL_ID_PREFIX}kimi-k3`,
|
|
1500
1504
|
upstreamModelId: "moonshotai/kimi-k3",
|
|
1501
1505
|
label: "Kimi K3",
|
|
1506
|
+
shortLabel: "Kimi K3",
|
|
1502
1507
|
providers: ["baseten", "fireworks"],
|
|
1503
1508
|
implicitCaching: true,
|
|
1504
1509
|
},
|
|
@@ -2381,6 +2386,7 @@ function gatewayRegistryProvider(
|
|
|
2381
2386
|
id: workspace ? model.workspaceProductId : model.productId,
|
|
2382
2387
|
upstreamModelId: model.upstreamModelId,
|
|
2383
2388
|
label: model.label,
|
|
2389
|
+
shortLabel: model.shortLabel,
|
|
2384
2390
|
capabilities: gatewayModelCapabilities(settings, {
|
|
2385
2391
|
implicitCaching: model.implicitCaching,
|
|
2386
2392
|
vision: kimi,
|
|
@@ -2481,6 +2487,26 @@ export function productLabelForModelId(modelId: string): string {
|
|
|
2481
2487
|
return suffix.length > 0 ? `${family} ${suffix}` : family;
|
|
2482
2488
|
}
|
|
2483
2489
|
|
|
2490
|
+
/**
|
|
2491
|
+
* Curated compact product labels for dense UI. Only known GPT family slugs;
|
|
2492
|
+
* everything else returns null so callers fall back to the full `label`.
|
|
2493
|
+
*/
|
|
2494
|
+
export function productShortLabelForModelId(modelId: string): string | null {
|
|
2495
|
+
const slug = modelId.startsWith(CODEX_MODEL_ID_PREFIX)
|
|
2496
|
+
? modelId.slice(CODEX_MODEL_ID_PREFIX.length)
|
|
2497
|
+
: modelId;
|
|
2498
|
+
switch (slug) {
|
|
2499
|
+
case "gpt-5.6-sol":
|
|
2500
|
+
return "5.6 Sol";
|
|
2501
|
+
case "gpt-5.6-terra":
|
|
2502
|
+
return "5.6 Terra";
|
|
2503
|
+
case "gpt-5.6-luna":
|
|
2504
|
+
return "5.6 Luna";
|
|
2505
|
+
default:
|
|
2506
|
+
return null;
|
|
2507
|
+
}
|
|
2508
|
+
}
|
|
2509
|
+
|
|
2484
2510
|
function builtinLatencyModesForModel(modelId: string): Array<{
|
|
2485
2511
|
id: z.infer<typeof ModelLatencyModeV1>;
|
|
2486
2512
|
upstream: "supported" | "unsupported" | "unknown";
|
|
@@ -2780,6 +2806,9 @@ export function withCodexCatalogProvider(settings: Settings): Settings {
|
|
|
2780
2806
|
id: `${CODEX_MODEL_ID_PREFIX}${slug}`,
|
|
2781
2807
|
upstreamModelId: slug,
|
|
2782
2808
|
label: productLabelForModelId(slug),
|
|
2809
|
+
...(productShortLabelForModelId(slug)
|
|
2810
|
+
? { shortLabel: productShortLabelForModelId(slug)! }
|
|
2811
|
+
: {}),
|
|
2783
2812
|
reasoningEffort: true,
|
|
2784
2813
|
// The ChatGPT/Codex Responses backend accepts the native web_search
|
|
2785
2814
|
// hosted tool (unlike hosted apply_patch/computer transports). Declaring
|
|
@@ -2965,6 +2994,9 @@ export function configuredModels(settings: Settings): ConfiguredModel[] {
|
|
|
2965
2994
|
id,
|
|
2966
2995
|
aliases: [],
|
|
2967
2996
|
label: productLabelForModelId(id),
|
|
2997
|
+
...(productShortLabelForModelId(id)
|
|
2998
|
+
? { shortLabel: productShortLabelForModelId(id)! }
|
|
2999
|
+
: {}),
|
|
2968
3000
|
providerId: builtinId,
|
|
2969
3001
|
providerLabel: builtinLabel,
|
|
2970
3002
|
api: "responses" as const,
|
|
@@ -2999,6 +3031,11 @@ export function configuredModels(settings: Settings): ConfiguredModel[] {
|
|
|
2999
3031
|
id: model.id,
|
|
3000
3032
|
aliases: [...(model.aliases ?? [])],
|
|
3001
3033
|
label: model.label ?? productLabelForModelId(model.id),
|
|
3034
|
+
...(model.shortLabel
|
|
3035
|
+
? { shortLabel: model.shortLabel }
|
|
3036
|
+
: productShortLabelForModelId(model.id)
|
|
3037
|
+
? { shortLabel: productShortLabelForModelId(model.id)! }
|
|
3038
|
+
: {}),
|
|
3002
3039
|
providerId: provider.id,
|
|
3003
3040
|
providerLabel,
|
|
3004
3041
|
api: provider.api,
|