buildRecipePrompt ignored req.Lang entirely and hardcoded two English instructions in the prompt. Added targetLang resolution using the existing langNames map (from recognition.go) and threaded it into both "Generate N recipes in …" and "All text fields … MUST be in …" instructions. The image_query field remains English since it is passed to the Pexels photo API. Fixes recommendations and menu recipes being returned in English regardless of the Accept-Language header. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3.8 KiB
3.8 KiB