fix: make deepseek string check a bit looser (#25012)
This commit is contained in:
parent
639e27c3ce
commit
588261076a
1 changed files with 2 additions and 2 deletions
|
|
@ -197,7 +197,7 @@ function normalizeMessages(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deepseek requires all assistant messages to have reasoning on them
|
// Deepseek requires all assistant messages to have reasoning on them
|
||||||
if (model.api.id.includes("deepseek")) {
|
if (model.api.id.toLowerCase().includes("deepseek")) {
|
||||||
msgs = msgs.map((msg) => {
|
msgs = msgs.map((msg) => {
|
||||||
if (msg.role !== "assistant") return msg
|
if (msg.role !== "assistant") return msg
|
||||||
if (Array.isArray(msg.content)) {
|
if (Array.isArray(msg.content)) {
|
||||||
|
|
@ -573,7 +573,7 @@ export function variants(model: Provider.Model): Record<string, Record<string, a
|
||||||
// https://docs.venice.ai/overview/guides/reasoning-models#reasoning-effort
|
// https://docs.venice.ai/overview/guides/reasoning-models#reasoning-effort
|
||||||
case "@ai-sdk/openai-compatible":
|
case "@ai-sdk/openai-compatible":
|
||||||
const efforts = [...WIDELY_SUPPORTED_EFFORTS]
|
const efforts = [...WIDELY_SUPPORTED_EFFORTS]
|
||||||
if (model.api.id.includes("deepseek-v4")) {
|
if (model.api.id.toLowerCase().includes("deepseek-v4")) {
|
||||||
efforts.push("max")
|
efforts.push("max")
|
||||||
}
|
}
|
||||||
return Object.fromEntries(efforts.map((effort) => [effort, { reasoningEffort: effort }]))
|
return Object.fromEntries(efforts.map((effort) => [effort, { reasoningEffort: effort }]))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue