opencommit 3.2.8 → 3.2.9
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/out/cli.cjs +382 -5
- package/package.json +1 -1
package/out/cli.cjs
CHANGED
|
@@ -47672,7 +47672,7 @@ function G3(t2, e3) {
|
|
|
47672
47672
|
// package.json
|
|
47673
47673
|
var package_default = {
|
|
47674
47674
|
name: "opencommit",
|
|
47675
|
-
version: "3.2.
|
|
47675
|
+
version: "3.2.9",
|
|
47676
47676
|
description: "Auto-generate impressive commits in 1 second. Killing lame commits with AI \u{1F92F}\u{1F52B}",
|
|
47677
47677
|
keywords: [
|
|
47678
47678
|
"git",
|
|
@@ -50371,7 +50371,338 @@ var MODEL_LIST = {
|
|
|
50371
50371
|
"mistral-moderation-2411",
|
|
50372
50372
|
"mistral-moderation-latest"
|
|
50373
50373
|
],
|
|
50374
|
-
deepseek: ["deepseek-chat", "deepseek-reasoner"]
|
|
50374
|
+
deepseek: ["deepseek-chat", "deepseek-reasoner"],
|
|
50375
|
+
// OpenRouter available models
|
|
50376
|
+
// input_modalities: 'text'
|
|
50377
|
+
// output_modalities: 'text'
|
|
50378
|
+
// https://openrouter.ai/api/v1/models
|
|
50379
|
+
openrouter: [
|
|
50380
|
+
"openai/gpt-4o-mini",
|
|
50381
|
+
// used by default
|
|
50382
|
+
"01-ai/yi-large",
|
|
50383
|
+
"aetherwiing/mn-starcannon-12b",
|
|
50384
|
+
"agentica-org/deepcoder-14b-preview:free",
|
|
50385
|
+
"ai21/jamba-1.6-large",
|
|
50386
|
+
"ai21/jamba-1.6-mini",
|
|
50387
|
+
"aion-labs/aion-1.0",
|
|
50388
|
+
"aion-labs/aion-1.0-mini",
|
|
50389
|
+
"aion-labs/aion-rp-llama-3.1-8b",
|
|
50390
|
+
"alfredpros/codellama-7b-instruct-solidity",
|
|
50391
|
+
"all-hands/openhands-lm-32b-v0.1",
|
|
50392
|
+
"alpindale/goliath-120b",
|
|
50393
|
+
"alpindale/magnum-72b",
|
|
50394
|
+
"amazon/nova-lite-v1",
|
|
50395
|
+
"amazon/nova-micro-v1",
|
|
50396
|
+
"amazon/nova-pro-v1",
|
|
50397
|
+
"anthracite-org/magnum-v2-72b",
|
|
50398
|
+
"anthracite-org/magnum-v4-72b",
|
|
50399
|
+
"anthropic/claude-2",
|
|
50400
|
+
"anthropic/claude-2.0",
|
|
50401
|
+
"anthropic/claude-2.0:beta",
|
|
50402
|
+
"anthropic/claude-2.1",
|
|
50403
|
+
"anthropic/claude-2.1:beta",
|
|
50404
|
+
"anthropic/claude-2:beta",
|
|
50405
|
+
"anthropic/claude-3-haiku",
|
|
50406
|
+
"anthropic/claude-3-haiku:beta",
|
|
50407
|
+
"anthropic/claude-3-opus",
|
|
50408
|
+
"anthropic/claude-3-opus:beta",
|
|
50409
|
+
"anthropic/claude-3-sonnet",
|
|
50410
|
+
"anthropic/claude-3-sonnet:beta",
|
|
50411
|
+
"anthropic/claude-3.5-haiku",
|
|
50412
|
+
"anthropic/claude-3.5-haiku-20241022",
|
|
50413
|
+
"anthropic/claude-3.5-haiku-20241022:beta",
|
|
50414
|
+
"anthropic/claude-3.5-haiku:beta",
|
|
50415
|
+
"anthropic/claude-3.5-sonnet",
|
|
50416
|
+
"anthropic/claude-3.5-sonnet-20240620",
|
|
50417
|
+
"anthropic/claude-3.5-sonnet-20240620:beta",
|
|
50418
|
+
"anthropic/claude-3.5-sonnet:beta",
|
|
50419
|
+
"anthropic/claude-3.7-sonnet",
|
|
50420
|
+
"anthropic/claude-3.7-sonnet:beta",
|
|
50421
|
+
"anthropic/claude-3.7-sonnet:thinking",
|
|
50422
|
+
"anthropic/claude-opus-4",
|
|
50423
|
+
"anthropic/claude-sonnet-4",
|
|
50424
|
+
"arcee-ai/arcee-blitz",
|
|
50425
|
+
"arcee-ai/caller-large",
|
|
50426
|
+
"arcee-ai/coder-large",
|
|
50427
|
+
"arcee-ai/maestro-reasoning",
|
|
50428
|
+
"arcee-ai/spotlight",
|
|
50429
|
+
"arcee-ai/virtuoso-large",
|
|
50430
|
+
"arcee-ai/virtuoso-medium-v2",
|
|
50431
|
+
"arliai/qwq-32b-arliai-rpr-v1:free",
|
|
50432
|
+
"cognitivecomputations/dolphin-mixtral-8x22b",
|
|
50433
|
+
"cognitivecomputations/dolphin3.0-mistral-24b:free",
|
|
50434
|
+
"cognitivecomputations/dolphin3.0-r1-mistral-24b:free",
|
|
50435
|
+
"cohere/command",
|
|
50436
|
+
"cohere/command-a",
|
|
50437
|
+
"cohere/command-r",
|
|
50438
|
+
"cohere/command-r-03-2024",
|
|
50439
|
+
"cohere/command-r-08-2024",
|
|
50440
|
+
"cohere/command-r-plus",
|
|
50441
|
+
"cohere/command-r-plus-04-2024",
|
|
50442
|
+
"cohere/command-r-plus-08-2024",
|
|
50443
|
+
"cohere/command-r7b-12-2024",
|
|
50444
|
+
"deepseek/deepseek-chat",
|
|
50445
|
+
"deepseek/deepseek-chat-v3-0324",
|
|
50446
|
+
"deepseek/deepseek-chat-v3-0324:free",
|
|
50447
|
+
"deepseek/deepseek-chat:free",
|
|
50448
|
+
"deepseek/deepseek-prover-v2",
|
|
50449
|
+
"deepseek/deepseek-prover-v2:free",
|
|
50450
|
+
"deepseek/deepseek-r1",
|
|
50451
|
+
"deepseek/deepseek-r1-0528",
|
|
50452
|
+
"deepseek/deepseek-r1-0528-qwen3-8b",
|
|
50453
|
+
"deepseek/deepseek-r1-0528-qwen3-8b:free",
|
|
50454
|
+
"deepseek/deepseek-r1-0528:free",
|
|
50455
|
+
"deepseek/deepseek-r1-distill-llama-70b",
|
|
50456
|
+
"deepseek/deepseek-r1-distill-llama-70b:free",
|
|
50457
|
+
"deepseek/deepseek-r1-distill-llama-8b",
|
|
50458
|
+
"deepseek/deepseek-r1-distill-qwen-1.5b",
|
|
50459
|
+
"deepseek/deepseek-r1-distill-qwen-14b",
|
|
50460
|
+
"deepseek/deepseek-r1-distill-qwen-14b:free",
|
|
50461
|
+
"deepseek/deepseek-r1-distill-qwen-32b",
|
|
50462
|
+
"deepseek/deepseek-r1-distill-qwen-32b:free",
|
|
50463
|
+
"deepseek/deepseek-r1-distill-qwen-7b",
|
|
50464
|
+
"deepseek/deepseek-r1-zero:free",
|
|
50465
|
+
"deepseek/deepseek-r1:free",
|
|
50466
|
+
"deepseek/deepseek-v3-base:free",
|
|
50467
|
+
"eleutherai/llemma_7b",
|
|
50468
|
+
"eva-unit-01/eva-llama-3.33-70b",
|
|
50469
|
+
"eva-unit-01/eva-qwen-2.5-32b",
|
|
50470
|
+
"eva-unit-01/eva-qwen-2.5-72b",
|
|
50471
|
+
"featherless/qwerky-72b:free",
|
|
50472
|
+
"google/gemini-2.0-flash-001",
|
|
50473
|
+
"google/gemini-2.0-flash-exp:free",
|
|
50474
|
+
"google/gemini-2.0-flash-lite-001",
|
|
50475
|
+
"google/gemini-2.5-flash-preview",
|
|
50476
|
+
"google/gemini-2.5-flash-preview-05-20",
|
|
50477
|
+
"google/gemini-2.5-flash-preview-05-20:thinking",
|
|
50478
|
+
"google/gemini-2.5-flash-preview:thinking",
|
|
50479
|
+
"google/gemini-2.5-pro-exp-03-25",
|
|
50480
|
+
"google/gemini-2.5-pro-preview",
|
|
50481
|
+
"google/gemini-2.5-pro-preview-05-06",
|
|
50482
|
+
"google/gemini-flash-1.5",
|
|
50483
|
+
"google/gemini-flash-1.5-8b",
|
|
50484
|
+
"google/gemini-pro-1.5",
|
|
50485
|
+
"google/gemma-2-27b-it",
|
|
50486
|
+
"google/gemma-2-9b-it",
|
|
50487
|
+
"google/gemma-2-9b-it:free",
|
|
50488
|
+
"google/gemma-3-12b-it",
|
|
50489
|
+
"google/gemma-3-12b-it:free",
|
|
50490
|
+
"google/gemma-3-1b-it:free",
|
|
50491
|
+
"google/gemma-3-27b-it",
|
|
50492
|
+
"google/gemma-3-27b-it:free",
|
|
50493
|
+
"google/gemma-3-4b-it",
|
|
50494
|
+
"google/gemma-3-4b-it:free",
|
|
50495
|
+
"google/gemma-3n-e4b-it:free",
|
|
50496
|
+
"gryphe/mythomax-l2-13b",
|
|
50497
|
+
"inception/mercury-coder-small-beta",
|
|
50498
|
+
"infermatic/mn-inferor-12b",
|
|
50499
|
+
"inflection/inflection-3-pi",
|
|
50500
|
+
"inflection/inflection-3-productivity",
|
|
50501
|
+
"liquid/lfm-3b",
|
|
50502
|
+
"liquid/lfm-40b",
|
|
50503
|
+
"liquid/lfm-7b",
|
|
50504
|
+
"mancer/weaver",
|
|
50505
|
+
"meta-llama/llama-2-70b-chat",
|
|
50506
|
+
"meta-llama/llama-3-70b-instruct",
|
|
50507
|
+
"meta-llama/llama-3-8b-instruct",
|
|
50508
|
+
"meta-llama/llama-3.1-405b",
|
|
50509
|
+
"meta-llama/llama-3.1-405b-instruct",
|
|
50510
|
+
"meta-llama/llama-3.1-405b:free",
|
|
50511
|
+
"meta-llama/llama-3.1-70b-instruct",
|
|
50512
|
+
"meta-llama/llama-3.1-8b-instruct",
|
|
50513
|
+
"meta-llama/llama-3.1-8b-instruct:free",
|
|
50514
|
+
"meta-llama/llama-3.2-11b-vision-instruct",
|
|
50515
|
+
"meta-llama/llama-3.2-11b-vision-instruct:free",
|
|
50516
|
+
"meta-llama/llama-3.2-1b-instruct",
|
|
50517
|
+
"meta-llama/llama-3.2-1b-instruct:free",
|
|
50518
|
+
"meta-llama/llama-3.2-3b-instruct",
|
|
50519
|
+
"meta-llama/llama-3.2-3b-instruct:free",
|
|
50520
|
+
"meta-llama/llama-3.2-90b-vision-instruct",
|
|
50521
|
+
"meta-llama/llama-3.3-70b-instruct",
|
|
50522
|
+
"meta-llama/llama-3.3-70b-instruct:free",
|
|
50523
|
+
"meta-llama/llama-3.3-8b-instruct:free",
|
|
50524
|
+
"meta-llama/llama-4-maverick",
|
|
50525
|
+
"meta-llama/llama-4-maverick:free",
|
|
50526
|
+
"meta-llama/llama-4-scout",
|
|
50527
|
+
"meta-llama/llama-4-scout:free",
|
|
50528
|
+
"meta-llama/llama-guard-2-8b",
|
|
50529
|
+
"meta-llama/llama-guard-3-8b",
|
|
50530
|
+
"meta-llama/llama-guard-4-12b",
|
|
50531
|
+
"microsoft/mai-ds-r1:free",
|
|
50532
|
+
"microsoft/phi-3-medium-128k-instruct",
|
|
50533
|
+
"microsoft/phi-3-mini-128k-instruct",
|
|
50534
|
+
"microsoft/phi-3.5-mini-128k-instruct",
|
|
50535
|
+
"microsoft/phi-4",
|
|
50536
|
+
"microsoft/phi-4-multimodal-instruct",
|
|
50537
|
+
"microsoft/phi-4-reasoning-plus",
|
|
50538
|
+
"microsoft/phi-4-reasoning-plus:free",
|
|
50539
|
+
"microsoft/phi-4-reasoning:free",
|
|
50540
|
+
"microsoft/wizardlm-2-8x22b",
|
|
50541
|
+
"minimax/minimax-01",
|
|
50542
|
+
"mistralai/codestral-2501",
|
|
50543
|
+
"mistralai/devstral-small",
|
|
50544
|
+
"mistralai/devstral-small:free",
|
|
50545
|
+
"mistralai/magistral-medium-2506",
|
|
50546
|
+
"mistralai/magistral-medium-2506:thinking",
|
|
50547
|
+
"mistralai/magistral-small-2506",
|
|
50548
|
+
"mistralai/ministral-3b",
|
|
50549
|
+
"mistralai/ministral-8b",
|
|
50550
|
+
"mistralai/mistral-7b-instruct",
|
|
50551
|
+
"mistralai/mistral-7b-instruct-v0.1",
|
|
50552
|
+
"mistralai/mistral-7b-instruct-v0.2",
|
|
50553
|
+
"mistralai/mistral-7b-instruct-v0.3",
|
|
50554
|
+
"mistralai/mistral-7b-instruct:free",
|
|
50555
|
+
"mistralai/mistral-large",
|
|
50556
|
+
"mistralai/mistral-large-2407",
|
|
50557
|
+
"mistralai/mistral-large-2411",
|
|
50558
|
+
"mistralai/mistral-medium",
|
|
50559
|
+
"mistralai/mistral-medium-3",
|
|
50560
|
+
"mistralai/mistral-nemo",
|
|
50561
|
+
"mistralai/mistral-nemo:free",
|
|
50562
|
+
"mistralai/mistral-saba",
|
|
50563
|
+
"mistralai/mistral-small",
|
|
50564
|
+
"mistralai/mistral-small-24b-instruct-2501",
|
|
50565
|
+
"mistralai/mistral-small-24b-instruct-2501:free",
|
|
50566
|
+
"mistralai/mistral-small-3.1-24b-instruct",
|
|
50567
|
+
"mistralai/mistral-small-3.1-24b-instruct:free",
|
|
50568
|
+
"mistralai/mistral-tiny",
|
|
50569
|
+
"mistralai/mixtral-8x22b-instruct",
|
|
50570
|
+
"mistralai/mixtral-8x7b-instruct",
|
|
50571
|
+
"mistralai/pixtral-12b",
|
|
50572
|
+
"mistralai/pixtral-large-2411",
|
|
50573
|
+
"moonshotai/kimi-vl-a3b-thinking:free",
|
|
50574
|
+
"moonshotai/moonlight-16b-a3b-instruct:free",
|
|
50575
|
+
"neversleep/llama-3-lumimaid-70b",
|
|
50576
|
+
"neversleep/llama-3-lumimaid-8b",
|
|
50577
|
+
"neversleep/llama-3.1-lumimaid-70b",
|
|
50578
|
+
"neversleep/llama-3.1-lumimaid-8b",
|
|
50579
|
+
"neversleep/noromaid-20b",
|
|
50580
|
+
"nothingiisreal/mn-celeste-12b",
|
|
50581
|
+
"nousresearch/deephermes-3-llama-3-8b-preview:free",
|
|
50582
|
+
"nousresearch/deephermes-3-mistral-24b-preview:free",
|
|
50583
|
+
"nousresearch/hermes-2-pro-llama-3-8b",
|
|
50584
|
+
"nousresearch/hermes-3-llama-3.1-405b",
|
|
50585
|
+
"nousresearch/hermes-3-llama-3.1-70b",
|
|
50586
|
+
"nousresearch/nous-hermes-2-mixtral-8x7b-dpo",
|
|
50587
|
+
"nvidia/llama-3.1-nemotron-70b-instruct",
|
|
50588
|
+
"nvidia/llama-3.1-nemotron-ultra-253b-v1",
|
|
50589
|
+
"nvidia/llama-3.1-nemotron-ultra-253b-v1:free",
|
|
50590
|
+
"nvidia/llama-3.3-nemotron-super-49b-v1",
|
|
50591
|
+
"nvidia/llama-3.3-nemotron-super-49b-v1:free",
|
|
50592
|
+
"open-r1/olympiccoder-32b:free",
|
|
50593
|
+
"openai/chatgpt-4o-latest",
|
|
50594
|
+
"openai/codex-mini",
|
|
50595
|
+
"openai/gpt-3.5-turbo",
|
|
50596
|
+
"openai/gpt-3.5-turbo-0125",
|
|
50597
|
+
"openai/gpt-3.5-turbo-0613",
|
|
50598
|
+
"openai/gpt-3.5-turbo-1106",
|
|
50599
|
+
"openai/gpt-3.5-turbo-16k",
|
|
50600
|
+
"openai/gpt-3.5-turbo-instruct",
|
|
50601
|
+
"openai/gpt-4",
|
|
50602
|
+
"openai/gpt-4-0314",
|
|
50603
|
+
"openai/gpt-4-1106-preview",
|
|
50604
|
+
"openai/gpt-4-turbo",
|
|
50605
|
+
"openai/gpt-4-turbo-preview",
|
|
50606
|
+
"openai/gpt-4.1",
|
|
50607
|
+
"openai/gpt-4.1-mini",
|
|
50608
|
+
"openai/gpt-4.1-nano",
|
|
50609
|
+
"openai/gpt-4.5-preview",
|
|
50610
|
+
"openai/gpt-4o",
|
|
50611
|
+
"openai/gpt-4o-2024-05-13",
|
|
50612
|
+
"openai/gpt-4o-2024-08-06",
|
|
50613
|
+
"openai/gpt-4o-2024-11-20",
|
|
50614
|
+
"openai/gpt-4o-mini-2024-07-18",
|
|
50615
|
+
"openai/gpt-4o-mini-search-preview",
|
|
50616
|
+
"openai/gpt-4o-search-preview",
|
|
50617
|
+
"openai/gpt-4o:extended",
|
|
50618
|
+
"openai/o1",
|
|
50619
|
+
"openai/o1-mini",
|
|
50620
|
+
"openai/o1-mini-2024-09-12",
|
|
50621
|
+
"openai/o1-preview",
|
|
50622
|
+
"openai/o1-preview-2024-09-12",
|
|
50623
|
+
"openai/o1-pro",
|
|
50624
|
+
"openai/o3",
|
|
50625
|
+
"openai/o3-mini",
|
|
50626
|
+
"openai/o3-mini-high",
|
|
50627
|
+
"openai/o3-pro",
|
|
50628
|
+
"openai/o4-mini",
|
|
50629
|
+
"openai/o4-mini-high",
|
|
50630
|
+
"opengvlab/internvl3-14b:free",
|
|
50631
|
+
"opengvlab/internvl3-2b:free",
|
|
50632
|
+
"openrouter/auto",
|
|
50633
|
+
"perplexity/llama-3.1-sonar-large-128k-online",
|
|
50634
|
+
"perplexity/llama-3.1-sonar-small-128k-online",
|
|
50635
|
+
"perplexity/r1-1776",
|
|
50636
|
+
"perplexity/sonar",
|
|
50637
|
+
"perplexity/sonar-deep-research",
|
|
50638
|
+
"perplexity/sonar-pro",
|
|
50639
|
+
"perplexity/sonar-reasoning",
|
|
50640
|
+
"perplexity/sonar-reasoning-pro",
|
|
50641
|
+
"pygmalionai/mythalion-13b",
|
|
50642
|
+
"qwen/qwen-2-72b-instruct",
|
|
50643
|
+
"qwen/qwen-2.5-72b-instruct",
|
|
50644
|
+
"qwen/qwen-2.5-72b-instruct:free",
|
|
50645
|
+
"qwen/qwen-2.5-7b-instruct",
|
|
50646
|
+
"qwen/qwen-2.5-7b-instruct:free",
|
|
50647
|
+
"qwen/qwen-2.5-coder-32b-instruct",
|
|
50648
|
+
"qwen/qwen-2.5-coder-32b-instruct:free",
|
|
50649
|
+
"qwen/qwen-2.5-vl-7b-instruct",
|
|
50650
|
+
"qwen/qwen-2.5-vl-7b-instruct:free",
|
|
50651
|
+
"qwen/qwen-max",
|
|
50652
|
+
"qwen/qwen-plus",
|
|
50653
|
+
"qwen/qwen-turbo",
|
|
50654
|
+
"qwen/qwen-vl-max",
|
|
50655
|
+
"qwen/qwen-vl-plus",
|
|
50656
|
+
"qwen/qwen2.5-vl-32b-instruct",
|
|
50657
|
+
"qwen/qwen2.5-vl-32b-instruct:free",
|
|
50658
|
+
"qwen/qwen2.5-vl-3b-instruct:free",
|
|
50659
|
+
"qwen/qwen2.5-vl-72b-instruct",
|
|
50660
|
+
"qwen/qwen2.5-vl-72b-instruct:free",
|
|
50661
|
+
"qwen/qwen3-14b",
|
|
50662
|
+
"qwen/qwen3-14b:free",
|
|
50663
|
+
"qwen/qwen3-235b-a22b",
|
|
50664
|
+
"qwen/qwen3-235b-a22b:free",
|
|
50665
|
+
"qwen/qwen3-30b-a3b",
|
|
50666
|
+
"qwen/qwen3-30b-a3b:free",
|
|
50667
|
+
"qwen/qwen3-32b",
|
|
50668
|
+
"qwen/qwen3-32b:free",
|
|
50669
|
+
"qwen/qwen3-8b",
|
|
50670
|
+
"qwen/qwen3-8b:free",
|
|
50671
|
+
"qwen/qwq-32b",
|
|
50672
|
+
"qwen/qwq-32b-preview",
|
|
50673
|
+
"qwen/qwq-32b:free",
|
|
50674
|
+
"raifle/sorcererlm-8x22b",
|
|
50675
|
+
"rekaai/reka-flash-3:free",
|
|
50676
|
+
"sao10k/fimbulvetr-11b-v2",
|
|
50677
|
+
"sao10k/l3-euryale-70b",
|
|
50678
|
+
"sao10k/l3-lunaris-8b",
|
|
50679
|
+
"sao10k/l3.1-euryale-70b",
|
|
50680
|
+
"sao10k/l3.3-euryale-70b",
|
|
50681
|
+
"sarvamai/sarvam-m:free",
|
|
50682
|
+
"scb10x/llama3.1-typhoon2-70b-instruct",
|
|
50683
|
+
"sentientagi/dobby-mini-unhinged-plus-llama-3.1-8b",
|
|
50684
|
+
"shisa-ai/shisa-v2-llama3.3-70b:free",
|
|
50685
|
+
"sophosympatheia/midnight-rose-70b",
|
|
50686
|
+
"thedrummer/anubis-pro-105b-v1",
|
|
50687
|
+
"thedrummer/rocinante-12b",
|
|
50688
|
+
"thedrummer/skyfall-36b-v2",
|
|
50689
|
+
"thedrummer/unslopnemo-12b",
|
|
50690
|
+
"thedrummer/valkyrie-49b-v1",
|
|
50691
|
+
"thudm/glm-4-32b",
|
|
50692
|
+
"thudm/glm-4-32b:free",
|
|
50693
|
+
"thudm/glm-z1-32b",
|
|
50694
|
+
"thudm/glm-z1-32b:free",
|
|
50695
|
+
"thudm/glm-z1-rumination-32b",
|
|
50696
|
+
"tngtech/deepseek-r1t-chimera:free",
|
|
50697
|
+
"undi95/remm-slerp-l2-13b",
|
|
50698
|
+
"undi95/toppy-m-7b",
|
|
50699
|
+
"x-ai/grok-2-1212",
|
|
50700
|
+
"x-ai/grok-2-vision-1212",
|
|
50701
|
+
"x-ai/grok-3-beta",
|
|
50702
|
+
"x-ai/grok-3-mini-beta",
|
|
50703
|
+
"x-ai/grok-beta",
|
|
50704
|
+
"x-ai/grok-vision-beta"
|
|
50705
|
+
]
|
|
50375
50706
|
};
|
|
50376
50707
|
var getDefaultModel = (provider) => {
|
|
50377
50708
|
switch (provider) {
|
|
@@ -50389,6 +50720,8 @@ var getDefaultModel = (provider) => {
|
|
|
50389
50720
|
return MODEL_LIST.mistral[0];
|
|
50390
50721
|
case "deepseek":
|
|
50391
50722
|
return MODEL_LIST.deepseek[0];
|
|
50723
|
+
case "openrouter":
|
|
50724
|
+
return MODEL_LIST.openrouter[0];
|
|
50392
50725
|
default:
|
|
50393
50726
|
return MODEL_LIST.openai[0];
|
|
50394
50727
|
}
|
|
@@ -50542,7 +50875,8 @@ var configValidators = {
|
|
|
50542
50875
|
"test",
|
|
50543
50876
|
"flowise",
|
|
50544
50877
|
"groq",
|
|
50545
|
-
"deepseek"
|
|
50878
|
+
"deepseek",
|
|
50879
|
+
"openrouter"
|
|
50546
50880
|
].includes(value) || value.startsWith("ollama"),
|
|
50547
50881
|
`${value} is not supported yet, use 'ollama', 'mlx', 'anthropic', 'azure', 'gemini', 'flowise', 'mistral', 'deepseek' or 'openai' (default)`
|
|
50548
50882
|
);
|
|
@@ -50587,6 +50921,7 @@ var OCO_AI_PROVIDER_ENUM = /* @__PURE__ */ ((OCO_AI_PROVIDER_ENUM2) => {
|
|
|
50587
50921
|
OCO_AI_PROVIDER_ENUM2["MISTRAL"] = "mistral";
|
|
50588
50922
|
OCO_AI_PROVIDER_ENUM2["MLX"] = "mlx";
|
|
50589
50923
|
OCO_AI_PROVIDER_ENUM2["DEEPSEEK"] = "deepseek";
|
|
50924
|
+
OCO_AI_PROVIDER_ENUM2["OPENROUTER"] = "openrouter";
|
|
50590
50925
|
return OCO_AI_PROVIDER_ENUM2;
|
|
50591
50926
|
})(OCO_AI_PROVIDER_ENUM || {});
|
|
50592
50927
|
var defaultConfigPath = (0, import_path.join)((0, import_os.homedir)(), ".opencommit");
|
|
@@ -50874,7 +51209,11 @@ ${key}:`));
|
|
|
50874
51209
|
}
|
|
50875
51210
|
}
|
|
50876
51211
|
}
|
|
50877
|
-
console.log(
|
|
51212
|
+
console.log(
|
|
51213
|
+
source_default.yellow(
|
|
51214
|
+
'\nUse "oco config describe [PARAMETER]" to see accepted values and more details for a specific config parameter.'
|
|
51215
|
+
)
|
|
51216
|
+
);
|
|
50878
51217
|
}
|
|
50879
51218
|
var configCommand = G3(
|
|
50880
51219
|
{
|
|
@@ -66182,6 +66521,40 @@ var DeepseekEngine = class extends OpenAiEngine {
|
|
|
66182
66521
|
}
|
|
66183
66522
|
};
|
|
66184
66523
|
|
|
66524
|
+
// src/engine/openrouter.ts
|
|
66525
|
+
var OpenRouterEngine = class {
|
|
66526
|
+
constructor(config7) {
|
|
66527
|
+
this.config = config7;
|
|
66528
|
+
this.generateCommitMessage = async (messages) => {
|
|
66529
|
+
try {
|
|
66530
|
+
const response = await this.client.post("", {
|
|
66531
|
+
model: this.config.model,
|
|
66532
|
+
messages
|
|
66533
|
+
});
|
|
66534
|
+
const message = response.data.choices[0].message;
|
|
66535
|
+
let content = message?.content;
|
|
66536
|
+
return removeContentTags(content, "think");
|
|
66537
|
+
} catch (error) {
|
|
66538
|
+
const err = error;
|
|
66539
|
+
if (axios_default.isAxiosError(error) && error.response?.status === 401) {
|
|
66540
|
+
const openRouterError = error.response.data.error;
|
|
66541
|
+
if (openRouterError) throw new Error(openRouterError.message);
|
|
66542
|
+
}
|
|
66543
|
+
throw err;
|
|
66544
|
+
}
|
|
66545
|
+
};
|
|
66546
|
+
this.client = axios_default.create({
|
|
66547
|
+
baseURL: "https://openrouter.ai/api/v1/chat/completions",
|
|
66548
|
+
headers: {
|
|
66549
|
+
Authorization: `Bearer ${config7.apiKey}`,
|
|
66550
|
+
"HTTP-Referer": "https://github.com/di-sukharev/opencommit",
|
|
66551
|
+
"X-Title": "OpenCommit",
|
|
66552
|
+
"Content-Type": "application/json"
|
|
66553
|
+
}
|
|
66554
|
+
});
|
|
66555
|
+
}
|
|
66556
|
+
};
|
|
66557
|
+
|
|
66185
66558
|
// src/utils/engine.ts
|
|
66186
66559
|
function parseCustomHeaders(headers) {
|
|
66187
66560
|
let parsedHeaders = {};
|
|
@@ -66195,7 +66568,9 @@ function parseCustomHeaders(headers) {
|
|
|
66195
66568
|
parsedHeaders = JSON.parse(headers);
|
|
66196
66569
|
}
|
|
66197
66570
|
} catch (error) {
|
|
66198
|
-
console.warn(
|
|
66571
|
+
console.warn(
|
|
66572
|
+
"Invalid OCO_API_CUSTOM_HEADERS format, ignoring custom headers"
|
|
66573
|
+
);
|
|
66199
66574
|
}
|
|
66200
66575
|
return parsedHeaders;
|
|
66201
66576
|
}
|
|
@@ -66232,6 +66607,8 @@ function getEngine() {
|
|
|
66232
66607
|
return new MLXEngine(DEFAULT_CONFIG2);
|
|
66233
66608
|
case "deepseek" /* DEEPSEEK */:
|
|
66234
66609
|
return new DeepseekEngine(DEFAULT_CONFIG2);
|
|
66610
|
+
case "openrouter" /* OPENROUTER */:
|
|
66611
|
+
return new OpenRouterEngine(DEFAULT_CONFIG2);
|
|
66235
66612
|
default:
|
|
66236
66613
|
return new OpenAiEngine(DEFAULT_CONFIG2);
|
|
66237
66614
|
}
|