@axlsdk/axl 0.25.2 → 0.25.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
@@ -7378,8 +7378,8 @@ type DirectOpenAIPricingContext = {
7378
7378
  };
7379
7379
  };
7380
7380
  /**
7381
- * Estimate OpenAI call cost from token usage. Exact match first, then
7382
- * longest-prefix match for versioned models (e.g. `gpt-4o-2024-05-13`).
7381
+ * Estimate OpenAI call cost from token usage using exact catalog IDs only.
7382
+ * Explicitly listed snapshots (e.g. `gpt-4o-2024-05-13`) have their own rows.
7383
7383
  *
7384
7384
  * Returns `undefined` when the model is not in the table — callers must treat
7385
7385
  * that as "unknown cost", never as free (a silent `0` would break
@@ -7409,8 +7409,8 @@ declare class OpenAIProvider extends OpenAICompatibleProvider {
7409
7409
  dangerouslyAllowInsecureHttp?: boolean;
7410
7410
  rateLimit?: RateLimitConfig;
7411
7411
  });
7412
- /** Report a clamped `effort` — Chat Completions caps `'max'` at `'xhigh'` and
7413
- * rejects `'none'` before gpt-5.1 (clamped to `'minimal'`). */
7412
+ /** Report a clamped `effort` — Chat caps `'max'` at `'xhigh'` on GPT-5.6 and
7413
+ * GPT-6.1 Sol, and maps `'none'` to the model's supported floor. */
7414
7414
  effortResolution(options: Pick<ChatOptions, 'model' | 'effort' | 'thinkingBudget' | 'includeThoughts' | 'providerOptions'>): EffortResolution | undefined;
7415
7415
  protected validateFinalRequestBody(body: Record<string, unknown>): void;
7416
7416
  protected computeCost(model: string, usage: ProviderResponse['usage'], _reportedCost: number | undefined, context?: DirectOpenAIPricingContext): number | undefined;
package/dist/index.d.ts CHANGED
@@ -7378,8 +7378,8 @@ type DirectOpenAIPricingContext = {
7378
7378
  };
7379
7379
  };
7380
7380
  /**
7381
- * Estimate OpenAI call cost from token usage. Exact match first, then
7382
- * longest-prefix match for versioned models (e.g. `gpt-4o-2024-05-13`).
7381
+ * Estimate OpenAI call cost from token usage using exact catalog IDs only.
7382
+ * Explicitly listed snapshots (e.g. `gpt-4o-2024-05-13`) have their own rows.
7383
7383
  *
7384
7384
  * Returns `undefined` when the model is not in the table — callers must treat
7385
7385
  * that as "unknown cost", never as free (a silent `0` would break
@@ -7409,8 +7409,8 @@ declare class OpenAIProvider extends OpenAICompatibleProvider {
7409
7409
  dangerouslyAllowInsecureHttp?: boolean;
7410
7410
  rateLimit?: RateLimitConfig;
7411
7411
  });
7412
- /** Report a clamped `effort` — Chat Completions caps `'max'` at `'xhigh'` and
7413
- * rejects `'none'` before gpt-5.1 (clamped to `'minimal'`). */
7412
+ /** Report a clamped `effort` — Chat caps `'max'` at `'xhigh'` on GPT-5.6 and
7413
+ * GPT-6.1 Sol, and maps `'none'` to the model's supported floor. */
7414
7414
  effortResolution(options: Pick<ChatOptions, 'model' | 'effort' | 'thinkingBudget' | 'includeThoughts' | 'providerOptions'>): EffortResolution | undefined;
7415
7415
  protected validateFinalRequestBody(body: Record<string, unknown>): void;
7416
7416
  protected computeCost(model: string, usage: ProviderResponse['usage'], _reportedCost: number | undefined, context?: DirectOpenAIPricingContext): number | undefined;
package/dist/index.js CHANGED
@@ -348,7 +348,7 @@ var sharedGuard = typeof installedGuard === "object" && installedGuard !== null
348
348
  var buildPath = typeof __AXL_BUILD_PATH__ === "string" ? __AXL_BUILD_PATH__ : "<source>";
349
349
  var thisCopy = {
350
350
  path: buildPath.startsWith("file:") ? fileURLToPath(buildPath) : buildPath,
351
- version: true ? "0.25.2" : "unknown"
351
+ version: true ? "0.25.3" : "unknown"
352
352
  };
