[GH-ISSUE #5534] Bug: Changing DeepSeek model or API key resets conversation context #5152

Open
opened 2026-06-05 14:52:19 -04:00 by yindo · 1 comment
Owner

Originally created by @miraitech24 on GitHub (Apr 25, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5534

Problem Description
When I change the DeepSeek model (e.g., from deepseek-v4-flash to deepseek-v4-pro) or regenerate the API key, the workspace treats every new message as a first-time interaction. The LLM does not remember any previous conversation history, even though the old messages are still visible in the UI.

Steps to Reproduce

  1. Create a workspace
  2. Have a conversation: 'My name is Miraitech. Please remember it.' → Model responds 'Got it, Miraitech.'
  3. Ask: 'What is my name?' → Model correctly answers 'Miraitech.'
  4. Go to Settings → LLM Provider → Change model from deepseek-v4-flash to deepseek-v4-pro (or change API key)
  5. Save and return to workspace
  6. Ask again: 'Do you remember my name from our earlier chat?'
  7. Model responds 'I don't have any previous context' or similar

Expected Behavior
Changing model or API key should NOT break conversation continuity. The workspace should maintain its history and continue sending full context to the new model/key.

Actual Behavior

  • Old messages remain visible in UI
  • But they are NOT being sent to the API as context
  • Every message becomes a 'first meeting'

Cross-Validation
The same conversation flow with OpenAI GPT-3.5 (same AnythingLLM version, same workspace) works correctly — model remembers after API key changes. This suggests the issue is specific to how AnythingLLM handles the DeepSeek provider or model switching.

Technical Note
I understand LLM APIs are stateless by design. The application's job is to manage state. If AnythingLLM fails to send conversation history after settings changes, it's not fulfilling its core purpose.

Environment

  • AnythingLLM version: [please fill]
  • OS: [please fill]
  • DeepSeek API with deepseek-v4-flash / deepseek-v4-pro
  • Workspace setting: 'Use workspace LLM settings'

Screenshots/Logs
[Attach if available]

Originally created by @miraitech24 on GitHub (Apr 25, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5534 **Problem Description** When I change the DeepSeek model (e.g., from deepseek-v4-flash to deepseek-v4-pro) or regenerate the API key, the workspace treats every new message as a first-time interaction. The LLM does not remember any previous conversation history, even though the old messages are still visible in the UI. **Steps to Reproduce** 1. Create a workspace 2. Have a conversation: 'My name is Miraitech. Please remember it.' → Model responds 'Got it, Miraitech.' 3. Ask: 'What is my name?' → Model correctly answers 'Miraitech.' 4. Go to Settings → LLM Provider → Change model from deepseek-v4-flash to deepseek-v4-pro (or change API key) 5. Save and return to workspace 6. Ask again: 'Do you remember my name from our earlier chat?' 7. Model responds 'I don't have any previous context' or similar **Expected Behavior** Changing model or API key should NOT break conversation continuity. The workspace should maintain its history and continue sending full context to the new model/key. **Actual Behavior** - Old messages remain visible in UI - But they are NOT being sent to the API as context - Every message becomes a 'first meeting' **Cross-Validation** The same conversation flow with OpenAI GPT-3.5 (same AnythingLLM version, same workspace) works correctly — model remembers after API key changes. This suggests the issue is specific to how AnythingLLM handles the DeepSeek provider or model switching. **Technical Note** I understand LLM APIs are stateless by design. The application's job is to manage state. If AnythingLLM fails to send conversation history after settings changes, it's not fulfilling its core purpose. **Environment** - AnythingLLM version: [please fill] - OS: [please fill] - DeepSeek API with deepseek-v4-flash / deepseek-v4-pro - Workspace setting: 'Use workspace LLM settings' **Screenshots/Logs** [Attach if available]
yindo added the needs info / can't replicate label 2026-06-05 14:52:19 -04:00
Author
Owner

@timothycarambat commented on GitHub (Apr 25, 2026):

Changing model or API key should NOT break conversation continuity. The workspace should maintain its history and continue sending full context to the new model/key.

This is just not how the system even works. The API key and model are fully disconnected to how messages function. Something else is going on here and I think it is model/provider specific.

This is also the same as #5533 and I wanted to keep the conversation on a single thread until it is fully confirmed this is a bug and not a nuance we cannot control

<!-- gh-comment-id:4320485962 --> @timothycarambat commented on GitHub (Apr 25, 2026): > Changing model or API key should NOT break conversation continuity. The workspace should maintain its history and continue sending full context to the new model/key. This is just not how the system even works. The API key and model are fully disconnected to how messages function. Something else is going on here and I think it is model/provider specific. This is also the same as #5533 and I wanted to keep the conversation on a single thread until it is fully confirmed this is a bug and not a nuance we cannot control
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5152