fix(cycle): raise atom maxTokens + case-normalize atom_type for Gemini (#3211)

This commit is contained in:
alexey-metaengage
2026-07-23 13:38:37 -07:00
committed by GitHub
parent 4213ac8da8
commit 19c6b6ef67
+2 -2
View File
@@ -558,7 +558,7 @@ export async function runPhaseExtractAtoms(
content: `Source: ${originLabel}\n\n---\n\n${item.content.slice(0, 50_000)}`,
},
],
maxTokens: 2000,
maxTokens: 4096,
});
// Post-await yield: closes the "long LLM call past TTL" hazard
// codex flagged. The 30s throttle inside maybeYield bounds the
@@ -726,7 +726,7 @@ export function parseAtomsResponse(raw: string): ExtractedAtom[] {
if (typeof item !== 'object' || item === null) continue;
const obj = item as Record<string, unknown>;
const title = typeof obj.title === 'string' ? obj.title.slice(0, 200) : null;
const atomType = typeof obj.atom_type === 'string' ? obj.atom_type : null;
const atomType = typeof obj.atom_type === 'string' ? obj.atom_type.trim().toLowerCase() : null;
const body = typeof obj.body === 'string' ? obj.body : null;
if (!title || !atomType || !body) continue;
if (!ATOM_TYPES.includes(atomType as typeof ATOM_TYPES[number])) continue;