353
353
  function warnCrossCopy(other, joined) {
354
354
  if (other === thisCopy) return;
@@ -3617,7 +3617,7 @@ var OPENAI_PRICING = {
3617
3617
  "gpt-4.1-mini": [4e-7, 16e-7, 0.25],
3618
3618
  "gpt-4.1-nano": [1e-7, 4e-7, 0.25],
3619
3619
  o3: [2e-6, 8e-6, 0.25],
3620
- "o3-mini": [11e-7, 44e-7, 0.25],
3620
+ "o3-mini": [11e-7, 44e-7, 0.5],
3621
3621
  "o4-mini": [11e-7, 44e-7, 0.25],
3622
3622
  "gpt-5": [125e-8, 1e-5, 0.1],
3623
3623
  "gpt-5-mini": [25e-8, 2e-6, 0.1],
@@ -3640,6 +3640,13 @@ var DIRECT_OPENAI_CATALOG = [
3640
3640
  long: { input: 20 / M, cachedInput: 2 / M, cacheWrite: 25 / M, output: 75 / M },
3641
3641
  contextBoundary: LONG_CONTEXT_BOUNDARY
3642
3642
  },
3643
+ {
3644
+ aliases: ["gpt-6.1-sol"],
3645
+ // Rechecked 2026-10-15 against https://developers.openai.com/api/docs/pricing.
3646
+ short: { input: 2 / M, cachedInput: 0.1 / M, cacheWrite: 2.5 / M, output: 10 / M },
3647
+ long: { input: 4 / M, cachedInput: 0.2 / M, cacheWrite: 5 / M, output: 15 / M },
3648
+ contextBoundary: LONG_CONTEXT_BOUNDARY
3649
+ },
3643
3650
  {
3644
3651
  aliases: ["gpt-6-sol"],
3645
3652
  short: { input: 2 / M, cachedInput: 0.2 / M, cacheWrite: 2.5 / M, output: 10 / M },
@@ -4019,12 +4026,12 @@ var BASE_EFFORTS = ["minimal", "low", "medium", "high"];
4019
4026
  function bothEndpoints(value) {
4020
4027
  return { chat: value, responses: value };
4021
4028
  }
4022
- function gpt6(id, efforts, chatTools) {
4029
+ function gpt6(id, responsesEfforts, chatTools, chatEfforts = responsesEfforts) {
4023
4030
  return {
4024
4031
  id,
4025
4032
  family: "gpt-6",
4026
4033
  reasoning: true,
4027
- efforts: bothEndpoints(efforts),
4034
+ efforts: { chat: chatEfforts, responses: responsesEfforts },
4028
4035
  defaultEffort: "medium",
4029
4036
  // Same policy as GPT-5.x: a portable `temperature` is dropped while
4030
4037
  // reasoning is active (including the active default). A raw
@@ -4052,6 +4059,13 @@ function gpt56(id) {
4052
4059
  var OPENAI_EXACT_MODELS = new Map(
4053
4060
  [
4054
4061
  gpt6("gpt-6-astra", ["low", "medium", "high", "xhigh", "max"], "never"),
4062
+ // Live Chat Completions rejects max; Responses accepts it (2026-10-15).
4063
+ gpt6("gpt-6.1-sol", ["low", "medium", "high", "xhigh", "max"], "never", [
4064
+ "low",
4065
+ "medium",
4066
+ "high",
4067
+ "xhigh"
4068
+ ]),
4055
4069
  gpt6("gpt-6-sol", ["none", "low", "medium", "high", "xhigh", "max"], "effort-none-only"),
4056
4070
  gpt6("gpt-6-luna", ["none", "low", "medium", "high", "xhigh", "max"], "effort-none-only"),
4057
4071
  gpt56("gpt-5.6"),
@@ -4195,15 +4209,15 @@ function validateOpenAIFinalRequestBody(body, endpoint) {
4195
4209
  }
4196
4210
  }
4197
4211
  if (activeReasoning) {
4212
+ const remediation = (key) => descriptor.efforts[endpoint].includes("none") ? `Remove ${key} or set reasoning effort to 'none'.` : `Remove ${key}; ${model} does not support reasoning effort 'none'.`;
4198
4213
  const forbidden = endpoint === "chat" ? ["temperature", "top_p", "top_logprobs", "logprobs"] : ["temperature", "top_p", "top_logprobs"];
4199
4214
  for (const key of forbidden) {
4200
- if (body[key] !== void 0)
4201
- fail(key, `Remove ${key} or set reasoning effort to 'none' on Sol or Luna.`);
4215
+ if (body[key] !== void 0) fail(key, remediation(key));
4202
4216
  }
4203
4217
  if (endpoint === "responses" && Array.isArray(body.include) && body.include.includes("message.output_text.logprobs")) {
4204
4218
  fail(
4205
4219
  "message.output_text.logprobs",
4206
- "Remove it from include or set reasoning effort to none on Sol or Luna."
4220
+ remediation("message.output_text.logprobs from include")
4207
4221
  );
4208
4222
  }
4209
4223
  }
@@ -4256,8 +4270,8 @@ var OpenAIProvider = class extends OpenAICompatibleProvider {
4256
4270
  constructor(options = {}) {
4257
4271
  super({ profile: OPENAI_PROFILE, ...options });
4258
4272
  }
4259
- /** Report a clamped `effort` — Chat Completions caps `'max'` at `'xhigh'` and
4260
- * rejects `'none'` before gpt-5.1 (clamped to `'minimal'`). */
4273
+ /** Report a clamped `effort` — Chat caps `'max'` at `'xhigh'` on GPT-5.6 and
4274
+ * GPT-6.1 Sol, and maps `'none'` to the model's supported floor. */
4261
4275
  effortResolution(options) {
4262
4276
  return resolveOpenAIEffortResolution(
4263
4277
  options,