@mariozechner/pi-ai 0.7.25 → 0.7.27

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/README.md CHANGED
@@ -576,6 +576,24 @@ const ollamaModel: Model<'openai-completions'> = {
576
576
  maxTokens: 32000
577
577
  };
578
578
 
579
+ // Example: Custom endpoint with headers (bypassing Cloudflare bot detection)
580
+ const proxyModel: Model<'anthropic-messages'> = {
581
+ id: 'claude-sonnet-4',
582
+ name: 'Claude Sonnet 4 (Proxied)',
583
+ api: 'anthropic-messages',
584
+ provider: 'custom-proxy',
585
+ baseUrl: 'https://proxy.example.com/v1',
586
+ reasoning: true,
587
+ input: ['text', 'image'],
588
+ cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 },
589
+ contextWindow: 200000,
590
+ maxTokens: 8192,
591
+ headers: {
592
+ 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36',
593
+ 'X-Custom-Auth': 'bearer-token-here'
594
+ }
595
+ };
596
+
579
597
  // Use the custom model
580
598
  const response = await stream(ollamaModel, context, {
581
599
  apiKey: 'dummy' // Ollama doesn't need a real key
@@ -1625,14 +1625,14 @@ export declare const MODELS: {
1625
1625
  contextWindow: number;
1626
1626
  maxTokens: number;
1627
1627
  };
1628
- readonly "grok-4.1-fast-non-reasoning": {
1628
+ readonly "grok-3": {
1629
1629
  id: string;
1630
1630
  name: string;
1631
1631
  api: "openai-completions";
1632
1632
  provider: string;
1633
1633
  baseUrl: string;
1634
1634
  reasoning: false;
1635
- input: ("image" | "text")[];
1635
+ input: "text"[];
1636
1636
  cost: {
1637
1637
  input: number;
1638
1638
  output: number;
@@ -1642,14 +1642,14 @@ export declare const MODELS: {
1642
1642
  contextWindow: number;
1643
1643
  maxTokens: number;
1644
1644
  };
1645
- readonly "grok-3": {
1645
+ readonly "grok-4-fast": {
1646
1646
  id: string;
1647
1647
  name: string;
1648
1648
  api: "openai-completions";
1649
1649
  provider: string;
1650
1650
  baseUrl: string;
1651
- reasoning: false;
1652
- input: "text"[];
1651
+ reasoning: true;
1652
+ input: ("image" | "text")[];
1653
1653
  cost: {
1654
1654
  input: number;
1655
1655
  output: number;
@@ -1659,14 +1659,14 @@ export declare const MODELS: {
1659
1659
  contextWindow: number;
1660
1660
  maxTokens: number;
1661
1661
  };
1662
- readonly "grok-4-fast": {
1662
+ readonly "grok-2-latest": {
1663
1663
  id: string;
1664
1664
  name: string;
1665
1665
  api: "openai-completions";
1666
1666
  provider: string;
1667
1667
  baseUrl: string;
1668
- reasoning: true;
1669
- input: ("image" | "text")[];
1668
+ reasoning: false;
1669
+ input: "text"[];
1670
1670
  cost: {
1671
1671
  input: number;
1672
1672
  output: number;
@@ -1676,14 +1676,14 @@ export declare const MODELS: {
1676
1676
  contextWindow: number;
1677
1677
  maxTokens: number;
1678
1678
  };
1679
- readonly "grok-2-latest": {
1679
+ readonly "grok-4-1-fast": {
1680
1680
  id: string;
1681
1681
  name: string;
1682
1682
  api: "openai-completions";
1683
1683
  provider: string;
1684
1684
  baseUrl: string;
1685
- reasoning: false;
1686
- input: "text"[];
1685
+ reasoning: true;
1686
+ input: ("image" | "text")[];
1687
1687
  cost: {
1688
1688
  input: number;
1689
1689
  output: number;
@@ -1812,14 +1812,14 @@ export declare const MODELS: {
1812
1812
  contextWindow: number;
1813
1813
  maxTokens: number;
1814
1814
  };
1815
- readonly "grok-4.1-fast": {
1815
+ readonly "grok-3-mini-latest": {
1816
1816
  id: string;
1817
1817
  name: string;
1818
1818
  api: "openai-completions";
1819
1819
  provider: string;
1820
1820
  baseUrl: string;
1821
1821
  reasoning: true;
1822
- input: ("image" | "text")[];
1822
+ input: "text"[];
1823
1823
  cost: {
1824
1824
  input: number;
1825
1825
  output: number;
@@ -1829,14 +1829,14 @@ export declare const MODELS: {
1829
1829
  contextWindow: number;
1830
1830
  maxTokens: number;
1831
1831
  };
1832
- readonly "grok-3-mini-latest": {
1832
+ readonly "grok-4-1-fast-non-reasoning": {
1833
1833
  id: string;
1834
1834
  name: string;
1835
1835
  api: "openai-completions";
1836
1836
  provider: string;
1837
1837
  baseUrl: string;
1838
- reasoning: true;
1839
- input: "text"[];
1838
+ reasoning: false;
1839
+ input: ("image" | "text")[];
1840
1840
  cost: {
1841
1841
  input: number;
1842
1842
  output: number;
@@ -1969,6 +1969,23 @@ export declare const MODELS: {
1969
1969
  contextWindow: number;
1970
1970
  maxTokens: number;
1971
1971
  };
1972
+ readonly "x-ai/grok-4.1-fast:free": {
1973
+ id: string;
1974
+ name: string;
1975
+ api: "openai-completions";
1976
+ provider: string;
1977
+ baseUrl: string;
1978
+ reasoning: true;
1979
+ input: ("image" | "text")[];
1980
+ cost: {
1981
+ input: number;
1982
+ output: number;
1983
+ cacheRead: number;
1984
+ cacheWrite: number;
1985
+ };
1986
+ contextWindow: number;
1987
+ maxTokens: number;
1988
+ };
1972
1989
  readonly "google/gemini-3-pro-preview": {
1973
1990
  id: string;
1974
1991
  name: string;
@@ -4825,7 +4842,7 @@ export declare const MODELS: {
4825
4842
  contextWindow: number;
4826
4843
  maxTokens: number;
4827
4844
  };
4828
- readonly "mistralai/ministral-3b": {
4845
+ readonly "mistralai/ministral-8b": {
4829
4846
  id: string;
4830
4847
  name: string;
4831
4848
  api: "openai-completions";
@@ -4842,7 +4859,7 @@ export declare const MODELS: {
4842
4859
  contextWindow: number;
4843
4860
  maxTokens: number;
4844
4861
  };
4845
- readonly "mistralai/ministral-8b": {
4862
+ readonly "mistralai/ministral-3b": {
4846
4863
  id: string;
4847
4864
  name: string;
4848
4865
  api: "openai-completions";
@@ -5063,7 +5080,7 @@ export declare const MODELS: {
5063
5080
  contextWindow: number;
5064
5081
  maxTokens: number;
5065
5082
  };
5066
- readonly "meta-llama/llama-3.1-70b-instruct": {
5083
+ readonly "meta-llama/llama-3.1-8b-instruct": {
5067
5084
  id: string;
5068
5085
  name: string;
5069
5086
  api: "openai-completions";
@@ -5080,7 +5097,7 @@ export declare const MODELS: {
5080
5097
  contextWindow: number;
5081
5098
  maxTokens: number;
5082
5099
  };
5083
- readonly "meta-llama/llama-3.1-405b-instruct": {
5100
+ readonly "meta-llama/llama-3.1-70b-instruct": {
5084
5101
  id: string;
5085
5102
  name: string;
5086
5103
  api: "openai-completions";
@@ -5097,7 +5114,7 @@ export declare const MODELS: {
5097
5114
  contextWindow: number;
5098
5115
  maxTokens: number;
5099
5116
  };
5100
- readonly "meta-llama/llama-3.1-8b-instruct": {
5117
+ readonly "meta-llama/llama-3.1-405b-instruct": {
5101
5118
  id: string;
5102
5119
  name: string;
5103
5120
  api: "openai-completions";