@oh-my-pi/pi-ai 4.2.2 → 4.3.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-ai",
3
- "version": "4.2.2",
3
+ "version": "4.3.0",
4
4
  "description": "Unified LLM API with automatic model discovery and provider configuration",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -18,12 +18,16 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@anthropic-ai/sdk": "0.71.2",
21
+ "@bufbuild/protobuf": "^2.10.2",
22
+ "@connectrpc/connect": "^2.1.1",
23
+ "@connectrpc/connect-node": "^2.1.1",
21
24
  "@google/genai": "1.34.0",
22
25
  "@mistralai/mistralai": "1.10.0",
23
26
  "@sinclair/typebox": "^0.34.41",
24
27
  "ajv": "^8.17.1",
25
28
  "ajv-formats": "^3.0.1",
26
29
  "chalk": "^5.6.2",
30
+ "json5": "^2.2.3",
27
31
  "openai": "6.10.0",
28
32
  "partial-json": "^0.1.7",
29
33
  "zod-to-json-schema": "^3.24.6"
package/src/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./models";
2
2
  export * from "./providers/anthropic";
3
+ export * from "./providers/cursor";
3
4
  export * from "./providers/google";
4
5
  export * from "./providers/google-gemini-cli";
5
6
  export * from "./providers/google-vertex";
@@ -1,5 +1,5 @@
1
1
  // This file is auto-generated by scripts/generate-models.ts
2
- // Do not edit manually - run 'npm run generate-models' to update
2
+ // Do not edit manually - run 'bun run generate-models' to update
3
3
 
4
4
  import type { Model } from "./types";
5
5
 
@@ -433,6 +433,229 @@ export const MODELS = {
433
433
  maxTokens: 40000,
434
434
  } satisfies Model<"openai-completions">,
435
435
  },
