You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix trailing newline in API keys causing illegal HTTP headers
Root cause: OpenAI API keys contained trailing newlines (\n), making
them illegal HTTP header values.
Error: httpcore.LocalProtocolError: Illegal header value b'Bearer sk-proj-...\n'
Solution:
- Strip newlines and carriage returns from all secret values
- Use tr -d '\n\r' to clean environment variables before writing to .env
- Prevents python-dotenv from loading keys with embedded newlines
This fixes all "Connection error" failures in support agent tests.
0 commit comments