Skip to content

Conversation

yguo
Copy link
Contributor

@yguo yguo commented Apr 15, 2025

Add DeepSeek Model Support via OpenRouter Integration

Overview

This PR adds support for the DeepSeek model through OpenRouter integration, expanding the available AI model options in Zola.

Changes

  • Integrated DeepSeek model via OpenRouter API
  • Added configuration for DeepSeek model in the model selection system
  • Implemented necessary API handlers for DeepSeek interactions

Technical Details

  • Added DeepSeek as a new model option in the model configuration
  • Integrated with OpenRouter's API for DeepSeek model access
  • Ensured proper error handling and response parsing

Testing

  • Verified DeepSeek model responses through OpenRouter
  • Tested model switching functionality
  • Confirmed proper error handling and user feedback

Dependencies

  • Requires OpenRouter API configuration
  • Compatible with existing model selection infrastructure

yguo added 2 commits April 15, 2025 20:46
- Integrate OpenRouter as a third-party provider to enable Deepseek models
- Scale up OpenRouter logo to match other provider icons
- Maintain consistent provider interface for seamless model switching
Copy link

vercel bot commented Apr 15, 2025

@yguo is attempting to deploy a commit to the julienthibeaut's projects Team on Vercel.

A member of the Team first needs to authorize it.

@@ -14,7 +14,7 @@ let dbInitPromise: Promise<void> | null = null
let stores: Record<string, any> = {}

const isClient = typeof window !== "undefined"
const DB_NAME = "zola-db"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep zola-db please

README.md Outdated
@@ -1,4 +1,4 @@
# Zola
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep Zola

lib/config.ts Outdated
@@ -22,8 +23,8 @@ import {
Sparkle,
} from "@phosphor-icons/react/dist/ssr"

export const NON_AUTH_DAILY_MESSAGE_LIMIT = 5
export const AUTH_DAILY_MESSAGE_LIMIT = 100
export const NON_AUTH_DAILY_MESSAGE_LIMIT = 500
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

lib/config.ts Outdated
export const NON_AUTH_DAILY_MESSAGE_LIMIT = 5
export const AUTH_DAILY_MESSAGE_LIMIT = 100
export const NON_AUTH_DAILY_MESSAGE_LIMIT = 500
export const AUTH_DAILY_MESSAGE_LIMIT = 1000
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

lib/config.ts Outdated
@@ -273,12 +280,13 @@ export const PROVIDERS_OPTIONS = [
...PROVIDERS_NOT_AVAILABLE,
] as Provider[]

export const MODEL_DEFAULT = "pixtral-large-latest"
// export const MODEL_DEFAULT = "pixtral-large-latest"
export const MODEL_DEFAULT = "deepseek-r1"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

lib/config.ts Outdated

export const APP_NAME = "Zola"
export const APP_NAME = "Zola Chat"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

lib/config.ts Outdated
export const APP_DOMAIN = "https://zola.chat"
export const APP_DESCRIPTION =
"Zola is a free, open-source AI chat app with multi-model support."
"Zola Chat is a free, open-source AI chat app with multi-model support."
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

package.json Outdated
@@ -1,5 +1,5 @@
{
"name": "chat-ai",
"name": "zola-chat",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, can you update it to "zola"? thank you

@ibelick
Copy link
Owner

ibelick commented Apr 15, 2025

@yguo thank you for the PR! can you update your branch with main? also, check my comments

@yguo
Copy link
Contributor Author

yguo commented Apr 15, 2025

Hi @ibelick Thanks for your review. I address the review feedback and push it into the feat branch. and also update my branch with main. Cheers

.gitignore Outdated
# vscode
.vscode/

# .idea
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

@@ -111,11 +111,11 @@ export function Chat() {
errorMsg = parsed.error || errorMsg
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove changes here too

@@ -205,6 +194,19 @@ export const MODELS = [
},
],
api_sdk: mistral("mistral-large-latest"),
icon: Mistral,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep mistral-large-latest description

    description:
      "Fine-tuned for chat. A lighter, faster option for everyday use.",

enabled: true,
},
],
api_sdk: "deepseek/deepseek-r1:free", // this is a special case for openrouter
description:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add description for deepseek-r1, like: A reasoning-first model trained with reinforcement learning, built for math, code, and complex problem solving.

@ibelick
Copy link
Owner

ibelick commented Apr 15, 2025

@yguo just added a few new comments, then we're good, thank you!

yguo added 2 commits April 16, 2025 00:19
…pseek

 以开始的行将被忽略,而空的提交说明将终止提交。
@yguo
Copy link
Contributor Author

yguo commented Apr 15, 2025

the review feedback is addressed. Thanks

Copy link

vercel bot commented Apr 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
zola ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 15, 2025 7:19pm

@ibelick ibelick merged commit 147ee42 into ibelick:main Apr 21, 2025
2 checks passed
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.

2 participants