@probeo/anymodel 0.5.1 → 0.5.3

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.cts CHANGED
@@ -190,10 +190,13 @@ interface BatchRequestItem {
190
190
  response_format?: ResponseFormat;
191
191
  tools?: Tool[];
192
192
  tool_choice?: ToolChoice;
193
+ service_tier?: 'auto' | 'flex';
193
194
  }
194
195
  interface BatchCreateRequest {
195
196
  model: string;
196
197
  requests: BatchRequestItem[];
198
+ /** Force batch mode: 'native' uses provider batch API, 'concurrent' sends individual requests. Auto-detected if omitted. */
199
+ batch_mode?: 'native' | 'concurrent';
197
200
  options?: {
198
201
  temperature?: number;
199
202
  max_tokens?: number;
@@ -203,6 +206,7 @@ interface BatchCreateRequest {
203
206
  response_format?: ResponseFormat;
204
207
  tools?: Tool[];
205
208
  tool_choice?: ToolChoice;
209
+ service_tier?: 'auto' | 'flex';
206
210
  };
207
211
  webhook?: string;
208
212
  }
package/dist/index.d.ts CHANGED
@@ -190,10 +190,13 @@ interface BatchRequestItem {
190
190
  response_format?: ResponseFormat;
191
191
  tools?: Tool[];
192
192
  tool_choice?: ToolChoice;
193
+ service_tier?: 'auto' | 'flex';
193
194
  }
194
195
  interface BatchCreateRequest {
195
196
  model: string;
196
197
  requests: BatchRequestItem[];
198
+ /** Force batch mode: 'native' uses provider batch API, 'concurrent' sends individual requests. Auto-detected if omitted. */
199
+ batch_mode?: 'native' | 'concurrent';
197
200
  options?: {
198
201
  temperature?: number;
199
202
  max_tokens?: number;
@@ -203,6 +206,7 @@ interface BatchCreateRequest {
203
206
  response_format?: ResponseFormat;
204
207
  tools?: Tool[];
205
208
  tool_choice?: ToolChoice;
209
+ service_tier?: 'auto' | 'flex';
206
210
  };
207
211
  webhook?: string;
208
212
  }
package/dist/index.js CHANGED
@@ -2006,7 +2006,7 @@ var BatchManager = class {
2006
2006
  const id = generateId("batch");
2007
2007
  const now = (/* @__PURE__ */ new Date()).toISOString();
2008
2008
  const providerName = request.model.split("/")[0] || "unknown";
2009
- const native = this.getNativeBatchAdapter(request.model);
2009
+ const native = request.batch_mode !== "concurrent" ? this.getNativeBatchAdapter(request.model) : null;
2010
2010
  const batchMode = native ? "native" : "concurrent";
2011
2011
  const batch = {
2012
2012
  id,
@@ -2229,7 +2229,8 @@ var BatchManager = class {
2229
2229
  stop: item.stop ?? options?.stop,
2230
2230
  response_format: item.response_format ?? options?.response_format,
2231
2231
  tools: item.tools ?? options?.tools,
2232
- tool_choice: item.tool_choice ?? options?.tool_choice
2232
+ tool_choice: item.tool_choice ?? options?.tool_choice,
2233
+ service_tier: item.service_tier ?? options?.service_tier
2233
2234
  };
2234
2235
  let result;
2235
2236
  try {