Closed deboboy closed 4 days ago
Update: @lab from the OpenRouter Discord community helped solve this issue; for OpenRouter and Replicate endpoints.
Apparently AWS Amplify Gen2 requires new env variable setup; see Branch Environment section here: https://docs.amplify.aws/react/deploy-and-host/fullstack-branching/secrets-and-vars/#branch-environment-2
Specifically these needed to be added to the build commands:
- echo "REPLICATE_API_TOKEN=$REPLICATE_API_TOKEN" >> .env
- echo "OPENROUTER_API_KEY=$OPENROUTER_API_KEY" >> .env
Reference this pattern to fix the Replicate response issue.
https://replicate.com/docs/guides/nextjs