sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.51k stars 260 forks source link

bug: Enterprise - continuing old chats has confusing error message when server changes chat model #4378

Closed dominiccooney closed 1 month ago

dominiccooney commented 3 months ago

Version

1.19.1717051987

Describe the bug

  1. Do some chatting, say with an Anthropic model
  2. Change the chatModel to GPT4o
  3. "Later", load your old Anthropic chat from history and try to keep chatting

This error occurs (reproduced on sg02):

Screenshot 2024-05-30 at 18 11 45

Request Failed: Sourcegraph Cody Gateway: unexpected status code 400: { "error": { "message": "Invalid value: ''. Supported values are: 'system', 'assistant', 'user', 'function', and 'tool'.", "type": "invalid_request_error", "param": "messages[0].role", "code": "invalid_value" } }

Expected behavior

Let me keep chatting with the new model, or at least explain why I can't keep chatting.

Additional context

No response

github-actions[bot] commented 1 month ago

This issue is marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed automatically in 5 days.