436
+ "cursor": {
437
+ "claude-4.5-opus-high": {
438
+ id: "claude-4.5-opus-high",
439
+ name: "Claude 4.5 Opus (Cursor)",
440
+ api: "cursor-agent",
441
+ provider: "cursor",
442
+ baseUrl: "https://api2.cursor.sh",
443
+ reasoning: false,
444
+ input: ["text", "image"],
445
+ cost: {
446
+ input: 0,
447
+ output: 0,
448
+ cacheRead: 0,
449
+ cacheWrite: 0,
450
+ },
451
+ contextWindow: 200000,
452
+ maxTokens: 64000,
453
+ } satisfies Model<"cursor-agent">,
454
+ "claude-4.5-opus-high-thinking": {
455
+ id: "claude-4.5-opus-high-thinking",
456
+ name: "Claude 4.5 Opus Thinking (Cursor)",
457
+ api: "cursor-agent",
458
+ provider: "cursor",
459
+ baseUrl: "https://api2.cursor.sh",
460
+ reasoning: true,
461
+ input: ["text", "image"],
462
+ cost: {
463
+ input: 0,
464
+ output: 0,
465
+ cacheRead: 0,
466
+ cacheWrite: 0,
467
+ },
468
+ contextWindow: 200000,
469
+ maxTokens: 64000,
470
+ } satisfies Model<"cursor-agent">,
471
+ "claude-4.5-sonnet": {
472
+ id: "claude-4.5-sonnet",
473
+ name: "Claude 4.5 Sonnet (Cursor)",
474
+ api: "cursor-agent",
475
+ provider: "cursor",
476
+ baseUrl: "https://api2.cursor.sh",
477
+ reasoning: false,
478
+ input: ["text", "image"],
479
+ cost: {
480
+ input: 0,
481
+ output: 0,
482
+ cacheRead: 0,
483
+ cacheWrite: 0,
484
+ },
485
+ contextWindow: 200000,
486
+ maxTokens: 64000,
487
+ } satisfies Model<"cursor-agent">,
488
+ "claude-4.5-sonnet-thinking": {
489
+ id: "claude-4.5-sonnet-thinking",
490
+ name: "Claude 4.5 Sonnet Thinking (Cursor)",
491
+ api: "cursor-agent",
492
+ provider: "cursor",
493
+ baseUrl: "https://api2.cursor.sh",
494
+ reasoning: true,
495
+ input: ["text", "image"],
496
+ cost: {
497
+ input: 0,
498
+ output: 0,
499
+ cacheRead: 0,
500
+ cacheWrite: 0,
501
+ },
502
+ contextWindow: 200000,
503
+ maxTokens: 64000,
504
+ } satisfies Model<"cursor-agent">,
505
+ "composer-1": {
506
+ id: "composer-1",
507
+ name: "Composer 1 (Cursor)",
508
+ api: "cursor-agent",
509
+ provider: "cursor",
510
+ baseUrl: "https://api2.cursor.sh",
511
+ reasoning: false,
512
+ input: ["text"],
513
+ cost: {
514
+ input: 0,
515
+ output: 0,
516
+ cacheRead: 0,
517
+ cacheWrite: 0,
518
+ },
519
+ contextWindow: 200000,
520
+ maxTokens: 64000,
521
+ } satisfies Model<"cursor-agent">,
522
+ "default": {
523
+ id: "default",
524
+ name: "Auto (Cursor)",
525
+ api: "cursor-agent",
526
+ provider: "cursor",
527
+ baseUrl: "https://api2.cursor.sh",
528
+ reasoning: false,
529
+ input: ["text", "image"],
530
+ cost: {
531
+ input: 0,
532
+ output: 0,
533
+ cacheRead: 0,
534
+ cacheWrite: 0,
535
+ },
536
+ contextWindow: 200000,
537
+ maxTokens: 64000,
538
+ } satisfies Model<"cursor-agent">,
539
+ "gemini-3-flash": {
540
+ id: "gemini-3-flash",
541
+ name: "Gemini 3 Flash (Cursor)",
542
+ api: "cursor-agent",
543
+ provider: "cursor",
544
+ baseUrl: "https://api2.cursor.sh",
545
+ reasoning: true,
546
+ input: ["text", "image"],
547
+ cost: {
548
+ input: 0,
549
+ output: 0,
550
+ cacheRead: 0,
551
+ cacheWrite: 0,
552
+ },
553
+ contextWindow: 1048576,
554
+ maxTokens: 65535,
555
+ } satisfies Model<"cursor-agent">,
556
+ "gemini-3-pro": {
557
+ id: "gemini-3-pro",
558
+ name: "Gemini 3 Pro (Cursor)",
559
+ api: "cursor-agent",
560
+ provider: "cursor",
561
+ baseUrl: "https://api2.cursor.sh",
562
+ reasoning: true,
563
+ input: ["text", "image"],
564
+ cost: {
565
+ input: 0,
566
+ output: 0,
567
+ cacheRead: 0,
568
+ cacheWrite: 0,
569
+ },
570
+ contextWindow: 1048576,
571
+ maxTokens: 65535,
572
+ } satisfies Model<"cursor-agent">,
573
+ "gpt-5.1-codex-max": {
574
+ id: "gpt-5.1-codex-max",
575
+ name: "GPT-5.1 Codex Max (Cursor)",
576
+ api: "cursor-agent",
577
+ provider: "cursor",
578
+ baseUrl: "https://api2.cursor.sh",
579
+ reasoning: true,
580
+ input: ["text", "image"],
581
+ cost: {
582
+ input: 0,
583
+ output: 0,
584
+ cacheRead: 0,
585
+ cacheWrite: 0,
586
+ },
587
+ contextWindow: 400000,
588
+ maxTokens: 128000,
589
+ } satisfies Model<"cursor-agent">,
590
+ "gpt-5.1-codex-max-high": {
591
+ id: "gpt-5.1-codex-max-high",
592
+ name: "GPT-5.1 Codex Max High (Cursor)",
593
+ api: "cursor-agent",
594
+ provider: "cursor",
595
+ baseUrl: "https://api2.cursor.sh",
596
+ reasoning: true,
597
+ input: ["text", "image"],
598
+ cost: {
599
+ input: 0,
600
+ output: 0,
601
+ cacheRead: 0,
602
+ cacheWrite: 0,
603
+ },
604
+ contextWindow: 400000,
605
+ maxTokens: 128000,
606
+ } satisfies Model<"cursor-agent">,
607
+ "gpt-5.2": {
608
+ id: "gpt-5.2",
609
+ name: "GPT-5.2 (Cursor)",
610
+ api: "cursor-agent",
611
+ provider: "cursor",
612
+ baseUrl: "https://api2.cursor.sh",
613
+ reasoning: true,
614
+ input: ["text", "image"],
615
+ cost: {
616
+ input: 0,
617
+ output: 0,
618
+ cacheRead: 0,
619
+ cacheWrite: 0,
620
+ },
621
+ contextWindow: 400000,
622
+ maxTokens: 128000,
623
+ } satisfies Model<"cursor-agent">,
624
+ "gpt-5.2-high": {
625
+ id: "gpt-5.2-high",
626
+ name: "GPT-5.2 High (Cursor)",
627
+ api: "cursor-agent",
628
+ provider: "cursor",
629
+ baseUrl: "https://api2.cursor.sh",
630
+ reasoning: true,
631
+ input: ["text", "image"],
632
+ cost: {
633
+ input: 0,
634
+ output: 0,
635
+ cacheRead: 0,
636
+ cacheWrite: 0,
637
+ },
638
+ contextWindow: 400000,
639
+ maxTokens: 128000,
640
+ } satisfies Model<"cursor-agent">,
641
+ "grok-code-fast-1": {
642
+ id: "grok-code-fast-1",
643
+ name: "Grok (Cursor)",
644
+ api: "cursor-agent",
645
+ provider: "cursor",
646
+ baseUrl: "https://api2.cursor.sh",
647
+ reasoning: false,
648
+ input: ["text"],
649
+ cost: {
650
+ input: 0,
651
+ output: 0,
652
+ cacheRead: 0,
653
+ cacheWrite: 0,
654
+ },
655
+ contextWindow: 32768,
656
+ maxTokens: 8192,
657
+ } satisfies Model<"cursor-agent">,
658
+ },
436
659
  "github-copilot": {
437
660
  "claude-haiku-4.5": {
438
661
  id: "claude-haiku-4.5",