@opengeni/config 0.10.9 → 0.10.12

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 CHANGED
@@ -730,6 +730,7 @@ declare const RegistryProviderSchema: z.ZodObject<{
730
730
  upstreamModelId: z.ZodOptional<z.ZodString>;
731
731
  aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
732
732
  label: z.ZodOptional<z.ZodString>;
733
+ shortLabel: z.ZodOptional<z.ZodString>;
733
734
  contextWindowTokens: z.ZodOptional<z.ZodNumber>;
734
735
  effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
735
736
  autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
@@ -936,6 +937,8 @@ export interface ConfiguredModel {
936
937
  id: string;
937
938
  aliases: string[];
938
939
  label: string;
940
+ /** Optional curated compact label for dense UI (e.g. mobile composer). */
941
+ shortLabel?: string | undefined;
939
942
  providerId: string;
940
943
  providerLabel: string;
941
944
  api: ModelProviderApi;
@@ -1005,6 +1008,7 @@ export declare const OPENGENI_GATEWAY_MODELS: {
1005
1008
  readonly workspaceProductId: "workspace-gateway/deepseek-v4-flash-0731";
1006
1009
  readonly upstreamModelId: "deepseek/deepseek-v4-flash-0731";
1007
1010
  readonly label: "DeepSeek V4 Flash 0731";
1011
+ readonly shortLabel: "V4 Flash";
1008
1012
  readonly providers: readonly ["baseten", "novita", "deepinfra"];
1009
1013
  readonly implicitCaching: true;
1010
1014
  };
@@ -1013,6 +1017,7 @@ export declare const OPENGENI_GATEWAY_MODELS: {
1013
1017
  readonly workspaceProductId: "workspace-gateway/kimi-k3";
1014
1018
  readonly upstreamModelId: "moonshotai/kimi-k3";
1015
1019
  readonly label: "Kimi K3";
1020
+ readonly shortLabel: "Kimi K3";
1016
1021
  readonly providers: readonly ["baseten", "fireworks"];
1017
1022
  readonly implicitCaching: true;
1018
1023
  };
@@ -1089,6 +1094,11 @@ export declare function withWorkspaceGatewayCredential(settings: Settings, apiKe
1089
1094
  * `codex/gpt-5.6-luna` → `GPT-5.6 Luna`). Non-gpt ids pass through unchanged.
1090
1095
  */
1091
1096
  export declare function productLabelForModelId(modelId: string): string;
1097
+ /**
1098
+ * Curated compact product labels for dense UI. Only known GPT family slugs;
1099
+ * everything else returns null so callers fall back to the full `label`.
1100
+ */
1101
+ export declare function productShortLabelForModelId(modelId: string): string | null;
1092
1102
  /**
1093
1103
  * Map OpenGeni latency mode to the provider `service_tier` wire value.
1094
1104
  * Azure and Codex ChatGPT accept `priority`; OpenAI API accepts `fast` (alias of priority).
package/dist/index.js CHANGED
@@ -1049,6 +1049,8 @@ var RegistryModelSchema = z.object({
1049
1049
  // accepted input only; never sent upstream
1050
1050
  label: z.string().min(1).optional(),
1051
1051
  // display name; defaults to id
1052
+ shortLabel: z.string().min(1).max(64).optional(),
1053
+ // compact UI label; optional
1052
1054
  contextWindowTokens: z.number().int().positive().optional(),
1053
1055
  effectiveContextWindowTokens: z.number().int().positive().optional(),
1054
1056
  autoCompactTokenLimit: z.number().int().positive().optional(),
@@ -1157,6 +1159,7 @@ var OPENGENI_GATEWAY_MODELS = {
1157
1159
  workspaceProductId: `${WORKSPACE_GATEWAY_MODEL_ID_PREFIX}deepseek-v4-flash-0731`,
1158
1160
  upstreamModelId: "deepseek/deepseek-v4-flash-0731",
1159
1161
  label: "DeepSeek V4 Flash 0731",
1162
+ shortLabel: "V4 Flash",
1160
1163
  providers: ["baseten", "novita", "deepinfra"],
1161
1164
  implicitCaching: true
1162
1165
  },
@@ -1165,6 +1168,7 @@ var OPENGENI_GATEWAY_MODELS = {
1165
1168
  workspaceProductId: `${WORKSPACE_GATEWAY_MODEL_ID_PREFIX}kimi-k3`,
1166
1169
  upstreamModelId: "moonshotai/kimi-k3",
1167
1170
  label: "Kimi K3",
1171
+ shortLabel: "Kimi K3",
1168
1172
  providers: ["baseten", "fireworks"],
1169
1173
  implicitCaching: true
1170
1174
  }
@@ -1890,6 +1894,7 @@ function gatewayRegistryProvider(settings, input) {
1890
1894
  id: workspace ? model.workspaceProductId : model.productId,
1891
1895
  upstreamModelId: model.upstreamModelId,
1892
1896
  label: model.label,
1897
+ shortLabel: model.shortLabel,
1893
1898
  capabilities: gatewayModelCapabilities(settings, {
1894
1899
  implicitCaching: model.implicitCaching,
1895
1900
  vision: kimi,
@@ -1970,6 +1975,19 @@ function productLabelForModelId(modelId) {
1970
1975
  const suffix = rest.split("-").filter((part) => part.length > 0).map((part) => part.charAt(0).toUpperCase() + part.slice(1).toLowerCase()).join(" ");
1971
1976
  return suffix.length > 0 ? `${family} ${suffix}` : family;
1972
1977
  }
1978
+ function productShortLabelForModelId(modelId) {
1979
+ const slug = modelId.startsWith(CODEX_MODEL_ID_PREFIX) ? modelId.slice(CODEX_MODEL_ID_PREFIX.length) : modelId;
1980
+ switch (slug) {
1981
+ case "gpt-5.6-sol":
1982
+ return "5.6 Sol";
1983
+ case "gpt-5.6-terra":
1984
+ return "5.6 Terra";
1985
+ case "gpt-5.6-luna":
1986
+ return "5.6 Luna";
1987
+ default:
1988
+ return null;
1989
+ }
1990
+ }
1973
1991
  function builtinLatencyModesForModel(modelId) {
1974
1992
  if (modelId === "gpt-5.6-sol" || modelId === "gpt-5.6-terra" || modelId === "gpt-5.6-luna" || modelId.startsWith("codex/gpt-5.6-")) {
1975
1993
  return [
@@ -2170,6 +2188,7 @@ function withCodexCatalogProvider(settings) {
2170
2188
  id: `${CODEX_MODEL_ID_PREFIX}${slug}`,
2171
2189
  upstreamModelId: slug,
2172
2190
  label: productLabelForModelId(slug),
2191
+ ...productShortLabelForModelId(slug) ? { shortLabel: productShortLabelForModelId(slug) } : {},
2173
2192
  reasoningEffort: true,
2174
2193
  // The ChatGPT/Codex Responses backend accepts the native web_search
2175
2194
  // hosted tool (unlike hosted apply_patch/computer transports). Declaring
@@ -2287,6 +2306,7 @@ function configuredModels(settings) {
2287
2306
  id,
2288
2307
  aliases: [],
2289
2308
  label: productLabelForModelId(id),
2309
+ ...productShortLabelForModelId(id) ? { shortLabel: productShortLabelForModelId(id) } : {},
2290
2310
  providerId: builtinId,
2291
2311
  providerLabel: builtinLabel,
2292
2312
  api: "responses",
@@ -2319,6 +2339,7 @@ function configuredModels(settings) {
2319
2339
  id: model.id,
2320
2340
  aliases: [...model.aliases ?? []],
2321
2341
  label: model.label ?? productLabelForModelId(model.id),
2342
+ ...model.shortLabel ? { shortLabel: model.shortLabel } : productShortLabelForModelId(model.id) ? { shortLabel: productShortLabelForModelId(model.id) } : {},
2322
2343
  providerId: provider.id,
2323
2344
  providerLabel,
2324
2345
  api: provider.api,
@@ -3569,6 +3590,7 @@ export {
3569
3590
  parseStaticUsageLimitsJson,
3570
3591
  policyProviderIdForModel,
3571
3592
  productLabelForModelId,
3593
+ productShortLabelForModelId,
3572
3594
  requiredSandboxEnvForBackend,
3573
3595
  resolveAiGatewayRealtimeModel,
3574
3596
  resolveEnrollmentSigningSecret,