-
Notifications
You must be signed in to change notification settings - Fork 207
Add DeepSeek Model Support via OpenRouter Integration #57
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
Changes from all commits
b949c60
16088d5
479ba4a
d1da823
7d2b74f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import * as React from "react" | ||
import type { SVGProps } from "react" | ||
|
||
const Icon = (props: SVGProps<SVGSVGElement>) => ( | ||
<svg fill="none" | ||
fillRule="evenodd" | ||
style={{ flex: "none", lineHeight: "1" }} | ||
height={64} | ||
width={64} | ||
viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" {...props}> | ||
|
||
<path fill="#000" | ||
fillRule="evenodd" | ||
d="M42.01 4.893l18.05 10.263v0.218l-18.235 10.153 0.043-5.293-2.053-0.075c-2.648-0.07-4.028 0.005-5.67 0.275-2.66 0.438-5.095 1.443-7.868 3.38l-5.415 3.743c-0.71 0.488-1.238 0.84-1.7 1.138l-1.288 0.805-0.993 0.585 0.963 0.575 1.325 0.845c1.19 0.785 2.925 1.99 6.753 4.665 2.775 1.938 5.208 2.943 7.868 3.38l0.75 0.113c1.735 0.228 3.438 0.235 7.063 0.083l0.055-5.398 18.05 10.263v0.218L41.473 55l0.035-4.655-1.588 0.055c-3.465 0.105-5.343 0.005-7.845-0.405-4.235-0.7-8.15-2.315-12.203-5.148l-5.395-3.75a54.993 54.993 0 01-1.888-1.245l-1.168-0.7a139.818 139.818 0 01-1.9-1.075C7.27 36.825 1.408 35.29 0 35.29V24.72l0.35 0.01c1.41-0.018 7.275-1.555 9.523-2.81l2.54-1.45 1.095-0.685c1.07-0.7 2.68-1.815 6.715-4.633 4.053-2.833 7.965-4.45 12.203-5.148 2.88-0.475 4.935-0.533 9.535-0.345l0.05-4.768z" | ||
clipRule="evenodd"> | ||
</path> | ||
</svg> | ||
) | ||
|
||
export default Icon |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ import Gemini from "@/components/icons/gemini" | |
import Grok from "@/components/icons/grok" | ||
import Mistral from "@/components/icons/mistral" | ||
import OpenAI from "@/components/icons/openai" | ||
import OpenRouter from "@/components/icons/openrouter" | ||
import { mistral } from "@ai-sdk/mistral" | ||
import { openai } from "@ai-sdk/openai" | ||
import { | ||
|
@@ -41,19 +42,7 @@ export type Model = { | |
} | ||
|
||
export const MODELS_NOT_AVAILABLE = [ | ||
{ | ||
id: "deepseek-r1", | ||
name: "DeepSeek R1", | ||
provider: "deepseek", | ||
available: false, | ||
api_sdk: false, | ||
features: [ | ||
{ | ||
id: "file-upload", | ||
enabled: false, | ||
}, | ||
], | ||
}, | ||
|
||
{ | ||
id: "gemini-1.5-pro", | ||
name: "Gemini 1.5 Pro", | ||
|
@@ -205,8 +194,22 @@ export const MODELS = [ | |
}, | ||
], | ||
api_sdk: mistral("mistral-large-latest"), | ||
icon: Mistral, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. keep description:
"Fine-tuned for chat. A lighter, faster option for everyday use.", |
||
description: "Fine-tuned for chat. A lighter, faster option for everyday use.", | ||
}, | ||
{ | ||
id: "deepseek-r1", | ||
name: "DeepSeek R1", | ||
provider: "openrouter", | ||
features: [ | ||
{ | ||
id: "file-upload", | ||
enabled: true, | ||
}, | ||
], | ||
api_sdk: "deepseek/deepseek-r1:free", // this is a special case for openrouter | ||
description: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add description for |
||
"Fine-tuned for chat. A lighter, faster option for everyday use.", | ||
"A reasoning-first model trained with reinforcement learning, built for math, code, and complex problem solving", | ||
}, | ||
] as Model[] | ||
|
||
|
@@ -253,6 +256,11 @@ const PROVIDERS_NOT_AVAILABLE = [ | |
] as Provider[] | ||
|
||
export const PROVIDERS = [ | ||
{ | ||
id: "openrouter", | ||
name: "OpenRouter", | ||
icon: OpenRouter, | ||
}, | ||
{ | ||
id: "openai", | ||
name: "OpenAI", | ||
|
@@ -410,7 +418,7 @@ export const SUGGESTIONS = [ | |
highlight: "Explain", | ||
prompt: `Explain`, | ||
items: [ | ||
"Explain quantum physics like I’m 10", | ||
"Explain quantum physics like I'm 10", | ||
"Explain stoicism in simple terms", | ||
"Explain how a neural network works", | ||
"Explain the difference between AI and AGI", | ||
|
Uh oh!
There was an error while loading. Please reload this page.