fix: Object.values missing (TS2550)

This commit is contained in:
Rotimi Best
2026-05-19 04:39:48 +01:00
parent 0048f267e2
commit b705e4d42c
3 changed files with 3 additions and 3 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ import { createOpenAI } from '@ai-sdk/openai';
import { createAnthropic } from '@ai-sdk/anthropic'; import { createAnthropic } from '@ai-sdk/anthropic';
import { createGoogleGenerativeAI } from '@ai-sdk/google'; import { createGoogleGenerativeAI } from '@ai-sdk/google';
import { createMoonshotAI } from '@ai-sdk/moonshotai'; import { createMoonshotAI } from '@ai-sdk/moonshotai';
import type { LanguageModel } from 'ai';
import { AIProvider, type AIProviderConfig } from '../types'; import { AIProvider, type AIProviderConfig } from '../types';
const DEFAULT_MODELS: Record<AIProvider, string> = { const DEFAULT_MODELS: Record<AIProvider, string> = {
@@ -22,7 +23,7 @@ const PROVIDER_API_KEY_ENV: Record<AIProvider, string> = {
* Creates an AI SDK LanguageModel from provider configuration. * Creates an AI SDK LanguageModel from provider configuration.
* Normalizes OpenAI, Anthropic, and Google into a single interface for streamText(). * Normalizes OpenAI, Anthropic, and Google into a single interface for streamText().
*/ */
export function createModel(config: AIProviderConfig) { export function createModel(config: AIProviderConfig): LanguageModel {
const modelName = config.model || DEFAULT_MODELS[config.provider]; const modelName = config.model || DEFAULT_MODELS[config.provider];
switch (config.provider) { switch (config.provider) {
-1
View File
@@ -6,7 +6,6 @@
"rootDir": "./src", "rootDir": "./src",
"module": "ES2022", "module": "ES2022",
"target": "ES2020", "target": "ES2020",
"lib": ["ES2020", "DOM"],
"moduleResolution": "bundler", "moduleResolution": "bundler",
"declaration": true, "declaration": true,
"declarationMap": true "declarationMap": true
+1 -1
View File
@@ -16,7 +16,7 @@
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
"strictNullChecks": true, "strictNullChecks": true,
"lib": ["ES2016", "DOM"] "lib": ["ES2020", "DOM"]
}, },
"exclude": ["node_modules"] "exclude": ["node_modules"]
} }