@opengeni/config 0.10.3 → 0.10.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/config",
3
- "version": "0.10.3",
3
+ "version": "0.10.6",
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.32.0",
37
+ "@opengeni/contracts": "^0.35.0",
38
38
  "zod": "^4.2.1"
39
39
  },
40
40
  "engines": {
package/src/index.ts CHANGED
@@ -108,7 +108,7 @@ export const DEFAULT_AGENT_INSTRUCTIONS = [
108
108
  "Follow the user's task and any enabled pack or skill instructions for the current role.",
109
109
  "Work inside the sandbox workspace and use filesystem and shell tools when useful.",
110
110
  "Repository resources are mounted under repos/<host>/<owner>/<repo> unless the session specifies another collision-free mount path.",
111
- "File resources are mounted under files/<file-id>/ unless the session specifies another mount path.",
111
+ "File resources are mounted under .opengeni/files/<file-id>/ unless the session specifies another mount path.",
112
112
  "Attached files are mounted read-only; copy them before modifying.",
113
113
  "Bundled skills are under .agents/ and can include infrastructure, marketing, or other role-specific guidance.",
114
114
  "Use Checkov, Terraform, Azure CLI, git provider CLIs, and repository tools when relevant; gh, glab, and az repos are pre-authenticated when the host brokers matching git credentials.",
@@ -1176,6 +1176,8 @@ export const ModelCapabilitiesV1Schema = z
1176
1176
  codeExecution: CapabilityStateV1Schema,
1177
1177
  }),
1178
1178
  inputModalities: z.array(ModelModalityV1).min(1),
1179
+ /** Exact MIME types accepted as typed `input_file`; `text/*` is allowed. */
1180
+ inputFileMediaTypes: z.array(z.string()).default([]),
1179
1181
  outputModalities: z.array(ModelModalityV1).min(1),
1180
1182
  transports: z.object({
1181
1183
  sse: CapabilityStateV1Schema,
@@ -2271,6 +2273,7 @@ function normalizeCapabilities(capabilities: ModelCapabilitiesV1): ModelCapabili
2271
2273
  inputModalities: [...parsed.inputModalities].sort(
2272
2274
  (left, right) => (MODALITY_ORDER.get(left) ?? 0) - (MODALITY_ORDER.get(right) ?? 0),
2273
2275
  ),
2276
+ inputFileMediaTypes: [...new Set(parsed.inputFileMediaTypes)].sort(),
2274
2277
  outputModalities: [...parsed.outputModalities].sort(
2275
2278
  (left, right) => (MODALITY_ORDER.get(left) ?? 0) - (MODALITY_ORDER.get(right) ?? 0),
2276
2279
  ),
@@ -2283,7 +2286,7 @@ function normalizeCapabilities(capabilities: ModelCapabilitiesV1): ModelCapabili
2283
2286
 
2284
2287
  function legacyModelCapabilities(
2285
2288
  settings: Settings,
2286
- input: { reasoningEffort: boolean; hostedWebSearch: boolean },
2289
+ input: { reasoningEffort: boolean; hostedWebSearch: boolean; vision?: boolean },
2287
2290
  ): ModelCapabilitiesV1 {
2288
2291
  const reasoningEfforts = input.reasoningEffort ? configuredAllowedReasoningEfforts(settings) : [];
2289
2292
  return normalizeCapabilities({
@@ -2304,7 +2307,14 @@ function legacyModelCapabilities(
2304
2307
  xSearch: { upstream: "unknown", runnable: false },
2305
2308
  codeExecution: { upstream: "unknown", runnable: false },
2306
2309
  },
2307
- inputModalities: ["text"],
2310
+ inputModalities: input.vision ? ["text", "image"] : ["text"],
2311
+ inputFileMediaTypes: [
2312
+ "application/json",
2313
+ "application/pdf",
2314
+ "application/x-yaml",
2315
+ "application/yaml",
2316
+ "text/*",
2317
+ ],
2308
2318
  outputModalities: ["text"],
2309
2319
  transports: {
2310
2320
  sse: { upstream: "unknown", runnable: true },
@@ -2334,7 +2344,7 @@ export function gatewayRequestPolicyForUpstreamModel(
2334
2344
 
2335
2345
  function gatewayModelCapabilities(
2336
2346
  settings: Settings,
2337
- input: { implicitCaching: boolean; vision: boolean },
2347
+ input: { implicitCaching: boolean; vision: boolean; inputFileMediaTypes?: string[] },
2338
2348
  ): ModelCapabilitiesV1 {
2339
2349
  const legacy = legacyModelCapabilities(settings, {
2340
2350
  reasoningEffort: true,
@@ -2344,6 +2354,7 @@ function gatewayModelCapabilities(
2344
2354
  ...legacy,
2345
2355
  functionCalling: { upstream: "supported", runnable: true },
2346
2356
  inputModalities: input.vision ? ["text", "image"] : ["text"],
2357
+ inputFileMediaTypes: input.inputFileMediaTypes ?? [],
2347
2358
  transports: {
2348
2359
  ...legacy.transports,
2349
2360
  sse: { upstream: "supported", runnable: true },
@@ -2373,6 +2384,7 @@ function gatewayRegistryProvider(
2373
2384
  capabilities: gatewayModelCapabilities(settings, {
2374
2385
  implicitCaching: model.implicitCaching,
2375
2386
  vision: kimi,
2387
+ inputFileMediaTypes: kimi ? ["application/pdf"] : [],
2376
2388
  }),
2377
2389
  contextWindowTokens: 1_000_000,
2378
2390
  effectiveContextWindowTokens: 900_000,
@@ -2755,6 +2767,7 @@ export function withCodexCatalogProvider(settings: Settings): Settings {
2755
2767
  ...legacyModelCapabilities(settings, {
2756
2768
  reasoningEffort: true,
2757
2769
  hostedWebSearch: true,
2770
+ vision: slug.startsWith("gpt-5.6-"),
2758
2771
  }),
2759
2772
  ...(builtinPromptCachingForModel(`${CODEX_MODEL_ID_PREFIX}${slug}`)
2760
2773
  ? {
@@ -2941,6 +2954,7 @@ export function configuredModels(settings: Settings): ConfiguredModel[] {
2941
2954
  ...legacyModelCapabilities(settings, {
2942
2955
  reasoningEffort: true,
2943
2956
  hostedWebSearch: settings.webSearchEnabled,
2957
+ vision: id.startsWith("gpt-5.6-"),
2944
2958
  }),
2945
2959
  ...(builtinPromptCachingForModel(id)
2946
2960
  ? { promptCaching: builtinPromptCachingForModel(id)! }