git-coco 0.18.0 → 0.18.1

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/dist/index.d.ts CHANGED
@@ -11,9 +11,10 @@ import { Color } from 'chalk';
11
11
  import { TiktokenModel as TiktokenModel$1 } from 'tiktoken';
12
12
 
13
13
  type LLMProvider = 'openai' | 'ollama' | 'anthropic';
14
+ type OpenAIModel = TiktokenModel | 'gpt-4o-mini' | 'gpt-4o' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano';
14
15
  type AnthropicModel = 'claude-sonnet-4-0' | 'claude-3-7-sonnet-latest' | 'claude-3-5-haiku-latest' | 'claude-3-5-sonnet-latest' | 'claude-3-5-sonnet-20241022' | 'claude-3-5-sonnet-20240620' | 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307';
15
16
  type OllamaModel = 'deepseek-r1:1.5b' | 'deepseek-r1:8b' | 'deepseek-r1:32b' | 'codegemma:2b' | 'codegemma:7b-code' | 'codegemma' | 'codellama:13b' | 'codellama:34b' | 'codellama:70b' | 'codellama:7b' | 'codellama:instruct' | 'codellama:latest' | 'codellama' | 'gemma:2b' | 'gemma:7b' | 'gemma:latest' | 'gemma' | 'llama2:13b' | 'llama2:70b' | 'llama2:chat' | 'llama2:latest' | 'llama2:text' | 'llama2' | 'llama3:70b-text' | 'llama3:70b' | 'llama3:latest' | 'llama3:text' | 'llama3.1:70b' | 'llama3.1:8b' | 'llama3.1:latest' | 'llama3.2' | 'llama3.2:latest' | 'llama3.2:1b' | 'llama3.2:3b' | 'llama3' | 'llava-llama3:latest' | 'dolphin-llama3:latest' | 'dolphin-llama3:8b' | 'dolphin-llama3:70b' | 'mistral:7b' | 'mistral:latest' | 'mistral:text' | 'mistral' | 'phi3:14b' | 'phi3:3.8b' | 'phi3:instruct' | 'phi3:medium-128k' | 'phi3:medium-4k' | 'phi3:medium' | 'phi3' | 'qwen2:0.5b' | 'qwen2:1.5b' | 'qwen2:72b-text' | 'qwen2:72b' | 'qwen2' | 'qwen2.5-coder:latest' | 'qwen2.5-coder:0.5b' | 'qwen2.5-coder:1.5b' | 'qwen2.5-coder:3b' | 'qwen2.5-coder:7b' | 'qwen2.5-coder:14b' | 'qwen2.5-coder:32b';
