Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mistral adapter error handling: Improve object validation and error messages for nested content #3784

Open
3 tasks done
ingo-eichhorst-ionos opened this issue Jan 20, 2025 · 1 comment
Assignees
Labels
kind:bug Indicates an unexpected problem or unintended behavior priority:medium Indicates medium priority

Comments

@ingo-eichhorst-ionos
Copy link

Before submitting your bug report

Relevant environment info

- OS: MacOS 15.2 (24C101) - M1 (ARM)
- Continue version: 0.9.251
- IDE version: VS Code - Version: 1.96.2 (Universal)
- Model: GPT-4o

- config.json:
  
  "models": [
    {
      "title": "codestral",
      "model": "codestral-latest",
      "provider": "mistral",
      "apiKey": "random_string"
     }  ...
  ]

Description

The Mistral adapter for Codestral (And properly other models as well) is not displaying a proper error.
Instead the not very helpful "Cannot read properties of undefined (reading 'content')" is displayed. IMHO the code should handle deep nested objects more gracefully and e.g. display a JSON stringify of the object if the object nesting is different than expected.

Image

To reproduce

  1. A mistral model like in the config above with a wrong API-Key.
  2. Send any chat request

Log output

##### Completion options #####
{
  "contextLength": 32768,
  "model": "codestral-latest",
  "maxTokens": 4096
}

##### Request options #####
{}

##### Prompt #####
<system>


<user>
@dosubot dosubot bot added kind:bug Indicates an unexpected problem or unintended behavior priority:medium Indicates medium priority labels Jan 20, 2025
@Patrick-Erichsen
Copy link
Collaborator

This was a separate issue with our error logging that I believe has been resolved in latest pre-release. Thanks for the +1 on it though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Indicates an unexpected problem or unintended behavior priority:medium Indicates medium priority
Projects
None yet
Development

No branches or pull requests

2 participants