Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔥 feat: deepseek-reasoner Thought Streaming #5379

Merged
merged 5 commits into from
Jan 20, 2025

Conversation

danny-avila
Copy link
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
4 checks passed
@danny-avila danny-avila deleted the feat/deepseek-reasoner branch January 20, 2025 23:21
owengo pushed a commit to openwengo/LibreChat that referenced this pull request Jan 21, 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
lpirola pushed a commit to lpirola/LibreChat that referenced this pull request Jan 22, 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
justinmdickey pushed a commit to e-gineering/LibreChat that referenced this pull request Jan 30, 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