Skip to content

Commit 8f38b4c

Browse files
committed
feat: 0.6.5 — ollama timeout 600s & raise default max_tokens
- ollama timeout: 120s → 600s (local models are slow) - ollama default num_predict: 2048 → 8192 - compose generated YAML: ollama gets max_tokens 8192, timeout 600s - cloud API providers keep existing 4096/120s defaults
1 parent f4b1af2 commit 8f38b4c

5 files changed

Lines changed: 16 additions & 9 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "agency-orchestrator",
3-
"version": "0.6.4",
3+
"version": "0.6.5",
44
"description": "Multi-agent YAML workflow engine — 211 AI roles, auto DAG parallelism, zero code. One sentence → multiple AI roles collaborate → complete plan in minutes. 10 LLM providers, 7 need no API key.",
55
"keywords": [
66
"multi-agent",

src/cli/compose.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ function buildComposeSystemPromptEn(catalog: string, options?: { autoRun?: boole
8282
const autoRun = options?.autoRun ?? false;
8383
const provider = options?.provider || 'deepseek';
8484
const model = options?.model;
85+
const isLocal = provider === 'ollama';
86+
const maxTokens = isLocal ? 8192 : 4096;
87+
const timeoutMs = isLocal ? 600000 : 120000;
8588

8689
const inputsSection = autoRun
8790
? `
@@ -129,8 +132,8 @@ agents_dir: "agency-agents"
129132
llm:
130133
provider: ${provider}
131134
${model ? `model: ${model}` : ''}
132-
max_tokens: 4096
133-
timeout: 120000
135+
max_tokens: ${maxTokens}
136+
timeout: ${timeoutMs}
134137
retry: 2
135138
136139
concurrency: 2
@@ -176,6 +179,9 @@ function buildComposeSystemPromptZh(catalog: string, options?: { autoRun?: boole
176179
const autoRun = options?.autoRun ?? false;
177180
const provider = options?.provider || 'deepseek';
178181
const model = options?.model;
182+
const isLocal = provider === 'ollama';
183+
const maxTokens = isLocal ? 8192 : 4096;
184+
const timeoutMs = isLocal ? 600000 : 120000;
179185

180186
const inputsSection = autoRun
181187
? `
@@ -223,8 +229,8 @@ agents_dir: "agency-agents-zh"
223229
llm:
224230
provider: ${provider}
225231
${model ? `model: ${model}` : ''}
226-
max_tokens: 4096
227-
timeout: 120000
232+
max_tokens: ${maxTokens}
233+
timeout: ${timeoutMs}
228234
retry: 2
229235
230236
concurrency: 2

src/connectors/ollama.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class OllamaConnector implements LLMConnector {
2525
],
2626
stream: false,
2727
options: {
28-
num_predict: config.max_tokens || 2048,
28+
num_predict: config.max_tokens || 8192,
2929
},
3030
}),
3131
});

src/core/executor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ export async function executeDAG(dag: DAG, options: ExecutorOptions): Promise<Wo
5050
const stepResults: StepResult[] = [];
5151

5252
const isCLI = llmConfig.provider.endsWith('-cli') || llmConfig.provider === 'claude-code';
53-
const timeout = llmConfig.timeout || (isCLI ? 600_000 : 120_000); // CLI 10分钟(gateway/MiniMax 等可能单步 5+ 分钟),API 2分钟
53+
const isLocal = llmConfig.provider === 'ollama';
54+
const timeout = llmConfig.timeout || (isCLI ? 600_000 : isLocal ? 600_000 : 120_000);
5455
const maxRetry = llmConfig.retry ?? 5;
5556

5657
// CLI provider 强制串行:共享同一账户额度,并发会触发限速反而更慢

0 commit comments

Comments
 (0)