16
- type LLMModel = TiktokenModel | OllamaModel | AnthropicModel;
17
+ type LLMModel = OpenAIModel | OllamaModel | AnthropicModel;
17
18
  type BaseLLMService = {
18
19
  provider: LLMProvider;
19
20
  model: LLMModel;
@@ -68,7 +69,7 @@ type OpenAIFields = Partial<OpenAIInput> & BaseLLMParams;
68
69
  type OllamaFields = Partial<OllamaInput> & BaseLLMParams;
69
70
  type OpenAILLMService = BaseLLMService & {
70
71
  provider: 'openai';
71
- model: TiktokenModel;
72
+ model: OpenAIModel;
72
73
  fields?: OpenAIFields;
73
74
  };
74
75
  type OllamaLLMService = BaseLLMService & {
@@ -46,7 +46,7 @@ import * as readline from 'readline';
46
46
  /**
47
47
  * Current build version from package.json
48
48
  */
49
- const BUILD_VERSION = "0.18.0";
49
+ const BUILD_VERSION = "0.18.1";
50
50
 
51
51
  const isInteractive = (config) => {
52
52
  return config?.mode === 'interactive' || !!config?.interactive;
@@ -345,7 +345,7 @@ function getDefaultServiceApiKey(config) {
345
345
  }
346
346
  const DEFAULT_OPENAI_LLM_SERVICE = {
347
347
  provider: 'openai',
348
- model: 'gpt-4o',
348
+ model: 'gpt-4o-mini',
349
349
  tokenLimit: 2024,
350
350
  temperature: 0.32,
351
351
  authentication: {
@@ -619,21 +619,21 @@ function loadGitConfig(config) {
619
619
  let service = config.service;
620
620
  if (gitConfigParsed.coco) {
621
621
  service = {
622
- provider: gitConfigParsed.coco?.['service.provider'],
623
- model: gitConfigParsed.coco?.['service.model'],
622
+ provider: gitConfigParsed.coco?.serviceProvider,
623
+ model: gitConfigParsed.coco?.serviceModel,
624
624
  authentication: {
625
625
  type: 'APIKey',
626
626
  credentials: {
627
- apiKey: gitConfigParsed.coco?.['service.apiKey'],
627
+ apiKey: gitConfigParsed.coco?.serviceApiKey,
628
628
  },
629
629
  },
630
630
  requestOptions: {
631
- timeout: Number(gitConfigParsed.coco?.['service.requestOptions.timeout']),
632
- maxRetries: Number(gitConfigParsed.coco?.['service.requestOptions.maxRetries']),
631
+ timeout: Number(gitConfigParsed.coco?.serviceRequestOptionsTimeout),
632
+ maxRetries: Number(gitConfigParsed.coco?.serviceRequestOptionsMaxRetries),
633
633
  },
634
- endpoint: gitConfigParsed.coco?.['service.endpoint'],
635
- fields: gitConfigParsed.coco?.['service.fields']
636
- ? JSON.parse(gitConfigParsed.coco?.['service.fields'])
634
+ endpoint: gitConfigParsed.coco?.serviceEndpoint,
635
+ fields: gitConfigParsed.coco?.serviceFields
636
+ ? JSON.parse(gitConfigParsed.coco?.serviceFields)
637
637
  : undefined,
638
638
  };
639
639
  }
@@ -662,25 +662,25 @@ const appendToGitConfig = async (filePath, config) => {
662
662
  const value = config[key];
663
663
  if (key === 'service') {
664
664
  const service = value;
665
- contentLines.push(`\tservice.provider = ${service.provider}`);
666
- contentLines.push(`\tservice.model = ${service.model}`);
665
+ contentLines.push(` serviceProvider = ${service.provider}`);
666
+ contentLines.push(` serviceModel = ${service.model}`);
667
667
  if (service.authentication.type === 'APIKey') {
668
- contentLines.push(`\tservice.apiKey = ${service.authentication.credentials.apiKey}`);
668
+ contentLines.push(` serviceApiKey = ${service.authentication.credentials.apiKey}`);
669
669
  }
670
670
  if (service.requestOptions?.timeout) {
671
- contentLines.push(`\tservice.requestOptions.timeout = ${service.requestOptions.timeout}`);
671
+ contentLines.push(` serviceRequestOptionsTimeout = ${service.requestOptions.timeout}`);
672
672
  }
673
673
  if (service.requestOptions?.maxRetries) {
674
- contentLines.push(`\tservice.requestOptions.maxRetries = ${service.requestOptions.maxRetries}`);
674
+ contentLines.push(` serviceRequestOptionsMaxRetries = ${service.requestOptions.maxRetries}`);
675
675
  }
676
676
  if (service.provider === 'ollama') {
677
677
  const ollamaService = service;
678
678
  if (ollamaService.endpoint) {
679
- contentLines.push(` service.endpoint = ${ollamaService.endpoint}`);
679
+ contentLines.push(` serviceEndpoint = ${ollamaService.endpoint}`);
680
680
  }
681
681
  }
682
682
  if (service.fields) {
683
- contentLines.push(`\tservice.fields = ${JSON.stringify(service.fields)}`);
683
+ contentLines.push(` serviceFields = ${JSON.stringify(service.fields)}`);
684
684
  }
685
685
  }
686
686
  else if (typeof value === 'string' && value.includes('\n')) {
@@ -1135,65 +1135,7 @@ const schema$1 = {
1135
1135
  "LLMModel": {
1136
1136
  "anyOf": [
1137
1137
  {
1138
- "type": "string",
1139
- "enum": [
1140
- "davinci-002",
1141
- "babbage-002",
1142
- "text-davinci-003",
1143
- "text-davinci-002",
1144
- "text-davinci-001",
1145
- "text-curie-001",
1146
- "text-babbage-001",
1147
- "text-ada-001",
1148
- "davinci",
1149
- "curie",
1150
- "babbage",
1151
- "ada",
1152
- "code-davinci-002",
1153
- "code-davinci-001",
1154
- "code-cushman-002",
1155
- "code-cushman-001",
1156
- "davinci-codex",
1157
- "cushman-codex",
1158
- "text-davinci-edit-001",
1159
- "code-davinci-edit-001",
1160
- "text-embedding-ada-002",
1161
- "text-similarity-davinci-001",
1162
- "text-similarity-curie-001",
1163
- "text-similarity-babbage-001",
1164
- "text-similarity-ada-001",
1165
- "text-search-davinci-doc-001",
1166
- "text-search-curie-doc-001",
1167
- "text-search-babbage-doc-001",
1168
- "text-search-ada-doc-001",
1169
- "code-search-babbage-code-001",
1170
- "code-search-ada-code-001",
1171
- "gpt2",
1172
- "gpt-3.5-turbo",
1173
- "gpt-35-turbo",
1174
- "gpt-3.5-turbo-0301",
1175
- "gpt-3.5-turbo-0613",
1176
- "gpt-3.5-turbo-1106",
1177
- "gpt-3.5-turbo-0125",
1178
- "gpt-3.5-turbo-16k",
1179
- "gpt-3.5-turbo-16k-0613",
1180
- "gpt-3.5-turbo-instruct",
1181
- "gpt-3.5-turbo-instruct-0914",
1182
- "gpt-4",
1183
- "gpt-4-0314",
1184
- "gpt-4-0613",
1185
- "gpt-4-32k",
1186
- "gpt-4-32k-0314",
1187
- "gpt-4-32k-0613",
1188
- "gpt-4-turbo",
1189
- "gpt-4-turbo-2024-04-09",
1190
- "gpt-4-turbo-preview",
1191
- "gpt-4-1106-preview",
1192
- "gpt-4-0125-preview",
1193
- "gpt-4-vision-preview",
1194
- "gpt-4o",
1195
- "gpt-4o-2024-05-13"
1196
- ]
1138
+ "$ref": "#/definitions/OpenAIModel"
1197
1139
  },
1198
1140
  {
1199
1141
  "$ref": "#/definitions/OllamaModel"
@@ -1203,6 +1145,71 @@ const schema$1 = {
1203
1145
  }
1204
1146
  ]
1205
1147
  },
1148
+ "OpenAIModel": {
1149
+ "type": "string",
1150
+ "enum": [
1151
+ "davinci-002",
1152
+ "babbage-002",
1153
+ "text-davinci-003",
1154
+ "text-davinci-002",
1155
+ "text-davinci-001",
1156
+ "text-curie-001",
1157
+ "text-babbage-001",
1158
+ "text-ada-001",
1159
+ "davinci",
1160
+ "curie",
1161
+ "babbage",
1162
+ "ada",
1163
+ "code-davinci-002",
1164
+ "code-davinci-001",
1165
+ "code-cushman-002",
1166
+ "code-cushman-001",
1167
+ "davinci-codex",
1168
+ "cushman-codex",
1169
+ "text-davinci-edit-001",
1170
+ "code-davinci-edit-001",
1171
+ "text-embedding-ada-002",
1172
+ "text-similarity-davinci-001",
1173
+ "text-similarity-curie-001",
1174
+ "text-similarity-babbage-001",
1175
+ "text-similarity-ada-001",
1176
+ "text-search-davinci-doc-001",
1177
+ "text-search-curie-doc-001",
1178
+ "text-search-babbage-doc-001",
1179
+ "text-search-ada-doc-001",
1180
+ "code-search-babbage-code-001",
1181
+ "code-search-ada-code-001",
1182
+ "gpt2",
1183
+ "gpt-3.5-turbo",
1184
+ "gpt-35-turbo",
1185
+ "gpt-3.5-turbo-0301",
1186
+ "gpt-3.5-turbo-0613",
1187
+ "gpt-3.5-turbo-1106",
1188
+ "gpt-3.5-turbo-0125",
1189
+ "gpt-3.5-turbo-16k",
1190
+ "gpt-3.5-turbo-16k-0613",
1191
+ "gpt-3.5-turbo-instruct",
1192
+ "gpt-3.5-turbo-instruct-0914",
1193
+ "gpt-4",
1194
+ "gpt-4-0314",
1195
+ "gpt-4-0613",
1196
+ "gpt-4-32k",
1197
+ "gpt-4-32k-0314",
1198
+ "gpt-4-32k-0613",
1199
+ "gpt-4-turbo",
1200
+ "gpt-4-turbo-2024-04-09",
1201
+ "gpt-4-turbo-preview",
1202
+ "gpt-4-1106-preview",
1203
+ "gpt-4-0125-preview",
1204
+ "gpt-4-vision-preview",
1205
+ "gpt-4o",
1206
+ "gpt-4o-2024-05-13",
1207
+ "gpt-4o-mini",
1208
+ "gpt-4.1",
1209
+ "gpt-4.1-mini",
1210
+ "gpt-4.1-nano"
1211
+ ]
1212
+ },
1206
1213
  "OllamaModel": {
1207
1214
  "type": "string",
1208
1215
  "enum": [
@@ -6119,7 +6126,6 @@ function getPrompt({ template, variables, fallback }) {
6119
6126
  * @throws LangChainExecutionError if the chain execution fails or returns empty results
6120
6127
  */
6121
6128
  const executeChain = async ({ llm, prompt, variables, parser }) => {
6122
- // Validate all required parameters
6123
6129
  validateRequired(llm, 'llm', 'executeChain');
6124
6130
  validateRequired(prompt, 'prompt', 'executeChain');
6125
6131
  validateRequired(variables, 'variables', 'executeChain');
@@ -7478,7 +7484,6 @@ class OutputFixingParser extends BaseOutputParser {
7478
7484
  * @throws LangChainExecutionError if parser creation fails
7479
7485
  */
7480
7486
  function createSchemaParser(schema, llm, options = {}) {
7481
- // Validate required parameters
7482
7487
  validateRequired(schema, 'schema', 'createSchemaParser');
7483
7488
  validateRequired(llm, 'llm', 'createSchemaParser');
7484
7489
  validateRequired(options, 'options', 'createSchemaParser');
@@ -7538,7 +7543,6 @@ You must return ONLY valid JSON that matches the schema exactly. Do not include
7538
7543
  async function executeChainWithSchema(schema, llm, prompt, variables, options = {}) {
7539
7544
  const { retryOptions = { maxAttempts: 3 }, fallbackParser, onFallback, ...parserOptions } = options;
7540
7545
  const parser = createSchemaParser(schema, llm, parserOptions);
7541
- // Define the operation to retry
7542
7546
  const operation = async () => {
7543
7547
  const result = await executeChain({
7544
7548
  llm,
@@ -7549,16 +7553,13 @@ async function executeChainWithSchema(schema, llm, prompt, variables, options =
7549
7553
  return result;
7550
7554
  };
7551
7555
  try {
7552
- // Use the general retry utility
7553
7556
  return await withRetry(operation, retryOptions);
7554
7557
  }
7555
7558
  catch (error) {
7556
- // If all retries failed and we have a fallback parser, use it
7557
7559
  if (fallbackParser) {
7558
7560
  if (onFallback) {
7559
7561
  onFallback();
7560
7562
  }
7561
- // Generate without structured parsing as fallback
7562
7563
  const fallbackResult = await executeChain({
7563
7564
  llm,
7564
7565
  prompt,
@@ -11263,11 +11264,22 @@ async function getProjectConfigFilePath(configFileName) {
11263
11264
  }
11264
11265
 
11265
11266
  const OPEN_AI_MODELS = [
11267
+ 'gpt-4.5',
11266
11268
  'gpt-4o',
11269
+ 'gpt-4o-mini',
11270
+ 'gpt-4.1',
11271
+ 'gpt-4.1',
11272
+ 'gpt-4.1-mini',
11273
+ 'gpt-4.1-nano',
11267
11274
  'gpt-4-32k',
11268
11275
  'gpt-4-turbo',
11269
11276
  'gpt-4',
11270
11277
  'gpt-3.5-turbo',
11278
+ 'o1',
11279
+ 'o1-mini',
11280
+ '03-mini',
11281
+ '03',
11282
+ 'o4-mini',
11271
11283
  ];
11272
11284
  const ANTHROPIC_MODELS = [
11273
11285
  'claude-sonnet-4-0',
package/dist/index.js CHANGED
@@ -68,7 +68,7 @@ var readline__namespace = /*#__PURE__*/_interopNamespaceDefault(readline$1);
68
68
  /**
69
69
  * Current build version from package.json
70
70
  */
71
- const BUILD_VERSION = "0.18.0";
71
+ const BUILD_VERSION = "0.18.1";
72
72
 
73
73
  const isInteractive = (config) => {
74
74
  return config?.mode === 'interactive' || !!config?.interactive;
@@ -367,7 +367,7 @@ function getDefaultServiceApiKey(config) {
367
367
  }
368
368
  const DEFAULT_OPENAI_LLM_SERVICE = {
369
369
  provider: 'openai',
370
- model: 'gpt-4o',
370
+ model: 'gpt-4o-mini',
371
371
  tokenLimit: 2024,
372
372
  temperature: 0.32,
373
373
  authentication: {
@@ -641,21 +641,21 @@ function loadGitConfig(config) {
641
641
  let service = config.service;
642
642
  if (gitConfigParsed.coco) {
643
643
  service = {
644
- provider: gitConfigParsed.coco?.['service.provider'],
645
- model: gitConfigParsed.coco?.['service.model'],
644
+ provider: gitConfigParsed.coco?.serviceProvider,
645
+ model: gitConfigParsed.coco?.serviceModel,
646
646
  authentication: {
647
647
  type: 'APIKey',
648
648
  credentials: {
649
- apiKey: gitConfigParsed.coco?.['service.apiKey'],
649
+ apiKey: gitConfigParsed.coco?.serviceApiKey,
650
650
  },
651
651
  },
652
652
  requestOptions: {
653
- timeout: Number(gitConfigParsed.coco?.['service.requestOptions.timeout']),
654
- maxRetries: Number(gitConfigParsed.coco?.['service.requestOptions.maxRetries']),
653
+ timeout: Number(gitConfigParsed.coco?.serviceRequestOptionsTimeout),
654
+ maxRetries: Number(gitConfigParsed.coco?.serviceRequestOptionsMaxRetries),
655
655
  },
656
- endpoint: gitConfigParsed.coco?.['service.endpoint'],
657
- fields: gitConfigParsed.coco?.['service.fields']
658
- ? JSON.parse(gitConfigParsed.coco?.['service.fields'])
656
+ endpoint: gitConfigParsed.coco?.serviceEndpoint,
657
+ fields: gitConfigParsed.coco?.serviceFields
658
+ ? JSON.parse(gitConfigParsed.coco?.serviceFields)
659
659
  : undefined,
660
660
  };
661
661
  }
@@ -684,25 +684,25 @@ const appendToGitConfig = async (filePath, config) => {
684
684
  const value = config[key];
685
685
  if (key === 'service') {
686
686
  const service = value;
687
- contentLines.push(`\tservice.provider = ${service.provider}`);
688
- contentLines.push(`\tservice.model = ${service.model}`);
687
+ contentLines.push(` serviceProvider = ${service.provider}`);
688
+ contentLines.push(` serviceModel = ${service.model}`);
689
689
  if (service.authentication.type === 'APIKey') {
690
- contentLines.push(`\tservice.apiKey = ${service.authentication.credentials.apiKey}`);
690
+ contentLines.push(` serviceApiKey = ${service.authentication.credentials.apiKey}`);
691
691
  }
692
692
  if (service.requestOptions?.timeout) {
693
- contentLines.push(`\tservice.requestOptions.timeout = ${service.requestOptions.timeout}`);
693
+ contentLines.push(` serviceRequestOptionsTimeout = ${service.requestOptions.timeout}`);
694
694
  }
695
695
  if (service.requestOptions?.maxRetries) {
696
- contentLines.push(`\tservice.requestOptions.maxRetries = ${service.requestOptions.maxRetries}`);
696
+ contentLines.push(` serviceRequestOptionsMaxRetries = ${service.requestOptions.maxRetries}`);
697
697
  }
698
698
  if (service.provider === 'ollama') {
699
699
  const ollamaService = service;
700
700
  if (ollamaService.endpoint) {
701
- contentLines.push(` service.endpoint = ${ollamaService.endpoint}`);
701
+ contentLines.push(` serviceEndpoint = ${ollamaService.endpoint}`);
702
702
  }
703
703
  }
704
704
  if (service.fields) {
705
- contentLines.push(`\tservice.fields = ${JSON.stringify(service.fields)}`);
705
+ contentLines.push(` serviceFields = ${JSON.stringify(service.fields)}`);
706
706
  }
707
707
  }
708
708
  else if (typeof value === 'string' && value.includes('\n')) {
@@ -1157,65 +1157,7 @@ const schema$1 = {
1157
1157
  "LLMModel": {
1158
1158
  "anyOf": [
1159
1159
  {
1160
- "type": "string",
1161
- "enum": [
1162
- "davinci-002",
1163
- "babbage-002",
1164
- "text-davinci-003",
1165
- "text-davinci-002",
1166
- "text-davinci-001",
1167
- "text-curie-001",
1168
- "text-babbage-001",
1169
- "text-ada-001",
1170
- "davinci",
1171
- "curie",
1172
- "babbage",
1173
- "ada",
1174
- "code-davinci-002",
1175
- "code-davinci-001",
1176
- "code-cushman-002",
1177
- "code-cushman-001",
1178
- "davinci-codex",
1179
- "cushman-codex",
1180
- "text-davinci-edit-001",
1181
- "code-davinci-edit-001",
1182
- "text-embedding-ada-002",
1183
- "text-similarity-davinci-001",
1184
- "text-similarity-curie-001",
1185
- "text-similarity-babbage-001",
1186
- "text-similarity-ada-001",
1187
- "text-search-davinci-doc-001",
1188
- "text-search-curie-doc-001",
1189
- "text-search-babbage-doc-001",
1190
- "text-search-ada-doc-001",
1191
- "code-search-babbage-code-001",
1192
- "code-search-ada-code-001",
1193
- "gpt2",
1194
- "gpt-3.5-turbo",
1195
- "gpt-35-turbo",
1196
- "gpt-3.5-turbo-0301",
1197
- "gpt-3.5-turbo-0613",
1198
- "gpt-3.5-turbo-1106",
1199
- "gpt-3.5-turbo-0125",
1200
- "gpt-3.5-turbo-16k",
1201
- "gpt-3.5-turbo-16k-0613",
1202
- "gpt-3.5-turbo-instruct",
1203
- "gpt-3.5-turbo-instruct-0914",
1204
- "gpt-4",
1205
- "gpt-4-0314",
1206
- "gpt-4-0613",
1207
- "gpt-4-32k",
1208
- "gpt-4-32k-0314",
1209
- "gpt-4-32k-0613",
1210
- "gpt-4-turbo",
1211
- "gpt-4-turbo-2024-04-09",
1212
- "gpt-4-turbo-preview",
1213
- "gpt-4-1106-preview",
1214
- "gpt-4-0125-preview",
1215
- "gpt-4-vision-preview",
1216
- "gpt-4o",
1217
- "gpt-4o-2024-05-13"
1218
- ]
1160
+ "$ref": "#/definitions/OpenAIModel"
1219
1161
  },
1220
1162
  {
1221
1163
  "$ref": "#/definitions/OllamaModel"
@@ -1225,6 +1167,71 @@ const schema$1 = {
1225
1167
  }
1226
1168
  ]
1227
1169
  },
1170
+ "OpenAIModel": {
1171
+ "type": "string",
1172
+ "enum": [
1173
+ "davinci-002",
1174
+ "babbage-002",
1175
+ "text-davinci-003",
1176
+ "text-davinci-002",
1177
+ "text-davinci-001",
1178
+ "text-curie-001",
1179
+ "text-babbage-001",
1180
+ "text-ada-001",
1181
+ "davinci",
1182
+ "curie",
1183
+ "babbage",
1184
+ "ada",
1185
+ "code-davinci-002",
1186
+ "code-davinci-001",
1187
+ "code-cushman-002",
1188
+ "code-cushman-001",
1189
+ "davinci-codex",
1190
+ "cushman-codex",
1191
+ "text-davinci-edit-001",
1192
+ "code-davinci-edit-001",
1193
+ "text-embedding-ada-002",
1194
+ "text-similarity-davinci-001",
1195
+ "text-similarity-curie-001",
1196
+ "text-similarity-babbage-001",
1197
+ "text-similarity-ada-001",
1198
+ "text-search-davinci-doc-001",
1199
+ "text-search-curie-doc-001",
1200
+ "text-search-babbage-doc-001",
1201
+ "text-search-ada-doc-001",
1202
+ "code-search-babbage-code-001",
1203
+ "code-search-ada-code-001",
1204
+ "gpt2",
1205
+ "gpt-3.5-turbo",
1206
+ "gpt-35-turbo",
1207
+ "gpt-3.5-turbo-0301",
1208
+ "gpt-3.5-turbo-0613",
1209
+ "gpt-3.5-turbo-1106",
1210
+ "gpt-3.5-turbo-0125",
1211
+ "gpt-3.5-turbo-16k",
1212
+ "gpt-3.5-turbo-16k-0613",
1213
+ "gpt-3.5-turbo-instruct",
1214
+ "gpt-3.5-turbo-instruct-0914",
1215
+ "gpt-4",
1216
+ "gpt-4-0314",
1217
+ "gpt-4-0613",
1218
+ "gpt-4-32k",
1219
+ "gpt-4-32k-0314",
1220
+ "gpt-4-32k-0613",
1221
+ "gpt-4-turbo",
1222
+ "gpt-4-turbo-2024-04-09",
1223
+ "gpt-4-turbo-preview",
1224
+ "gpt-4-1106-preview",
1225
+ "gpt-4-0125-preview",
1226
+ "gpt-4-vision-preview",
1227
+ "gpt-4o",
1228
+ "gpt-4o-2024-05-13",
1229
+ "gpt-4o-mini",
1230
+ "gpt-4.1",
1231
+ "gpt-4.1-mini",
1232
+ "gpt-4.1-nano"
1233
+ ]
1234
+ },
1228
1235
  "OllamaModel": {
1229
1236
  "type": "string",
1230
1237
  "enum": [
@@ -6141,7 +6148,6 @@ function getPrompt({ template, variables, fallback }) {
6141
6148
  * @throws LangChainExecutionError if the chain execution fails or returns empty results
6142
6149
  */
6143
6150
  const executeChain = async ({ llm, prompt, variables, parser }) => {
6144
- // Validate all required parameters
6145
6151
  validateRequired(llm, 'llm', 'executeChain');
6146
6152
  validateRequired(prompt, 'prompt', 'executeChain');
6147
6153
  validateRequired(variables, 'variables', 'executeChain');
@@ -7500,7 +7506,6 @@ class OutputFixingParser extends output_parsers.BaseOutputParser {
7500
7506
  * @throws LangChainExecutionError if parser creation fails
7501
7507
  */
7502
7508
  function createSchemaParser(schema, llm, options = {}) {
7503
- // Validate required parameters
7504
7509
  validateRequired(schema, 'schema', 'createSchemaParser');
7505
7510
  validateRequired(llm, 'llm', 'createSchemaParser');
7506
7511
  validateRequired(options, 'options', 'createSchemaParser');
@@ -7560,7 +7565,6 @@ You must return ONLY valid JSON that matches the schema exactly. Do not include
7560
7565
  async function executeChainWithSchema(schema, llm, prompt, variables, options = {}) {
7561
7566
  const { retryOptions = { maxAttempts: 3 }, fallbackParser, onFallback, ...parserOptions } = options;
7562
7567
  const parser = createSchemaParser(schema, llm, parserOptions);
7563
- // Define the operation to retry
7564
7568
  const operation = async () => {
7565
7569
  const result = await executeChain({
7566
7570
  llm,
@@ -7571,16 +7575,13 @@ async function executeChainWithSchema(schema, llm, prompt, variables, options =
7571
7575
  return result;
7572
7576
  };
7573
7577
  try {
7574
- // Use the general retry utility
7575
7578
  return await withRetry(operation, retryOptions);
7576
7579
  }
7577
7580
  catch (error) {
7578
- // If all retries failed and we have a fallback parser, use it
7579
7581
  if (fallbackParser) {
7580
7582
  if (onFallback) {
7581
7583
  onFallback();
7582
7584
  }
7583
- // Generate without structured parsing as fallback
7584
7585
  const fallbackResult = await executeChain({
7585
7586
  llm,
7586
7587
  prompt,
@@ -11285,11 +11286,22 @@ async function getProjectConfigFilePath(configFileName) {
11285
11286
  }
11286
11287
 
11287
11288
  const OPEN_AI_MODELS = [
11289
+ 'gpt-4.5',
11288
11290
  'gpt-4o',
11291
+ 'gpt-4o-mini',
11292
+ 'gpt-4.1',
11293
+ 'gpt-4.1',
11294
+ 'gpt-4.1-mini',
11295
+ 'gpt-4.1-nano',
11289
11296
  'gpt-4-32k',
11290
11297
  'gpt-4-turbo',
11291
11298
  'gpt-4',
11292
11299
  'gpt-3.5-turbo',
11300
+ 'o1',
11301
+ 'o1-mini',
11302
+ '03-mini',
11303
+ '03',
11304
+ 'o4-mini',
11293
11305
  ];
11294
11306
  const ANTHROPIC_MODELS = [
11295
11307
  'claude-sonnet-4-0',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-coco",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "description": "zero-effort git commits with coco.",
5
5
  "author": "gfargo <ghfargo@gmail.com>",
6
6
  "license": "MIT",
@@ -105,7 +105,7 @@
105
105
  "performance-now": "2.1.0",
106
106
  "pretty-ms": "7.0.1",
107
107
  "simple-git": "3.27.0",
108
- "tiktoken": "^1.0.17",
108
+ "tiktoken": "^1.0.21",
109
109
  "yargs": "17.7.2"
110
110
  },
111
111
  "resolutions": {