gitnexus 1.6.5-rc.26 → 1.6.5-rc.27

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/cli/index.js CHANGED
@@ -103,6 +103,8 @@ program
103
103
  .option('--reasoning-model', 'Mark deployment as reasoning model (o1/o3/o4-mini) — strips temperature, uses max_completion_tokens')
104
104
  .option('--no-reasoning-model', 'Disable reasoning model mode (overrides saved config)')
105
105
  .option('--concurrency <n>', 'Parallel LLM calls (default: 3)', '3')
106
+ .option('--timeout <seconds>', 'Per-attempt LLM request timeout in seconds (default: 60)')
107
+ .option('--retries <n>', 'Max LLM retry attempts per request (default: 3)')
106
108
  .option('--gist', 'Publish wiki as a public GitHub Gist after generation')
107
109
  .option('-v, --verbose', 'Enable verbose output (show LLM commands and responses)')
108
110
  .option('--review', 'Stop after grouping to review module structure before generating pages')
@@ -17,5 +17,7 @@ export interface WikiCommandOptions {
17
17
  provider?: LLMProvider;
18
18
  verbose?: boolean;
19
19
  review?: boolean;
20
+ timeout?: string;
21
+ retries?: string;
20
22
  }
21
23
  export declare const wikiCommand: (inputPath?: string, options?: WikiCommandOptions) => Promise<void>;
package/dist/cli/wiki.js CHANGED
@@ -304,6 +304,17 @@ export const wikiCommand = async (inputPath, options) => {
304
304
  }
305
305
  }
306
306
  }
307
+ // ── Apply per-run overrides not saved to config ────────────────────
308
+ if (options?.timeout) {
309
+ const secs = parseInt(options.timeout, 10);
310
+ if (!isNaN(secs) && secs > 0)
311
+ llmConfig.requestTimeoutMs = secs * 1000;
312
+ }
313
+ if (options?.retries) {
314
+ const n = parseInt(options.retries, 10);
315
+ if (!isNaN(n) && n > 0)
316
+ llmConfig.maxAttempts = n;
317
+ }
307
318
  // ── Setup progress bar with elapsed timer ──────────────────────────
308
319
  const bar = new cliProgress.SingleBar({
309
320
  format: ' {bar} {percentage}% | {phase}',
@@ -19,6 +19,10 @@ export interface LLMConfig {
19
19
  apiVersion?: string;
20
20
  /** When true, strips sampling params and uses max_completion_tokens instead of max_tokens */
21
21
  isReasoningModel?: boolean;
22
+ /** Per-attempt fetch timeout in ms (default: 60_000). */
23
+ requestTimeoutMs?: number;
24
+ /** Max fetch attempts before giving up (default: 3). */
25
+ maxAttempts?: number;
22
26
  }
23
27
  export interface LLMResponse {
24
28
  content: string;
@@ -170,11 +170,11 @@ export async function callLLM(prompt, config, systemPrompt, options) {
170
170
  // indefinitely on a frozen TCP connection — the per-call
171
171
  // signal is the only timeout `resilientFetch` honors;
172
172
  // `capDelayMs` only bounds the *backoff* between attempts.
173
- // 60s matches typical LLM completion budgets.
174
- signal: AbortSignal.timeout(60_000),
173
+ // Default 60s; raise via --timeout for slow models or large pages.
174
+ signal: AbortSignal.timeout(config.requestTimeoutMs ?? 60_000),
175
175
  }, {
176
176
  breakerKey: `wiki-llm-${new URL(url).host}`,
177
- retry: { maxAttempts: 3, baseDelayMs: 2_000, capDelayMs: 30_000 },
177
+ retry: { maxAttempts: config.maxAttempts ?? 3, baseDelayMs: 2_000, capDelayMs: 30_000 },
178
178
  });
179
179
  }
180
180
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitnexus",
3
- "version": "1.6.5-rc.26",
3
+ "version": "1.6.5-rc.27",
4
4
  "description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
5
5
  "author": "Abhigyan Patwari",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",