@mariozechner/pi-ai 0.7.24 → 0.7.26

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;