@myagentroam/agent 0.9.134 → 0.9.135

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/cli/main.js CHANGED
@@ -187,6 +187,15 @@ async function modelsCommand(home, arguments_, codexAuthFile) {
187
187
  codeMode: booleanFlag(arguments_, '--code-mode', '--no-code-mode', existing?.codeMode ?? false),
188
188
  highDensityCompaction: booleanFlag(arguments_, '--high-density-compaction', '--no-high-density-compaction', existing?.highDensityCompaction ?? false),
189
189
  ...(credential === 'codex-auth-file' && fastMode ? { fastMode: true } : {}),
190
+ ...(protocol === 'OPENAI_RESPONSES' && existing?.serviceTier !== undefined
191
+ ? {
192
+ serviceTier: hasFastModeOption
193
+ ? fastMode
194
+ ? 'priority'
195
+ : 'default'
196
+ : existing.serviceTier
197
+ }
198
+ : {}),
190
199
  hostedWebSearch: booleanFlag(arguments_, '--web-search', '--no-web-search', existing?.hostedWebSearch ?? false),
191
200
  ...(responsesTransport === undefined ? {} : { responsesTransport }),
192
201
  ...(responsesEncoding === undefined ? {} : { responsesEncoding }),
@@ -29,6 +29,7 @@ export declare function serializeModel(model: CliModelConfiguration): {
29
29
  codeMode: boolean;
30
30
  highDensityCompaction: boolean;
31
31
  fastMode?: boolean | undefined;
32
+ serviceTier?: "default" | "auto" | "flex" | "priority" | "fast" | "ultrafast" | undefined;
32
33
  hostedWebSearch: boolean;
33
34
  responsesEncoding?: "STANDARD" | "LITE" | undefined;
34
35
  responsesToolNamespace?: string | undefined;
@@ -55,6 +56,7 @@ export declare function serializeModel(model: CliModelConfiguration): {
55
56
  codeMode: boolean;
56
57
  highDensityCompaction: boolean;
57
58
  fastMode?: boolean | undefined;
59
+ serviceTier?: "default" | "auto" | "flex" | "priority" | "fast" | "ultrafast" | undefined;
58
60
  hostedWebSearch: boolean;
59
61
  responsesEncoding?: "STANDARD" | "LITE" | undefined;
60
62
  responsesToolNamespace?: string | undefined;
@@ -71,6 +71,14 @@ declare const rawModelSchema: z.ZodObject<{
71
71
  codeMode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
72
72
  highDensityCompaction: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
73
73
  fastMode: z.ZodOptional<z.ZodBoolean>;
74
+ serviceTier: z.ZodOptional<z.ZodEnum<{
75
+ default: "default";
76
+ auto: "auto";
77
+ flex: "flex";
78
+ priority: "priority";
79
+ fast: "fast";
80
+ ultrafast: "ultrafast";
81
+ }>>;
74
82
  hostedWebSearch: z.ZodBoolean;
75
83
  responsesTransport: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
76
84
  transport: z.ZodLiteral<"HTTP">;
@@ -51,6 +51,7 @@ const rawModelSchema = z
51
51
  codeMode: z.boolean().optional().default(false),
52
52
  highDensityCompaction: z.boolean().optional().default(false),
53
53
  fastMode: z.boolean().optional(),
54
+ serviceTier: z.enum(['auto', 'default', 'flex', 'priority', 'fast', 'ultrafast']).optional(),
54
55
  hostedWebSearch: z.boolean(),
55
56
  responsesTransport: rawResponsesTransportSchema.optional(),
56
57
  responsesEncoding: z.enum(['STANDARD', 'LITE']).optional(),
@@ -103,6 +104,8 @@ const rawModelSchema = z
103
104
  });
104
105
  if (value.protocol !== 'OPENAI_RESPONSES' && value.fastMode === true)
105
106
  context.addIssue({ code: 'custom', message: 'Fast mode requires Responses.' });
107
+ if (value.protocol !== 'OPENAI_RESPONSES' && value.serviceTier !== undefined)
108
+ context.addIssue({ code: 'custom', message: 'Service tier requires Responses.' });
106
109
  });
107
110
  export function resolveModelDefaultReasoningEffort(model) {
108
111
  const configured = marAgentReasoningEffortSchema.safeParse(model.defaultReasoningEffort);
@@ -887,7 +887,11 @@ function responsesRequestBody(configuration, request, messages, prefixIdentity =
887
887
  }
888
888
  return {
889
889
  model: configuration.modelId,
890
- ...(configuration.fastMode === true ? { service_tier: 'priority' } : {}),
890
+ ...(configuration.serviceTier !== undefined
891
+ ? { service_tier: configuration.serviceTier }
892
+ : configuration.fastMode === true
893
+ ? { service_tier: 'priority' }
894
+ : {}),
891
895
  ...(lite
892
896
  ? {
893
897
  tool_choice: toolChoice,
package/dist/sdk/agent.js CHANGED
@@ -1551,6 +1551,10 @@ function resolveAgentModels(configurations, requestedDefaultModelId) {
1551
1551
  throw new MarAgentError('MAR_AGENT_MODEL_CONFIG_INVALID', 'Responses encoding is invalid.');
1552
1552
  if (model.fastMode === true && model.protocol !== 'OPENAI_RESPONSES')
1553
1553
  throw new MarAgentError('MAR_AGENT_MODEL_CONFIG_INVALID', 'Fast mode requires Responses.');
1554
+ if (model.serviceTier !== undefined &&
1555
+ (model.protocol !== 'OPENAI_RESPONSES' ||
1556
+ !['auto', 'default', 'flex', 'priority', 'fast', 'ultrafast'].includes(model.serviceTier)))
1557
+ throw new MarAgentError('MAR_AGENT_MODEL_CONFIG_INVALID', 'Responses service tier is invalid.');
1554
1558
  if (model.credentialProvider !== undefined)
1555
1559
  credentialProviders.add(model.credentialProvider);
1556
1560
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/agent",
3
- "version": "0.9.134",
3
+ "version": "0.9.135",
4
4
  "description": "Embeddable MAR coding agent SDK and CLI.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",