chore: version up to 2.80.34 and package

This commit is contained in:
g1nation
2026-05-12 22:54:21 +09:00
parent 148bfb070b
commit 065e598cca
26 changed files with 2023 additions and 139 deletions
+8 -2
View File
@@ -24,6 +24,11 @@ export abstract class BaseAgent {
const isOllama = ollamaUrl.includes(':11434') || ollamaUrl.includes('ollama');
const endpoint = isOllama ? `${ollamaUrl}/api/chat` : `${ollamaUrl}/v1/chat/completions`;
// 컨텍스트 초과 방지를 위해 출력 토큰 상한을 항상 명시한다 (서브에이전트 중간 산출물용).
const { contextLength, maxOutputTokens } = getConfig();
const numCtx = Math.max(2048, contextLength);
const outCap = Math.max(256, maxOutputTokens);
let lastError: any;
for (let attempt = 1; attempt <= 3; attempt++) {
const controller = new AbortController();
@@ -40,12 +45,13 @@ export abstract class BaseAgent {
model: this.modelName,
messages,
stream: false,
options: { temperature: 0.3 }
options: { temperature: 0.3, num_ctx: numCtx, num_predict: outCap }
} : {
model: this.modelName,
messages,
stream: false,
temperature: 0.3
temperature: 0.3,
max_tokens: outCap
}),
signal: combinedSignal
});