When using ChatOpenAI with an invalid or wrong API key, the user sees: 401 Invalid model key or Incorrect local model configuration.
This is misleading because:
- The actual cause was an invalid/wrong API key (401 from the API).
- The “or Incorrect local model configuration” part suggests Ollama/local setup, which doesn’t apply when using OpenAI.
Suggestion: For 401 responses from the OpenAI (or similar) API, show a clearer message, e.g.: 401 Unauthorized – check your API key and that it has access to the requested model.
Keep a separate message for real local-model issues (e.g. connection to Ollama), so users aren’t sent down the wrong path.
Version: 3.0.13