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
Configuration footgun: trailing whitespace in "Base URL" results in confusing connection errors ("The language model did not provide any assistant messages") and is not visible in the UI #4051
The issue occurs when users configure Cline with a provider that takes custom base URL, for example "OpenAI Compatible".
If the user pastes in the base URL copied from some document, they may accidentally include trailing whitespace at the end of the URL, for example: https://example.com/llm (note the space at the end)
This results in the most confusing of behaviors 💫 : firstly because the UI immediately hides the trailing whitespace: it gets trimmed away so you can't notice that it's there. Secondly, because the trailing whitespace does become part of the effective URL used by Cline for connections. The resulting behavior is that all connections fail with the same error:
Unexpected API Response: The language model did not provide any assistant messages. This may indicate an issue with the API or the model's output.
Suggested improvements:
trim trailing whitespace not just in the UI, but in the underlying data model
is it possible to have more granular errors when the connection to the server fails? In this case "The language model did not provide any assistant messages." is misleading, "Failed to connect to the language model" would be better. Even better if there was a way to see the HTTP response code and content.
Thanks for the great work on Cline, I'm a very happy user 🙌
Steps to reproduce
Configure OpenAI Compatible API backend with a trailing whitespace at the end of the URL