@ax-llm/ax 14.0.32 → 14.0.33

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/index.d.cts CHANGED
@@ -1808,6 +1808,7 @@ type Writeable<T> = {
1808
1808
  interface AxPromptTemplateOptions {
1809
1809
  functions?: Readonly<AxInputFunctionType>;
1810
1810
  thoughtFieldName?: string;
1811
+ cacheSystemPrompt?: boolean;
1811
1812
  }
1812
1813
  type AxChatRequestChatPrompt = Writeable<AxChatRequest['chatPrompt'][0]>;
1813
1814
  type ChatRequestUserMessage = Exclude<Extract<AxChatRequestChatPrompt, {
@@ -1820,6 +1821,7 @@ declare class AxPromptTemplate {
1820
1821
  private task;
1821
1822
  private readonly thoughtFieldName;
1822
1823
  private readonly functions?;
1824
+ private readonly cacheSystemPrompt?;
1823
1825
  constructor(sig: Readonly<AxSignature>, options?: Readonly<AxPromptTemplateOptions>, fieldTemplates?: Record<string, AxFieldTemplateFn>);
1824
1826
  private renderSingleValueUserContent;
1825
1827
  render: <T = any>(values: T | ReadonlyArray<AxMessage<T>>, // Allow T or array of AxMessages
@@ -2134,6 +2136,7 @@ type AxProgramForwardOptions<MODEL> = AxAIServiceOptions & {
2134
2136
  fastFail?: boolean;
2135
2137
  showThoughts?: boolean;
2136
2138
  functionCallMode?: 'auto' | 'native' | 'prompt';
2139
+ cacheSystemPrompt?: boolean;
2137
2140
  disableMemoryCleanup?: boolean;
2138
2141
  traceLabel?: string;
2139
2142
  description?: string;
@@ -2526,6 +2529,8 @@ type AxAIAnthropicChatResponse = {
2526
2529
  usage: {
2527
2530
  input_tokens: number;
2528
2531
  output_tokens: number;
2532
+ cache_creation_input_tokens?: number;
2533
+ cache_read_input_tokens?: number;
2529
2534
  };
2530
2535
  };
2531
2536
  type AxAIAnthropicChatError = {
@@ -2649,6 +2654,7 @@ declare enum AxAIOpenAIModel {
2649
2654
  GPT4 = "gpt-4",
2650
2655
  GPT41 = "gpt-4.1",
2651
2656
  GPT41Mini = "gpt-4.1-mini",
2657
+ GPT41Nano = "gpt-4.1-nano",
2652
2658
  GPT4O = "gpt-4o",
2653
2659
  GPT4OMini = "gpt-4o-mini",
2654
2660
  GPT4ChatGPT4O = "chatgpt-4o-latest",
@@ -4088,6 +4094,7 @@ declare enum AxAIOpenAIResponsesModel {
4088
4094
  GPT4 = "gpt-4",
4089
4095
  GPT41 = "gpt-4.1",
4090
4096
  GPT41Mini = "gpt-4.1-mini",
4097
+ GPT41Nano = "gpt-4.1-nano",
4091
4098
  GPT4O = "gpt-4o",
4092
4099
  GPT4OMini = "gpt-4o-mini",
4093
4100
  GPT4ChatGPT4O = "chatgpt-4o-latest",
package/index.d.ts CHANGED
@@ -1808,6 +1808,7 @@ type Writeable<T> = {
1808
1808
  interface AxPromptTemplateOptions {
1809
1809
  functions?: Readonly<AxInputFunctionType>;
1810
1810
  thoughtFieldName?: string;
1811
+ cacheSystemPrompt?: boolean;
1811
1812
  }
1812
1813
  type AxChatRequestChatPrompt = Writeable<AxChatRequest['chatPrompt'][0]>;
1813
1814
  type ChatRequestUserMessage = Exclude<Extract<AxChatRequestChatPrompt, {
@@ -1820,6 +1821,7 @@ declare class AxPromptTemplate {
1820
1821
  private task;
1821
1822
  private readonly thoughtFieldName;
1822
1823
  private readonly functions?;
1824
+ private readonly cacheSystemPrompt?;
1823
1825
  constructor(sig: Readonly<AxSignature>, options?: Readonly<AxPromptTemplateOptions>, fieldTemplates?: Record<string, AxFieldTemplateFn>);
1824
1826
  private renderSingleValueUserContent;
1825
1827
  render: <T = any>(values: T | ReadonlyArray<AxMessage<T>>, // Allow T or array of AxMessages
@@ -2134,6 +2136,7 @@ type AxProgramForwardOptions<MODEL> = AxAIServiceOptions & {
2134
2136
  fastFail?: boolean;
2135
2137
  showThoughts?: boolean;
2136
2138
  functionCallMode?: 'auto' | 'native' | 'prompt';
2139
+ cacheSystemPrompt?: boolean;
2137
2140
  disableMemoryCleanup?: boolean;
2138
2141
  traceLabel?: string;
2139
2142
  description?: string;
@@ -2526,6 +2529,8 @@ type AxAIAnthropicChatResponse = {
2526
2529
  usage: {
2527
2530
  input_tokens: number;
2528
2531
  output_tokens: number;
2532
+ cache_creation_input_tokens?: number;
2533
+ cache_read_input_tokens?: number;
2529
2534
  };
2530
2535
  };
2531
2536
  type AxAIAnthropicChatError = {
@@ -2649,6 +2654,7 @@ declare enum AxAIOpenAIModel {
2649
2654
  GPT4 = "gpt-4",
2650
2655
  GPT41 = "gpt-4.1",
2651
2656
  GPT41Mini = "gpt-4.1-mini",
2657
+ GPT41Nano = "gpt-4.1-nano",
2652
2658
  GPT4O = "gpt-4o",
2653
2659
  GPT4OMini = "gpt-4o-mini",
2654
2660
  GPT4ChatGPT4O = "chatgpt-4o-latest",
@@ -4088,6 +4094,7 @@ declare enum AxAIOpenAIResponsesModel {
4088
4094
  GPT4 = "gpt-4",
4089
4095
  GPT41 = "gpt-4.1",
4090
4096
  GPT41Mini = "gpt-4.1-mini",
4097
+ GPT41Nano = "gpt-4.1-nano",
4091
4098
  GPT4O = "gpt-4o",
4092
4099
  GPT4OMini = "gpt-4o-mini",
4093
4100
  GPT4ChatGPT4O = "chatgpt-4o-latest",