[Bug] OpenAI-compatible driver fails to populate 'messages' array in request payload for local endpoints

Ouverte
#3,569 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
58/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
go
Domaine
backend

Piste de recherche

Start by tracing how the OpenAI-compatible driver builds chat completion requests and how the configured model and user input reach that code. Reproduce with a local OpenAI-compatible endpoint and inspect the outgoing JSON payload. Done means the request includes the user's text in the messages array and the endpoint accepts it.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Description

When using a local, OpenAI-compatible server (e.g., Ollama) via the openai provider in waveai.json, the client fails to include the user's text input in the JSON request payload. This results in an empty messages array being sent to the endpoint, triggering a 400 Bad Request from the server.

Steps to Reproduce
  1. Configure waveai.json to use ai:provider: "openai" with a local endpoint (e.g., http://localhost:11434/v1/chat/completions).
  2. Set a dummy OPENAI_KEY in the Secrets menu to bypass client-side validation.
  3. Open a new chat session using the configured model.
  4. Type a valid text string (e.g., "Hello!") and attempt to send.
Expected Behavior

The client should package the user input into a standard OpenAI chat completion payload:

{"model": "...", "messages": [{"role": "user", "content": "Hello!"}]}
Langage dominant
Go
Étoiles
22.7k
Forks
1.2k
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de wavetermdev/waveterm

Toutes les issues de wavetermdev/waveterm

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.