10000 Add DeepSeek model support by mentatbot[bot] · Pull Request #156 · jakethekoenig/llm-chat · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add DeepSeek model support #156

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add DeepSeek model support #156

wants to merge 2 commits into from

Conversation

mentatbot[bot]
Copy link
Contributor
@mentatbot mentatbot bot commented Jun 13, 2025

This PR adds support for DeepSeek models to the LLM chat application.

Changes Made

  • Environment validation: Added DEEPSEEK_API_KEY as a supported API key option alongside OpenAI and Anthropic
  • Model detection: Added isDeepSeekModel() function to identify DeepSeek models
  • API integration: Implemented DeepSeek completion functions using OpenAI client with custom base U 8000 RL (https://api.deepseek.com/v1) since DeepSeek uses an OpenAI-compatible API
  • Streaming support: Added both streaming and non-streaming completion support for DeepSeek models
  • Documentation: Updated .env.example and README.md to include DeepSeek API key information
  • Tests: Added test coverage for DeepSeek model streaming functionality

How to Use

  1. Set your DeepSeek API key in the environment:

    DEEPSEEK_API_KEY=your-deepseek-api-key-here
  2. Use DeepSeek models in API calls by specifying model names that contain "deepseek" or "deep-seek" (e.g., deepseek-chat, deepseek-v2, etc.)

The implementation leverages DeepSeek's OpenAI-compatible API, making integration seamless with the existing codebase architecture.


🤖 See my steps and cost here

  • Wake on any new activity.

This PR adds support for DeepSeek models to the LLM chat application.

## Changes Made

- **Environment validation**: Added `DEEPSEEK_API_KEY` as a supported API key option alongside OpenAI and Anthropic
- **Model detection**: Added `isDeepSeekModel()` function to identify DeepSeek models
- **API integration**: Implemented DeepSeek completion functions using OpenAI client with custom base URL (`https://api.deepseek.com/v1`) since DeepSeek uses an OpenAI-compatible API
- **Streaming support**: Added both streaming and non-streaming completion support for DeepSeek models
- **Documentation**: Updated `.env.example` and `README.md` to include DeepSeek API key information
- **Tests**: Added test coverage for DeepSeek model streaming functionality

## How to Use

1. Set your DeepSeek API key in the environment:
   ```bash
   DEEPSEEK_API_KEY=your-deepseek-api-key-here
   ```

2. Use DeepSeek models in API calls by specifying model names that contain "deepseek" or "deep-seek" (e.g., `deepseek-chat`, `deepseek-v2`, etc.)

The implementation leverages DeepSeek's OpenAI-compatible API, making integration seamless with the existing codebase architecture.

Mentat precommits passed. Log: https://mentat.ai/gh/jakethekoenig/llm-chat/log/ef808276-a268-4875-af72-5e464eb73901

Co-authored-by: jakethekoenig <385534+jakethekoenig@users.noreply.github.com>
@mentatbot mentatbot bot requested a review from jakethekoenig June 13, 2025 00:38
- Added tests for DeepSeek model detection and API integration
- Added error handling tests for missing API keys
- Added tests for both streaming and non-streaming completions
- Improved test coverage for Anthropic error cases
- Added tests for addMessage function
- Coverage now exceeds required thresholds (79.53% branches vs 77.81% required)

Mentat precommits passed. Log: https://mentat.ai/gh/jakethekoenig/llm-chat/log/3bf69e45-1e90-49d5-93c0-e602c1a828f2

Co-authored-by: jakethekoenig <385534+jakethekoenig@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
4087
None yet
Development

Successfully merging this pull request may close these issues.

0 participants
0