chat: remember last model
This commit is contained in:
@@ -111,6 +111,7 @@ Behavior notes:
|
||||
- If `chatId` is present, server validates chat existence.
|
||||
- For `chatId` calls, server stores only *new* non-assistant messages from provided history to avoid duplicates.
|
||||
- Server persists final assistant output and call metadata (`LlmCall`) in DB.
|
||||
- Server updates chat-level model metadata on each call: `lastUsedProvider`/`lastUsedModel`; first successful/failed call also initializes `initiatedProvider`/`initiatedModel` if unset.
|
||||
|
||||
## Searches
|
||||
|
||||
@@ -151,7 +152,16 @@ Search run notes:
|
||||
|
||||
`ChatSummary`
|
||||
```json
|
||||
{ "id": "...", "title": null, "createdAt": "...", "updatedAt": "..." }
|
||||
{
|
||||
"id": "...",
|
||||
"title": null,
|
||||
"createdAt": "...",
|
||||
"updatedAt": "...",
|
||||
"initiatedProvider": "openai|anthropic|xai|null",
|
||||
"initiatedModel": "string|null",
|
||||
"lastUsedProvider": "openai|anthropic|xai|null",
|
||||
"lastUsedModel": "string|null"
|
||||
}
|
||||
```
|
||||
|
||||
`Message`
|
||||
@@ -172,6 +182,10 @@ Search run notes:
|
||||
"title": null,
|
||||
"createdAt": "...",
|
||||
"updatedAt": "...",
|
||||
"initiatedProvider": "openai|anthropic|xai|null",
|
||||
"initiatedModel": "string|null",
|
||||
"lastUsedProvider": "openai|anthropic|xai|null",
|
||||
"lastUsedModel": "string|null",
|
||||
"messages": [Message]
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user