@vibeapi/cli 0.0.159 → 0.0.160
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.
|
@@ -613,7 +613,8 @@
|
|
|
613
613
|
]
|
|
614
614
|
},
|
|
615
615
|
"endpoint_types": [
|
|
616
|
-
"openai"
|
|
616
|
+
"openai",
|
|
617
|
+
"anthropic"
|
|
617
618
|
]
|
|
618
619
|
},
|
|
619
620
|
{
|
|
@@ -649,7 +650,8 @@
|
|
|
649
650
|
]
|
|
650
651
|
},
|
|
651
652
|
"endpoint_types": [
|
|
652
|
-
"openai"
|
|
653
|
+
"openai",
|
|
654
|
+
"anthropic"
|
|
653
655
|
]
|
|
654
656
|
},
|
|
655
657
|
{
|
|
@@ -763,7 +765,30 @@
|
|
|
763
765
|
"recommended": false,
|
|
764
766
|
"hidden": false,
|
|
765
767
|
"context_window": 1000000,
|
|
768
|
+
"capabilities": {
|
|
769
|
+
"functionCall": true,
|
|
770
|
+
"vision": true,
|
|
771
|
+
"reasoning": true,
|
|
772
|
+
"imageOutput": false,
|
|
773
|
+
"video": true,
|
|
774
|
+
"structuredOutput": true,
|
|
775
|
+
"contextWindowTokens": 1000000,
|
|
776
|
+
"maxOutput": 131072,
|
|
777
|
+
"inputModalities": [
|
|
778
|
+
"text",
|
|
779
|
+
"image",
|
|
780
|
+
"video"
|
|
781
|
+
],
|
|
782
|
+
"outputModalities": [
|
|
783
|
+
"text"
|
|
784
|
+
],
|
|
785
|
+
"reasoningEfforts": [
|
|
786
|
+
"none",
|
|
787
|
+
"high"
|
|
788
|
+
]
|
|
789
|
+
},
|
|
766
790
|
"endpoint_types": [
|
|
791
|
+
"anthropic",
|
|
767
792
|
"openai"
|
|
768
793
|
]
|
|
769
794
|
},
|
|
@@ -776,6 +801,24 @@
|
|
|
776
801
|
"recommended": false,
|
|
777
802
|
"hidden": false,
|
|
778
803
|
"context_window": 1000000,
|
|
804
|
+
"capabilities": {
|
|
805
|
+
"functionCall": true,
|
|
806
|
+
"vision": true,
|
|
807
|
+
"reasoning": true,
|
|
808
|
+
"imageOutput": false,
|
|
809
|
+
"video": true,
|
|
810
|
+
"structuredOutput": true,
|
|
811
|
+
"contextWindowTokens": 1000000,
|
|
812
|
+
"maxOutput": 131072,
|
|
813
|
+
"inputModalities": [
|
|
814
|
+
"text",
|
|
815
|
+
"image",
|
|
816
|
+
"video"
|
|
817
|
+
],
|
|
818
|
+
"outputModalities": [
|
|
819
|
+
"text"
|
|
820
|
+
]
|
|
821
|
+
},
|
|
779
822
|
"endpoint_types": [
|
|
780
823
|
"openai"
|
|
781
824
|
]
|
|
@@ -789,9 +832,27 @@
|
|
|
789
832
|
"recommended": false,
|
|
790
833
|
"hidden": true,
|
|
791
834
|
"context_window": 1000000,
|
|
835
|
+
"capabilities": {
|
|
836
|
+
"functionCall": true,
|
|
837
|
+
"vision": false,
|
|
838
|
+
"reasoning": true,
|
|
839
|
+
"imageOutput": false,
|
|
840
|
+
"video": false,
|
|
841
|
+
"contextWindowTokens": 1000000,
|
|
842
|
+
"maxOutput": 131072,
|
|
843
|
+
"inputModalities": [
|
|
844
|
+
"text"
|
|
845
|
+
],
|
|
846
|
+
"outputModalities": [
|
|
847
|
+
"text"
|
|
848
|
+
],
|
|
849
|
+
"reasoningEfforts": [
|
|
850
|
+
"high"
|
|
851
|
+
]
|
|
852
|
+
},
|
|
792
853
|
"endpoint_types": [
|
|
793
|
-
"
|
|
794
|
-
"
|
|
854
|
+
"anthropic",
|
|
855
|
+
"openai"
|
|
795
856
|
]
|
|
796
857
|
},
|
|
797
858
|
{
|
|
@@ -803,9 +864,28 @@
|
|
|
803
864
|
"recommended": false,
|
|
804
865
|
"hidden": true,
|
|
805
866
|
"context_window": 1000000,
|
|
867
|
+
"capabilities": {
|
|
868
|
+
"functionCall": true,
|
|
869
|
+
"vision": true,
|
|
870
|
+
"reasoning": true,
|
|
871
|
+
"imageOutput": false,
|
|
872
|
+
"video": true,
|
|
873
|
+
"structuredOutput": true,
|
|
874
|
+
"contextWindowTokens": 1000000,
|
|
875
|
+
"maxOutput": 131072,
|
|
876
|
+
"inputModalities": [
|
|
877
|
+
"text",
|
|
878
|
+
"image",
|
|
879
|
+
"video"
|
|
880
|
+
],
|
|
881
|
+
"outputModalities": [
|
|
882
|
+
"text"
|
|
883
|
+
],
|
|
884
|
+
"knowledgeCutoff": "2025-04-30"
|
|
885
|
+
},
|
|
806
886
|
"endpoint_types": [
|
|
807
|
-
"
|
|
808
|
-
"
|
|
887
|
+
"anthropic",
|
|
888
|
+
"openai"
|
|
809
889
|
]
|
|
810
890
|
},
|
|
811
891
|
{
|
|
@@ -1369,7 +1449,8 @@
|
|
|
1369
1449
|
]
|
|
1370
1450
|
},
|
|
1371
1451
|
"endpoint_types": [
|
|
1372
|
-
"openai"
|
|
1452
|
+
"openai",
|
|
1453
|
+
"anthropic"
|
|
1373
1454
|
]
|
|
1374
1455
|
},
|
|
1375
1456
|
{
|
|
@@ -1405,7 +1486,8 @@
|
|
|
1405
1486
|
]
|
|
1406
1487
|
},
|
|
1407
1488
|
"endpoint_types": [
|
|
1408
|
-
"openai"
|
|
1489
|
+
"openai",
|
|
1490
|
+
"anthropic"
|
|
1409
1491
|
]
|
|
1410
1492
|
},
|
|
1411
1493
|
{
|
|
@@ -1519,7 +1601,30 @@
|
|
|
1519
1601
|
"recommended": false,
|
|
1520
1602
|
"hidden": false,
|
|
1521
1603
|
"context_window": 1000000,
|
|
1604
|
+
"capabilities": {
|
|
1605
|
+
"functionCall": true,
|
|
1606
|
+
"vision": true,
|
|
1607
|
+
"reasoning": true,
|
|
1608
|
+
"imageOutput": false,
|
|
1609
|
+
"video": true,
|
|
1610
|
+
"structuredOutput": true,
|
|
1611
|
+
"contextWindowTokens": 1000000,
|
|
1612
|
+
"maxOutput": 131072,
|
|
1613
|
+
"inputModalities": [
|
|
1614
|
+
"text",
|
|
1615
|
+
"image",
|
|
1616
|
+
"video"
|
|
1617
|
+
],
|
|
1618
|
+
"outputModalities": [
|
|
1619
|
+
"text"
|
|
1620
|
+
],
|
|
1621
|
+
"reasoningEfforts": [
|
|
1622
|
+
"none",
|
|
1623
|
+
"high"
|
|
1624
|
+
]
|
|
1625
|
+
},
|
|
1522
1626
|
"endpoint_types": [
|
|
1627
|
+
"anthropic",
|
|
1523
1628
|
"openai"
|
|
1524
1629
|
]
|
|
1525
1630
|
},
|
|
@@ -1532,6 +1637,24 @@
|
|
|
1532
1637
|
"recommended": false,
|
|
1533
1638
|
"hidden": false,
|
|
1534
1639
|
"context_window": 1000000,
|
|
1640
|
+
"capabilities": {
|
|
1641
|
+
"functionCall": true,
|
|
1642
|
+
"vision": true,
|
|
1643
|
+
"reasoning": true,
|
|
1644
|
+
"imageOutput": false,
|
|
1645
|
+
"video": true,
|
|
1646
|
+
"structuredOutput": true,
|
|
1647
|
+
"contextWindowTokens": 1000000,
|
|
1648
|
+
"maxOutput": 131072,
|
|
1649
|
+
"inputModalities": [
|
|
1650
|
+
"text",
|
|
1651
|
+
"image",
|
|
1652
|
+
"video"
|
|
1653
|
+
],
|
|
1654
|
+
"outputModalities": [
|
|
1655
|
+
"text"
|
|
1656
|
+
]
|
|
1657
|
+
},
|
|
1535
1658
|
"endpoint_types": [
|
|
1536
1659
|
"openai"
|
|
1537
1660
|
]
|
|
@@ -1545,9 +1668,27 @@
|
|
|
1545
1668
|
"recommended": false,
|
|
1546
1669
|
"hidden": true,
|
|
1547
1670
|
"context_window": 1000000,
|
|
1671
|
+
"capabilities": {
|
|
1672
|
+
"functionCall": true,
|
|
1673
|
+
"vision": false,
|
|
1674
|
+
"reasoning": true,
|
|
1675
|
+
"imageOutput": false,
|
|
1676
|
+
"video": false,
|
|
1677
|
+
"contextWindowTokens": 1000000,
|
|
1678
|
+
"maxOutput": 131072,
|
|
1679
|
+
"inputModalities": [
|
|
1680
|
+
"text"
|
|
1681
|
+
],
|
|
1682
|
+
"outputModalities": [
|
|
1683
|
+
"text"
|
|
1684
|
+
],
|
|
1685
|
+
"reasoningEfforts": [
|
|
1686
|
+
"high"
|
|
1687
|
+
]
|
|
1688
|
+
},
|
|
1548
1689
|
"endpoint_types": [
|
|
1549
|
-
"
|
|
1550
|
-
"
|
|
1690
|
+
"anthropic",
|
|
1691
|
+
"openai"
|
|
1551
1692
|
]
|
|
1552
1693
|
},
|
|
1553
1694
|
{
|
|
@@ -1559,9 +1700,28 @@
|
|
|
1559
1700
|
"recommended": false,
|
|
1560
1701
|
"hidden": true,
|
|
1561
1702
|
"context_window": 1000000,
|
|
1703
|
+
"capabilities": {
|
|
1704
|
+
"functionCall": true,
|
|
1705
|
+
"vision": true,
|
|
1706
|
+
"reasoning": true,
|
|
1707
|
+
"imageOutput": false,
|
|
1708
|
+
"video": true,
|
|
1709
|
+
"structuredOutput": true,
|
|
1710
|
+
"contextWindowTokens": 1000000,
|
|
1711
|
+
"maxOutput": 131072,
|
|
1712
|
+
"inputModalities": [
|
|
1713
|
+
"text",
|
|
1714
|
+
"image",
|
|
1715
|
+
"video"
|
|
1716
|
+
],
|
|
1717
|
+
"outputModalities": [
|
|
1718
|
+
"text"
|
|
1719
|
+
],
|
|
1720
|
+
"knowledgeCutoff": "2025-04-30"
|
|
1721
|
+
},
|
|
1562
1722
|
"endpoint_types": [
|
|
1563
|
-
"
|
|
1564
|
-
"
|
|
1723
|
+
"anthropic",
|
|
1724
|
+
"openai"
|
|
1565
1725
|
]
|
|
1566
1726
|
},
|
|
1567
1727
|
{
|
|
@@ -613,7 +613,8 @@
|
|
|
613
613
|
]
|
|
614
614
|
},
|
|
615
615
|
"endpoint_types": [
|
|
616
|
-
"openai"
|
|
616
|
+
"openai",
|
|
617
|
+
"anthropic"
|
|
617
618
|
]
|
|
618
619
|
},
|
|
619
620
|
{
|
|
@@ -649,7 +650,8 @@
|
|
|
649
650
|
]
|
|
650
651
|
},
|
|
651
652
|
"endpoint_types": [
|
|
652
|
-
"openai"
|
|
653
|
+
"openai",
|
|
654
|
+
"anthropic"
|
|
653
655
|
]
|
|
654
656
|
},
|
|
655
657
|
{
|
|
@@ -763,7 +765,30 @@
|
|
|
763
765
|
"recommended": false,
|
|
764
766
|
"hidden": false,
|
|
765
767
|
"context_window": 1000000,
|
|
768
|
+
"capabilities": {
|
|
769
|
+
"functionCall": true,
|
|
770
|
+
"vision": true,
|
|
771
|
+
"reasoning": true,
|
|
772
|
+
"imageOutput": false,
|
|
773
|
+
"video": true,
|
|
774
|
+
"structuredOutput": true,
|
|
775
|
+
"contextWindowTokens": 1000000,
|
|
776
|
+
"maxOutput": 131072,
|
|
777
|
+
"inputModalities": [
|
|
778
|
+
"text",
|
|
779
|
+
"image",
|
|
780
|
+
"video"
|
|
781
|
+
],
|
|
782
|
+
"outputModalities": [
|
|
783
|
+
"text"
|
|
784
|
+
],
|
|
785
|
+
"reasoningEfforts": [
|
|
786
|
+
"none",
|
|
787
|
+
"high"
|
|
788
|
+
]
|
|
789
|
+
},
|
|
766
790
|
"endpoint_types": [
|
|
791
|
+
"anthropic",
|
|
767
792
|
"openai"
|
|
768
793
|
]
|
|
769
794
|
},
|
|
@@ -776,6 +801,24 @@
|
|
|
776
801
|
"recommended": false,
|
|
777
802
|
"hidden": false,
|
|
778
803
|
"context_window": 1000000,
|
|
804
|
+
"capabilities": {
|
|
805
|
+
"functionCall": true,
|
|
806
|
+
"vision": true,
|
|
807
|
+
"reasoning": true,
|
|
808
|
+
"imageOutput": false,
|
|
809
|
+
"video": true,
|
|
810
|
+
"structuredOutput": true,
|
|
811
|
+
"contextWindowTokens": 1000000,
|
|
812
|
+
"maxOutput": 131072,
|
|
813
|
+
"inputModalities": [
|
|
814
|
+
"text",
|
|
815
|
+
"image",
|
|
816
|
+
"video"
|
|
817
|
+
],
|
|
818
|
+
"outputModalities": [
|
|
819
|
+
"text"
|
|
820
|
+
]
|
|
821
|
+
},
|
|
779
822
|
"endpoint_types": [
|
|
780
823
|
"openai"
|
|
781
824
|
]
|
|
@@ -789,9 +832,27 @@
|
|
|
789
832
|
"recommended": false,
|
|
790
833
|
"hidden": true,
|
|
791
834
|
"context_window": 1000000,
|
|
835
|
+
"capabilities": {
|
|
836
|
+
"functionCall": true,
|
|
837
|
+
"vision": false,
|
|
838
|
+
"reasoning": true,
|
|
839
|
+
"imageOutput": false,
|
|
840
|
+
"video": false,
|
|
841
|
+
"contextWindowTokens": 1000000,
|
|
842
|
+
"maxOutput": 131072,
|
|
843
|
+
"inputModalities": [
|
|
844
|
+
"text"
|
|
845
|
+
],
|
|
846
|
+
"outputModalities": [
|
|
847
|
+
"text"
|
|
848
|
+
],
|
|
849
|
+
"reasoningEfforts": [
|
|
850
|
+
"high"
|
|
851
|
+
]
|
|
852
|
+
},
|
|
792
853
|
"endpoint_types": [
|
|
793
|
-
"
|
|
794
|
-
"
|
|
854
|
+
"anthropic",
|
|
855
|
+
"openai"
|
|
795
856
|
]
|
|
796
857
|
},
|
|
797
858
|
{
|
|
@@ -803,9 +864,28 @@
|
|
|
803
864
|
"recommended": false,
|
|
804
865
|
"hidden": true,
|
|
805
866
|
"context_window": 1000000,
|
|
867
|
+
"capabilities": {
|
|
868
|
+
"functionCall": true,
|
|
869
|
+
"vision": true,
|
|
870
|
+
"reasoning": true,
|
|
871
|
+
"imageOutput": false,
|
|
872
|
+
"video": true,
|
|
873
|
+
"structuredOutput": true,
|
|
874
|
+
"contextWindowTokens": 1000000,
|
|
875
|
+
"maxOutput": 131072,
|
|
876
|
+
"inputModalities": [
|
|
877
|
+
"text",
|
|
878
|
+
"image",
|
|
879
|
+
"video"
|
|
880
|
+
],
|
|
881
|
+
"outputModalities": [
|
|
882
|
+
"text"
|
|
883
|
+
],
|
|
884
|
+
"knowledgeCutoff": "2025-04-30"
|
|
885
|
+
},
|
|
806
886
|
"endpoint_types": [
|
|
807
|
-
"
|
|
808
|
-
"
|
|
887
|
+
"anthropic",
|
|
888
|
+
"openai"
|
|
809
889
|
]
|
|
810
890
|
},
|
|
811
891
|
{
|
|
@@ -1369,7 +1449,8 @@
|
|
|
1369
1449
|
]
|
|
1370
1450
|
},
|
|
1371
1451
|
"endpoint_types": [
|
|
1372
|
-
"openai"
|
|
1452
|
+
"openai",
|
|
1453
|
+
"anthropic"
|
|
1373
1454
|
]
|
|
1374
1455
|
},
|
|
1375
1456
|
{
|
|
@@ -1405,7 +1486,8 @@
|
|
|
1405
1486
|
]
|
|
1406
1487
|
},
|
|
1407
1488
|
"endpoint_types": [
|
|
1408
|
-
"openai"
|
|
1489
|
+
"openai",
|
|
1490
|
+
"anthropic"
|
|
1409
1491
|
]
|
|
1410
1492
|
},
|
|
1411
1493
|
{
|
|
@@ -1519,7 +1601,30 @@
|
|
|
1519
1601
|
"recommended": false,
|
|
1520
1602
|
"hidden": false,
|
|
1521
1603
|
"context_window": 1000000,
|
|
1604
|
+
"capabilities": {
|
|
1605
|
+
"functionCall": true,
|
|
1606
|
+
"vision": true,
|
|
1607
|
+
"reasoning": true,
|
|
1608
|
+
"imageOutput": false,
|
|
1609
|
+
"video": true,
|
|
1610
|
+
"structuredOutput": true,
|
|
1611
|
+
"contextWindowTokens": 1000000,
|
|
1612
|
+
"maxOutput": 131072,
|
|
1613
|
+
"inputModalities": [
|
|
1614
|
+
"text",
|
|
1615
|
+
"image",
|
|
1616
|
+
"video"
|
|
1617
|
+
],
|
|
1618
|
+
"outputModalities": [
|
|
1619
|
+
"text"
|
|
1620
|
+
],
|
|
1621
|
+
"reasoningEfforts": [
|
|
1622
|
+
"none",
|
|
1623
|
+
"high"
|
|
1624
|
+
]
|
|
1625
|
+
},
|
|
1522
1626
|
"endpoint_types": [
|
|
1627
|
+
"anthropic",
|
|
1523
1628
|
"openai"
|
|
1524
1629
|
]
|
|
1525
1630
|
},
|
|
@@ -1532,6 +1637,24 @@
|
|
|
1532
1637
|
"recommended": false,
|
|
1533
1638
|
"hidden": false,
|
|
1534
1639
|
"context_window": 1000000,
|
|
1640
|
+
"capabilities": {
|
|
1641
|
+
"functionCall": true,
|
|
1642
|
+
"vision": true,
|
|
1643
|
+
"reasoning": true,
|
|
1644
|
+
"imageOutput": false,
|
|
1645
|
+
"video": true,
|
|
1646
|
+
"structuredOutput": true,
|
|
1647
|
+
"contextWindowTokens": 1000000,
|
|
1648
|
+
"maxOutput": 131072,
|
|
1649
|
+
"inputModalities": [
|
|
1650
|
+
"text",
|
|
1651
|
+
"image",
|
|
1652
|
+
"video"
|
|
1653
|
+
],
|
|
1654
|
+
"outputModalities": [
|
|
1655
|
+
"text"
|
|
1656
|
+
]
|
|
1657
|
+
},
|
|
1535
1658
|
"endpoint_types": [
|
|
1536
1659
|
"openai"
|
|
1537
1660
|
]
|
|
@@ -1545,9 +1668,27 @@
|
|
|
1545
1668
|
"recommended": false,
|
|
1546
1669
|
"hidden": true,
|
|
1547
1670
|
"context_window": 1000000,
|
|
1671
|
+
"capabilities": {
|
|
1672
|
+
"functionCall": true,
|
|
1673
|
+
"vision": false,
|
|
1674
|
+
"reasoning": true,
|
|
1675
|
+
"imageOutput": false,
|
|
1676
|
+
"video": false,
|
|
1677
|
+
"contextWindowTokens": 1000000,
|
|
1678
|
+
"maxOutput": 131072,
|
|
1679
|
+
"inputModalities": [
|
|
1680
|
+
"text"
|
|
1681
|
+
],
|
|
1682
|
+
"outputModalities": [
|
|
1683
|
+
"text"
|
|
1684
|
+
],
|
|
1685
|
+
"reasoningEfforts": [
|
|
1686
|
+
"high"
|
|
1687
|
+
]
|
|
1688
|
+
},
|
|
1548
1689
|
"endpoint_types": [
|
|
1549
|
-
"
|
|
1550
|
-
"
|
|
1690
|
+
"anthropic",
|
|
1691
|
+
"openai"
|
|
1551
1692
|
]
|
|
1552
1693
|
},
|
|
1553
1694
|
{
|
|
@@ -1559,9 +1700,28 @@
|
|
|
1559
1700
|
"recommended": false,
|
|
1560
1701
|
"hidden": true,
|
|
1561
1702
|
"context_window": 1000000,
|
|
1703
|
+
"capabilities": {
|
|
1704
|
+
"functionCall": true,
|
|
1705
|
+
"vision": true,
|
|
1706
|
+
"reasoning": true,
|
|
1707
|
+
"imageOutput": false,
|
|
1708
|
+
"video": true,
|
|
1709
|
+
"structuredOutput": true,
|
|
1710
|
+
"contextWindowTokens": 1000000,
|
|
1711
|
+
"maxOutput": 131072,
|
|
1712
|
+
"inputModalities": [
|
|
1713
|
+
"text",
|
|
1714
|
+
"image",
|
|
1715
|
+
"video"
|
|
1716
|
+
],
|
|
1717
|
+
"outputModalities": [
|
|
1718
|
+
"text"
|
|
1719
|
+
],
|
|
1720
|
+
"knowledgeCutoff": "2025-04-30"
|
|
1721
|
+
},
|
|
1562
1722
|
"endpoint_types": [
|
|
1563
|
-
"
|
|
1564
|
-
"
|
|
1723
|
+
"anthropic",
|
|
1724
|
+
"openai"
|
|
1565
1725
|
]
|
|
1566
1726
|
},
|
|
1567
1727
|
{
|
|
@@ -27,9 +27,12 @@ export declare function writeModelsFile(path: string, file: ModelsFile, entries:
|
|
|
27
27
|
/** Strip Claude Code's `[1m]` window suffix: the gateway's model id has none. */
|
|
28
28
|
export declare const bareModelId: (id: string) => string;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* GPT goes to the Responses API (like Codex): only there does the engine replay the encrypted
|
|
31
|
+
* reasoning across tool turns; it falls back to Chat Completions only when the gateway says it
|
|
32
|
+
* doesn't serve the model on Responses. Other models use Chat Completions unless Responses is
|
|
33
|
+
* all the gateway serves. Tool calls work on both for GPT (checked 2026-11-03 on GPT-6 Astra,
|
|
34
|
+
* 6.1 Sol, 6 Sol, 6.1 Terra, 5.6 Sol), whatever `functionCallEndpoints` says. The engine has no
|
|
35
|
+
* Anthropic protocol for custom models (`api: "anthropic-messages"` is sent as Chat Completions).
|
|
33
36
|
*/
|
|
34
37
|
export declare function usesResponses(spec: GatewayModelSpec): boolean;
|
|
35
38
|
/** The engine's entry for one model, capabilities from the gateway's metadata. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{existsSync as e,readFileSync as t}from"fs";import{BRAND_NAME as r}from"../brand.js";import{gatewayModelSpecs as n,modelFamily as o,prettyModelName as i,vendorNames as s}from"../gateway-models.js";import{backupBeforeWrite as a,atomicWriteFile as p}from"./backup.js";import{withV1 as d}from"./types.js";export const CUSTOM_MODEL_PREFIX="custom-local:";const u="openai",l="openai-response",c=e=>!!e&&"object"==typeof e&&!Array.isArray(e);export const isOurEntry=e=>c(e)&&e.vendor===r;export function readModelsFile(r){if(!e(r))return{entries:[],wrap:e=>({models:e})};const n=t(r,"utf-8");if(!n.trim())return{entries:[],wrap:e=>({models:e})};let o;try{o=JSON.parse(n)}catch(e){throw new Error(`Existing ${r} cannot be parsed; back it up and fix it first: ${e instanceof Error?e.message:String(e)}`)}if(Array.isArray(o))return{entries:o,wrap:e=>e};if(c(o))return{entries:Array.isArray(o.models)?o.models:[],wrap:e=>({...o,models:e})};throw new Error(`Existing ${r} must hold a JSON object or array`)}export function writeModelsFile(r,n,o){const i=`${JSON.stringify(n.wrap(o),null,2)}\n`;e(r)&&t(r,"utf-8")===i||(a(r),p(r,i,384))}export const bareModelId=e=>e.replace(/\[[^\]]*\]$/,"");export function usesResponses(e){const t=e.
|
|
1
|
+
import{existsSync as e,readFileSync as t}from"fs";import{BRAND_NAME as r}from"../brand.js";import{gatewayModelSpecs as n,modelFamily as o,prettyModelName as i,vendorNames as s}from"../gateway-models.js";import{backupBeforeWrite as a,atomicWriteFile as p}from"./backup.js";import{withV1 as d}from"./types.js";export const CUSTOM_MODEL_PREFIX="custom-local:";const u="openai",l="openai-response",c=e=>!!e&&"object"==typeof e&&!Array.isArray(e);export const isOurEntry=e=>c(e)&&e.vendor===r;export function readModelsFile(r){if(!e(r))return{entries:[],wrap:e=>({models:e})};const n=t(r,"utf-8");if(!n.trim())return{entries:[],wrap:e=>({models:e})};let o;try{o=JSON.parse(n)}catch(e){throw new Error(`Existing ${r} cannot be parsed; back it up and fix it first: ${e instanceof Error?e.message:String(e)}`)}if(Array.isArray(o))return{entries:o,wrap:e=>e};if(c(o))return{entries:Array.isArray(o.models)?o.models:[],wrap:e=>({...o,models:e})};throw new Error(`Existing ${r} must hold a JSON object or array`)}export function writeModelsFile(r,n,o){const i=`${JSON.stringify(n.wrap(o),null,2)}\n`;e(r)&&t(r,"utf-8")===i||(a(r),p(r,i,384))}export const bareModelId=e=>e.replace(/\[[^\]]*\]$/,"");export function usesResponses(e){const t=e.endpointTypes??[];return"gpt"===o(e.id)?0===t.length||t.includes(l):t.length>0&&!t.includes(u)&&t.includes(l)}function f(e){const t=e.endpointTypes;return!t||0===t.length||t.includes(u)||t.includes(l)}export function modelEntry(e,t,n,s=!1){const a=e.capabilities??{},p=usesResponses(e),u=o(e.id),l={id:e.id,name:s?e.id:e.name??i(e.id),vendor:r,url:p?d(t):`${d(t)}/chat/completions`,apiKey:n};p&&(l.api="openai-responses");const c=a.contextWindow??e.contextWindow;c&&(l.maxInputTokens=c);const f=a.maxOutput??e.maxOutputTokens;return f&&(l.maxOutputTokens=f),l.supportsToolCall=a.toolCall??!0,l.supportsImages=a.vision??"other"!==u,void 0!==a.reasoning&&(l.supportsReasoning=a.reasoning),a.reasoning&&a.reasoningEfforts&&(l.reasoning={...a.defaultReasoningEffort?{defaultEffort:a.defaultReasoningEffort}:{},supportedEfforts:a.reasoningEfforts}),l}export function menuSpecs(e,t){let r=n("codebuddy",e?.clientModels,e?.clientPersonal).filter(f);if(e){const n=new Set(e.models);r=r.filter(e=>n.has(e.id)),!r.some(e=>e.id===t)&&n.has(t)&&(r=[{id:t},...r])}else r.some(e=>e.id===t)||(r=[{id:t},...r]);const o=(e?.clientPersonal??[]).length>0,i=new Set,a=r.filter(e=>{if(o)return!0;const r=s([e.id])[0],n=!i.has(r);return i.add(r),e.id===t||!0===e.recommended||n}),p=a.findIndex(e=>e.id===t);return p>0?[a[p],...a.slice(0,p),...a.slice(p+1)]:a}export function mergeEntries(e,t,r,n,o=!1){const i=new Set(t.map(e=>e.id)),s=[],a=e.filter(e=>{if(isOurEntry(e))return!1;const t=c(e)&&"string"==typeof e.id?e.id:void 0;return!t||!i.has(t)||(s.push(t),!1)});return{entries:[...t.map(e=>modelEntry(e,r,n,o)),...a],replaced:s}}export function foreignIdsReplaced(e,t){const r=new Set(t.map(e=>e.id));return e.filter(e=>!isOurEntry(e)).filter(e=>c(e)&&"string"==typeof e.id&&r.has(e.id)).map(e=>String(e.id))}export function ourEntries(e){return e.filter(isOurEntry)}export function ourApiKey(e){const t=ourEntries(e)[0]?.apiKey;return"string"==typeof t&&t.trim()?t:null}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibeapi/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.160",
|
|
4
4
|
"description": "CLI tool for managing AI coding assistants (Claude Code, Codex, OpenClaw, Hermes, AtomCode, Grok Build) with one unified config",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|