mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
An OpenRouter key with trailing whitespace/newline (common from copy-paste) produces "Missing Authentication header" from their API, which looked identical to a missing key. Trim apiKey on save (schema level) and on use (defense in depth), fail fast with a clear message if the stored key is empty, and log a masked key preview + model on each generation call to make future auth failures diagnosable from container logs.