fix: increase Pascal reasoning output budget
This commit is contained in:
parent
4f5dbb4589
commit
cf1091fc2c
@ -239,6 +239,7 @@ write_pascal_env() {
|
||||
printf 'PASCAL_AGENT_API_KEY=%s\n' "$secret"
|
||||
printf 'PASCAL_AGENT_BASE_URL=%s/api/internal/pascal-agent/v1\n' "$MAIN_INTERNAL_URL"
|
||||
printf 'PASCAL_AGENT_MODEL=main-agent\n'
|
||||
printf 'PASCAL_AGENT_MAX_OUTPUT_TOKENS=%s\n' "${PASCAL_AGENT_MAX_OUTPUT_TOKENS:-8192}"
|
||||
printf 'PASCAL_AGENT_MAX_STEPS=%s\n' "${PASCAL_AGENT_MAX_STEPS:-18}"
|
||||
printf 'PASCAL_AGENT_STEP_TIMEOUT_MS=%s\n' "${PASCAL_AGENT_STEP_TIMEOUT_MS:-90000}"
|
||||
printf 'PASCAL_AGENT_TOTAL_TIMEOUT_MS=%s\n' "${PASCAL_AGENT_TOTAL_TIMEOUT_MS:-300000}"
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
|
||||
# Optional agent safety limits.
|
||||
# PASCAL_AGENT_MAX_STEPS=18
|
||||
# PASCAL_AGENT_MAX_OUTPUT_TOKENS=8192
|
||||
# PASCAL_AGENT_STEP_TIMEOUT_MS=90000
|
||||
# PASCAL_AGENT_TOTAL_TIMEOUT_MS=300000
|
||||
|
||||
|
||||
@ -166,7 +166,7 @@ export async function POST(request: Request) {
|
||||
stepNumber,
|
||||
}),
|
||||
}),
|
||||
maxOutputTokens: 1600,
|
||||
maxOutputTokens: config.maxOutputTokens,
|
||||
messages,
|
||||
model: provider.chat(config.model),
|
||||
stopWhen: stepCountIs(config.maxSteps),
|
||||
|
||||
@ -11,6 +11,7 @@ describe('Pascal agent configuration', () => {
|
||||
|
||||
expect(config.configured).toBe(false)
|
||||
expect(config.baseUrl).toBe('https://api.openai.com/v1')
|
||||
expect(config.maxOutputTokens).toBe(8192)
|
||||
expect(config.maxSteps).toBe(18)
|
||||
})
|
||||
|
||||
@ -19,6 +20,7 @@ describe('Pascal agent configuration', () => {
|
||||
PASCAL_AGENT_API_KEY: ' test-key ',
|
||||
PASCAL_AGENT_BASE_URL: 'https://models.example/v1/',
|
||||
PASCAL_AGENT_MAX_STEPS: '999',
|
||||
PASCAL_AGENT_MAX_OUTPUT_TOKENS: '999999',
|
||||
PASCAL_AGENT_MODEL: ' design-model ',
|
||||
PASCAL_AGENT_STEP_TIMEOUT_MS: '1000',
|
||||
PASCAL_AGENT_TOTAL_TIMEOUT_MS: '9999999',
|
||||
@ -29,6 +31,7 @@ describe('Pascal agent configuration', () => {
|
||||
baseUrl: 'https://models.example/v1',
|
||||
configured: true,
|
||||
maxSteps: 40,
|
||||
maxOutputTokens: 32_768,
|
||||
model: 'design-model',
|
||||
stepTimeoutMs: 10_000,
|
||||
totalTimeoutMs: 600_000,
|
||||
|
||||
@ -2,6 +2,7 @@ export interface PascalAgentConfig {
|
||||
apiKey: string
|
||||
baseUrl: string
|
||||
configured: boolean
|
||||
maxOutputTokens: number
|
||||
maxSteps: number
|
||||
model: string
|
||||
stepTimeoutMs: number
|
||||
@ -31,6 +32,7 @@ export function getPascalAgentConfig(env: NodeJS.ProcessEnv = process.env): Pasc
|
||||
apiKey,
|
||||
baseUrl,
|
||||
configured: apiKey.length > 0 && model.length > 0,
|
||||
maxOutputTokens: readBoundedInteger(env.PASCAL_AGENT_MAX_OUTPUT_TOKENS, 8192, 1024, 32_768),
|
||||
maxSteps: readBoundedInteger(env.PASCAL_AGENT_MAX_STEPS, 18, 4, 40),
|
||||
model,
|
||||
stepTimeoutMs: readBoundedInteger(env.PASCAL_AGENT_STEP_TIMEOUT_MS, 90_000, 10_000, 180_000),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user