Skip to content

Commit 66979f4

Browse files
authored
Merge pull request #31 from eea/develop [skip ci]
Increase limits for LLM output tokens [skip ci]
2 parents 642cc91 + e924aca commit 66979f4

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

.github/scripts/ai/update_versions_and_changelogs.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -816,9 +816,8 @@ def _do_call():
816816
print("=" * 70)
817817
print(result_text)
818818
print("=" * 70)
819-
raise Exception(
820-
f"Batch {batch_num}/{total_batches} failed: Invalid JSON response"
821-
)
819+
# Empty -> batch_with_retry splits and retries the halves instead of aborting.
820+
return {}
822821
except Exception as e:
823822
print(f"\n❌ ERROR: Batch {batch_num}/{total_batches} processing failed")
824823
print(f" Error: {e}")

.github/scripts/helpers/gemini_client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,8 @@ def _strip_code_fences(text: str) -> str:
272272
# Keeps the inline request body small and avoids the ~128k inline token limit.
273273
FILE_API_THRESHOLD_TOKENS = 30_000
274274

275-
# Cap output tokens to reduce TPM consumption (input + output must fit in quota).
276-
# 4096 gives changelog generation enough room for 7 files × ~200 tokens each.
277-
MAX_OUTPUT_TOKENS = 4_096
275+
# 4_096 truncated the 15-file changelog batches mid-JSON; 2.5-flash allows 65k.
276+
MAX_OUTPUT_TOKENS = 32_768
278277

279278

280279
def _upload_prompt_as_file(prompt: str) -> object:

0 commit comments

Comments
 (0)