mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-09 05:25:18 +00:00
Fix Perplexity AI provider by adding hardcoded model list
Co-authored-by: Siumauricio <[email protected]>
This commit is contained in:
co-authored by
Siumauricio
parent
53f67c6eb2
commit
69d5c6f0cb
@@ -68,6 +68,40 @@ export const aiRouter = createTRPCRouter({
|
|||||||
{ headers: {} },
|
{ headers: {} },
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
case "perplexity":
|
||||||
|
// Perplexity doesn't have a /models endpoint, return hardcoded list
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
id: "sonar-deep-research",
|
||||||
|
object: "model",
|
||||||
|
created: Date.now(),
|
||||||
|
owned_by: "perplexity",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "sonar-reasoning-pro",
|
||||||
|
object: "model",
|
||||||
|
created: Date.now(),
|
||||||
|
owned_by: "perplexity",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "sonar-reasoning",
|
||||||
|
object: "model",
|
||||||
|
created: Date.now(),
|
||||||
|
owned_by: "perplexity",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "sonar-pro",
|
||||||
|
object: "model",
|
||||||
|
created: Date.now(),
|
||||||
|
owned_by: "perplexity",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "sonar",
|
||||||
|
object: "model",
|
||||||
|
created: Date.now(),
|
||||||
|
owned_by: "perplexity",
|
||||||
|
},
|
||||||
|
] as Model[];
|
||||||
default:
|
default:
|
||||||
if (!input.apiKey)
|
if (!input.apiKey)
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
|
|||||||
Reference in New Issue
Block a user