Merge pull request 'chore(workbench): logga orsaken till strukturfel' (#438) from fix/structure-error-visibility into main
masterplan-lock / check (push) Successful in 4s
CI (SIAX Cloud) / security (push) Successful in 18s
Security Scan (SIAX Cloud) / security (push) Successful in 25s
CI (SIAX Cloud) / quality (push) Successful in 45s
CI (SIAX Cloud) / integration (push) Successful in 50s
CI (SIAX Cloud) / sonar (push) Successful in 53s
Release chain (G17, ADR-W16-003) / Build, push, G17 (SBOM/scan/attest/verify/evidence) (push) Successful in 1m10s
Deploy to Coolify / deploy (push) Successful in 1m12s
masterplan-lock / check (push) Successful in 4s
CI (SIAX Cloud) / security (push) Successful in 18s
Security Scan (SIAX Cloud) / security (push) Successful in 25s
CI (SIAX Cloud) / quality (push) Successful in 45s
CI (SIAX Cloud) / integration (push) Successful in 50s
CI (SIAX Cloud) / sonar (push) Successful in 53s
Release chain (G17, ADR-W16-003) / Build, push, G17 (SBOM/scan/attest/verify/evidence) (push) Successful in 1m10s
Deploy to Coolify / deploy (push) Successful in 1m12s
This commit was merged in pull request #438.
This commit is contained in:
@@ -244,6 +244,7 @@ export async function POST(request: NextRequest) {
|
||||
);
|
||||
}
|
||||
|
||||
console.log('[0pt-workbench] doc0 source read:', sources.sources.length, 'segments');
|
||||
const sourceChars = sources.sources.reduce((total, source) => total + source.text.length, 0);
|
||||
const estimatedInputTokens = Math.ceil(JSON.stringify(sources.sources).length / 4) + 1024;
|
||||
if (estimatedInputTokens > policy.maxInputTokens) {
|
||||
@@ -433,6 +434,7 @@ export async function POST(request: NextRequest) {
|
||||
}
|
||||
}
|
||||
const message = error instanceof Error ? error.message : 'Structuring failed';
|
||||
console.error('[0pt-workbench] structure failed:', message);
|
||||
return NextResponse.json(
|
||||
{ error: 'STRUCTURE_FAILED', message, reservation_id: reservationId },
|
||||
{ status: 502 },
|
||||
|
||||
Reference in New Issue
Block a user