package updates

This commit is contained in:
Walter Korman 2025-03-14 19:00:22 -07:00
parent 90e1c8368e
commit a7706aeaca
10 changed files with 1938 additions and 1733 deletions

View file

@ -1,4 +1,4 @@
export const DEFAULT_CHAT_MODEL: string = 'chat-model-small';
export const DEFAULT_CHAT_MODEL: string = "chat-model-small";
interface ChatModel {
id: string;
@ -8,18 +8,13 @@ interface ChatModel {
export const chatModels: Array<ChatModel> = [
{
id: 'chat-model-small',
name: 'Small model',
description: 'Small model for fast, lightweight tasks',
id: "chat-model-small",
name: "Small model",
description: "Small model for fast, lightweight tasks",
},
{
id: 'chat-model-large',
name: 'Large model',
description: 'Large model for complex, multi-step tasks',
},
{
id: 'chat-model-reasoning',
name: 'Reasoning model',
description: 'Uses advanced reasoning',
id: "chat-model-reasoning",
name: "Reasoning model",
description: "Uses advanced reasoning",
},
];

View file

@ -2,40 +2,40 @@ import {
customProvider,
extractReasoningMiddleware,
wrapLanguageModel,
} from 'ai';
import { openai } from '@ai-sdk/openai';
import { fireworks } from '@ai-sdk/fireworks';
import { isTestEnvironment } from '../constants';
} from "ai";
import { openai } from "@ai-sdk/openai";
import { fireworks } from "@ai-sdk/fireworks";
import { xai } from "@ai-sdk/xai";
import { isTestEnvironment } from "../constants";
import {
artifactModel,
chatModel,
reasoningModel,
titleModel,
} from './models.test';
} from "./models.test";
export const myProvider = isTestEnvironment
? customProvider({
languageModels: {
'chat-model-small': chatModel,
'chat-model-large': chatModel,
'chat-model-reasoning': reasoningModel,
'title-model': titleModel,
'artifact-model': artifactModel,
"chat-model-small": chatModel,
"chat-model-large": chatModel,
"chat-model-reasoning": reasoningModel,
"title-model": titleModel,
"artifact-model": artifactModel,
},
})
: customProvider({
languageModels: {
'chat-model-small': openai('gpt-4o-mini'),
'chat-model-large': openai('gpt-4o'),
'chat-model-reasoning': wrapLanguageModel({
model: fireworks('accounts/fireworks/models/deepseek-r1'),
middleware: extractReasoningMiddleware({ tagName: 'think' }),
"chat-model-small": xai("grok-2-1212"),
"chat-model-reasoning": wrapLanguageModel({
model: fireworks("accounts/fireworks/models/deepseek-r1"),
middleware: extractReasoningMiddleware({ tagName: "think" }),
}),
'title-model': openai('gpt-4-turbo'),
'artifact-model': openai('gpt-4o-mini'),
"title-model": xai("grok-2-1212"),
"artifact-model": xai("grok-2-1212"),
},
imageModels: {
'small-model': openai.image('dall-e-2'),
'large-model': openai.image('dall-e-3'),
"small-model": openai.image("dall-e-2"),
"large-model": openai.image("dall-e-3"),
},
});