fix: chat message format

This commit is contained in:
Alpha Nerd 2026-05-11 15:49:23 +02:00
parent c961a85add
commit 35b81f7ba0
Signed by: alpha-nerd
SSH key fingerprint: SHA256:QkkAgVoYi9TQ0UKPkiKSfnerZy2h4qhi3SVPXJmBN+M

View file

@ -846,8 +846,7 @@ async function chat(text: string, files: PromptFiles = []) {
const agent = await resolveAgent()
const body: Record<string, unknown> = {
providerID,
modelID,
model: { providerID, modelID },
...(agent ? { agent } : {}),
parts: [
{
@ -874,7 +873,7 @@ async function chat(text: string, files: PromptFiles = []) {
],
}
const chatRes = await fetch(`${SERVER_URL}/session/${session.id}/chat`, {
const chatRes = await fetch(`${SERVER_URL}/session/${session.id}/message`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(body),