Skip to content

🔥 feat: deepseek-reasoner Thought Streaming#5379

Merged
danny-avila merged 5 commits into
mainfrom
feat/deepseek-reasoner
Jan 20, 2025
Merged

🔥 feat: deepseek-reasoner Thought Streaming#5379
danny-avila merged 5 commits into
mainfrom
feat/deepseek-reasoner

Conversation

@danny-avila

Copy link
Copy Markdown
Owner

Summary

Closes #5377

I introduced fixes necessary to support deepseek-reasoner thought streaming, updated localization strings across multiple languages, removed a long placeholder, and refactored message handling in the BaseClient and OpenAIClient files. I added a default behavior to addInstructions that places instructions at index 0, and I removed unused penalties while enhancing reasoning token handling.

  • Updated localization strings for Ar, De, Es, Fr, It, Jp, Ko, Ru, Zh, and ZhTraditional
  • Removed a long placeholder field from multiple language files
  • Refactored addInstructions() to add instructions at the beginning by default, with a flag for legacy behavior
  • Removed unused penalties in OpenAIClient and enhanced reasoning token handling

Note: this does not cover thought streaming when using Agents

Change Type

  • New feature (non-breaking change which adds functionality)

Testing

I tested by running local builds of the client and verifying that the new localization strings rendered correctly. I also tested text streaming logic in conjunction with deepseek reasoning streams to ensure tokens were handled properly. I recommend running local tests with various models to confirm CoT tokens appear as expected.

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

@danny-avila danny-avila merged commit d6b4d83 into main Jan 20, 2025
@danny-avila danny-avila deleted the feat/deepseek-reasoner branch January 20, 2025 23:21
justinmdickey pushed a commit to e-gineering/LibreChat that referenced this pull request Feb 7, 2025
* 🔧 refactor: Remove unused penalties and enhance reasoning token handling in OpenAIClient

* 🔧 refactor: `addInstructions` default to adding instructions at index 0, flag for legacy behavior

* chore: remove long placeholder

* chore: update localization strings across multiple languages

* ci: adjust tests for new `addInstructions` behavior
MichielMAnalytics pushed a commit to MichielMAnalytics/ProAI that referenced this pull request Jun 6, 2025
* 🔧 refactor: Remove unused penalties and enhance reasoning token handling in OpenAIClient

* 🔧 refactor: `addInstructions` default to adding instructions at index 0, flag for legacy behavior

* chore: remove long placeholder

* chore: update localization strings across multiple languages

* ci: adjust tests for new `addInstructions` behavior
mcbuckeye pushed a commit to mcbuckeye/LibreChat that referenced this pull request Aug 27, 2025
* 🔧 refactor: Remove unused penalties and enhance reasoning token handling in OpenAIClient

* 🔧 refactor: `addInstructions` default to adding instructions at index 0, flag for legacy behavior

* chore: remove long placeholder

* chore: update localization strings across multiple languages

* ci: adjust tests for new `addInstructions` behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Deepseek-reasoner model fails after first message in LibreChat when added to default models

1 participant