Groq + corpus compose leave unmatched spans as source; post-process
fills empty/missing lines with the original text.
Co-authored-by: Cursor <cursoragent@cursor.com>
Search dataset.xlsx and words_balochi_to_english.xlsx, use grammar PDF
for understanding, then Groq English and Google/Groq for the target language.
Co-authored-by: Cursor <cursoragent@cursor.com>
Never hard-fail bal→English: unfiltered Groq fallback + adapter draft.
Strict quality filters were rejecting all outputs when ZeroGPU was cold;
retry without filters and keep translating for labzank.
Co-authored-by: Cursor <cursoragent@cursor.com>
Soften Groq lexicon filter; keep strict checks for LoRA accept.
test_translation Urdu needs an English pivot first; long stories were still
hitting gemini-3.6-flash free-tier quota instead of Groq.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add Google Translate for EN→target; keep Groq for Balochi→English.
Prefer google_translate (Cloud key or free gtx) after the English pivot so
Urdu is real MT instead of Arabic-script Balochi / invented verse.
Co-authored-by: Cursor <cursoragent@cursor.com>
Switch labzank bal→any to Groq support; drop genai_support stack.
Use gpt-oss-120b, couplet-faithful prompts, and empty genai_support in
health/meta so Urdu no longer follows adapter→dataset→grammar→lexicon.
Co-authored-by: Cursor <cursoragent@cursor.com>
Harden Groq prompts against refusals; chunk Balochi→English pivot.
Raise max_completion_tokens, set reasoning_effort=low, retry on length,
and chunk long poems by stanza when a single call still returns empty.
Co-authored-by: Cursor <cursoragent@cursor.com>
Never fall through to Gemini for bal→any when Groq is configured.
Labzank was still showing Gemini quota waits after Groq misses; fail
closed on Groq/HF instead of burning free-tier Gemini.
Co-authored-by: Cursor <cursoragent@cursor.com>
Route bal→Urdu through Groq even when LoRA/ZeroGPU is cold.
Without an English pivot the old path fell through to Gemini quota;
Groq now translates Balochi Latin directly when the adapter is not ready.
Co-authored-by: Cursor <cursoragent@cursor.com>
Prefer Groq for bal→Urdu and other EN→target routes.
When GROQ_API_KEY is set, skip Gemini for non-English targets after the
LoRA English pivot; fall back to HF NLLB/opus then Gemini.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use Groq free-tier model openai/gpt-oss-20b by default.
Urdu and other bal→any routes fall back to opus-mt/NLLB (HF_TOKEN) or
optional GROQ_API_KEY instead of hanging on free-tier Gemini.
Co-authored-by: Cursor <cursoragent@cursor.com>
Never call Gemini for short bal↔en; cooldown after free-tier 429.
Poems use adapter/dataset only so English no longer burns the 20/min
quota or paints [translation unavailable] into the page.
Co-authored-by: Cursor <cursoragent@cursor.com>
Accept LoRA for bal→en poems; stop Gemini quota waits on English.
Poem drafts were rejected by lexicon gloss matching and fell through to
free-tier Gemini; prefer the adapter and skip English quota retries.
Co-authored-by: Cursor <cursoragent@cursor.com>
On Gemini free-tier quota, return English sense for bal→any.
Stop double 45s waits; Urdu/etc. get LoRA English with a clear warning
instead of hanging on free-tier limits.
Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid Gemini free-tier burn: accept LoRA for bal↔en poems.
Honor retry-after on quota errors instead of cascading every fallback
model (that exhausted the 20/min free-tier limit).
Co-authored-by: Cursor <cursoragent@cursor.com>
Prefer lite Gemini and EN pivot for bal→Urdu poems.
Use flash-lite first under demand spikes; short poems get LoRA English
then a light EN→target call instead of the heavy Balochi system prompt.
Co-authored-by: Cursor <cursoragent@cursor.com>
Retry Gemini harder on high demand and rotate fallback models.
Treat demand spikes as quick model switches with exponential backoff,
and expand the fallback list so labzank long posts keep working.
Co-authored-by: Cursor <cursoragent@cursor.com>
Skip LoRA on long posts and chunk only very large essays.
Labzank 90s timeouts came from ZeroGPU line-by-line LoRA on full
articles; long text now goes straight to grounded Gemini.
Co-authored-by: Cursor <cursoragent@cursor.com>
26 days ago
Drop translategemma→genai as priority; use genai_support stack.
priority and genai_support are both adapter → dataset → grammar → lexicon;
LoRA is never returned as the final method.
Co-authored-by: Cursor <cursoragent@cursor.com>
Fix hajjám accent mismatch so pilgrim/Kaaba drafts are rejected and not
passed to Gemini as KEEP wording; expose priority_adapter and routes.
Co-authored-by: Cursor <cursoragent@cursor.com>
Reject LoRA drafts that contradict lexicon senses (hajjám=barber).
Prefer line-by-line LoRA drafts and tighten Gemini bal→en fidelity so invented pilgrim/Hajj text cannot replace the source.
Co-authored-by: Cursor <cursoragent@cursor.com>
Require draft/offline output to cover source line count so posts are not reduced to a single English sentence.
Co-authored-by: Cursor <cursoragent@cursor.com>
Treat retired Gemini model errors as fallback-worthy.
Run the LoRA before corpus/Gemini even when text has newlines, so meanings like 'bird trap' are not replaced by Gemini drift.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add Brahui and full labzank language list to Space targets.
Health never attaches CUDA, so ready stays false until Translate; avoid asyncio.to_thread which dropped the ZeroGPU context.
Co-authored-by: Cursor <cursoragent@cursor.com>