refactor model / provider code

This commit is contained in:
Ramnique Singh 2025-11-14 09:23:37 +05:30
parent 61924d0b01
commit fb355ec10d
4 changed files with 12 additions and 15 deletions

View file

@ -10,7 +10,7 @@ import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { getProvider } from "../lib/models.js";
import { DefaultModel } from "../config/config.js";
import { ModelConfig } from "../config/config.js";
const rl = readline.createInterface({ input, output });
@ -59,7 +59,7 @@ export async function startCopilot() {
let currentStep = 0;
const provider = getProvider();
const result = streamText({
model: provider(DefaultModel),
model: provider(ModelConfig.defaults.model),
messages: messages,
system: `You are an intelligent workflow assistant helping users manage their workflows in ${BASE_DIR}.