diff --git a/build.ts b/build.ts index b97946eb..61c50c9a 100644 --- a/build.ts +++ b/build.ts @@ -1,5 +1,5 @@ #!/usr/bin/env bun -import { temporalWorkflow } from './src/workflow/bun-temporal-plugin' +import { temporalWorkflow } from './packages/workflow-core/src/bun-temporal-plugin' import { bunPluginPino } from 'bun-plugin-pino' import tailwindPlugin from 'bun-plugin-tailwind' import { existsSync } from 'fs' @@ -16,7 +16,7 @@ if (existsSync(outdir)) { } await Bun.build({ - entrypoints: ['./src/index.ts'], + entrypoints: ['./packages/api/src/index.ts'], target: 'bun', outdir: outdir, minify: false, @@ -27,7 +27,7 @@ await Bun.build({ if (!config.resolve) config.resolve = {} if (!config.resolve.alias) config.resolve.alias = {} // @ts-ignore - config.resolve.alias['@'] = resolve(process.cwd(), 'src') + config.resolve.alias['@'] = resolve(process.cwd(), 'packages') return config }, }, @@ -40,6 +40,15 @@ await Bun.build({ '@temporalio/client', '@temporalio/worker', '@temporalio/workflow', + '@shumai/core', + '@shumai/db', + '@shumai/dtos', + '@shumai/workflow-core', + '@shumai/agent', + '@shumai/transcode', + '@shumai/worker-db', + '@shumai/api', + '@shumai/webui', ], // compile: { // outfile: 'Shumai', diff --git a/bun.lock b/bun.lock index 219abf77..dd032dd6 100644 --- a/bun.lock +++ b/bun.lock @@ -162,6 +162,24 @@ "@temporalio/workflow": "^1.16.1", }, }, + "packages/api": { + "name": "@shumai/api", + "version": "0.1.0", + "dependencies": { + "@hono/zod-validator": "^0.7.6", + "@shumai/agent": "workspace:*", + "@shumai/core": "workspace:*", + "@shumai/db": "workspace:*", + "@shumai/dtos": "workspace:*", + "@shumai/transcode": "workspace:*", + "@shumai/worker-db": "workspace:*", + "@shumai/workflow-core": "workspace:*", + "better-auth": "^1.6.6", + "hono": "^4.12.14", + "pino": "^10.3.1", + "zod": "^4.4.3", + }, + }, "packages/core": { "name": "@shumai/core", "version": "0.1.0", @@ -209,6 +227,13 @@ "sharp": "^0.34.5", }, }, + "packages/webui": { + "name": "@shumai/webui", + "version": "0.1.0", + "dependencies": { + "@shumai/api": "workspace:*", + }, + }, "packages/worker-db": { "name": "@shumai/worker-db", "version": "0.1.0", @@ -1015,6 +1040,8 @@ "@shumai/agent": ["@shumai/agent@workspace:packages/agent"], + "@shumai/api": ["@shumai/api@workspace:packages/api"], + "@shumai/core": ["@shumai/core@workspace:packages/core"], "@shumai/db": ["@shumai/db@workspace:packages/db"], @@ -1023,6 +1050,8 @@ "@shumai/transcode": ["@shumai/transcode@workspace:packages/transcode"], + "@shumai/webui": ["@shumai/webui@workspace:packages/webui"], + "@shumai/worker-db": ["@shumai/worker-db@workspace:packages/worker-db"], "@shumai/workflow-core": ["@shumai/workflow-core@workspace:packages/workflow-core"], diff --git a/eslint.config.js b/eslint.config.js index 81734dd6..9e0fd0f9 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -71,9 +71,10 @@ export default tseslint.config( ignores: [ '**/dist/**', '**/node_modules/**', - '**/src/generated/**', + '**/packages/db/src/generated/**', + '**/packages/core/src/generated/**', '**/data/**', - '**/src/ui/components/ui/**', + '**/packages/webui/components/ui/**', ], }, js.configs.recommended, diff --git a/package.json b/package.json index 043ca4ff..d7cf40f4 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "packages/*" ], "scripts": { - "dev": "bun run --hot src/index.ts serve", + "dev": "bun run --hot packages/api/src/index.ts serve", "typecheck": "tsc --noEmit", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "test": "bun --bun vitest run", @@ -15,7 +15,7 @@ "db:migrate": "bun run prisma migrate dev", "db:deploy": "bun run prisma migrate deploy", "generate-providers": "bun run scripts/generate-builtin-providers.ts", - "worker": "bun src/index.ts worker", + "worker": "bun packages/api/src/index.ts worker", "build": "bun run build.ts" }, "dependencies": { diff --git a/packages/agent/src/activities/agent.ts b/packages/agent/src/activities/agent.ts index f62e736a..925ff626 100644 --- a/packages/agent/src/activities/agent.ts +++ b/packages/agent/src/activities/agent.ts @@ -1,7 +1,7 @@ import { createAgentSession, fieldsToTypeBoxSchema, type AutofillField } from '../index' import { DatabaseSessionStorage } from '../database-session-storage' import type { Prisma, Skill } from '@shumai/db' -import { logger } from '@/logger' +import { logger } from '@shumai/core/src/logger' import { s3Service } from '@shumai/core/src/s3/s3' import { type AgentTool } from '@earendil-works/pi-agent-core' import { type ImageContent } from '@earendil-works/pi-ai' diff --git a/packages/agent/src/tools/analyze-asset-media.ts b/packages/agent/src/tools/analyze-asset-media.ts index 9e069889..a19ab13e 100644 --- a/packages/agent/src/tools/analyze-asset-media.ts +++ b/packages/agent/src/tools/analyze-asset-media.ts @@ -2,7 +2,7 @@ import { s3Service } from '@shumai/core/src/s3/s3' import { Type } from '@sinclair/typebox' import { type AgentTool } from '@earendil-works/pi-agent-core' import { type ImageContent, type TextContent } from '@earendil-works/pi-ai' -import { detectSupportedMimeType } from '@/utils/mime' +import { detectSupportedMimeType } from '@shumai/core/src/utils/mime' const analyzeAssetMediaSchema = Type.Object({ key: Type.String({ diff --git a/packages/agent/src/tools/create-file.ts b/packages/agent/src/tools/create-file.ts index 5354f4e6..4bc2f83e 100644 --- a/packages/agent/src/tools/create-file.ts +++ b/packages/agent/src/tools/create-file.ts @@ -4,7 +4,7 @@ import { executeAgentToolWorkflow } from './utils' import * as fs from 'fs' import * as path from 'path' import { s3Service } from '@shumai/core/src/s3/s3' -import { detectSupportedMimeType } from '@/utils/mime' +import { detectSupportedMimeType } from '@shumai/core/src/utils/mime' import { ulid } from 'ulid' function getMimeType(filePath: string): string { diff --git a/packages/agent/src/tools/create-version.ts b/packages/agent/src/tools/create-version.ts index 2d029b02..aa6a1bda 100644 --- a/packages/agent/src/tools/create-version.ts +++ b/packages/agent/src/tools/create-version.ts @@ -4,7 +4,7 @@ import { executeAgentToolWorkflow } from './utils' import * as fs from 'fs' import * as path from 'path' import { s3Service } from '@shumai/core/src/s3/s3' -import { detectSupportedMimeType } from '@/utils/mime' +import { detectSupportedMimeType } from '@shumai/core/src/utils/mime' import { ulid } from 'ulid' function getMimeType(filePath: string): string { diff --git a/packages/agent/src/tools/sandboxed-bash.ts b/packages/agent/src/tools/sandboxed-bash.ts index fbcf4b83..e9c6445e 100644 --- a/packages/agent/src/tools/sandboxed-bash.ts +++ b/packages/agent/src/tools/sandboxed-bash.ts @@ -1,4 +1,4 @@ -import { logger } from '@/logger' +import { logger } from '@shumai/core/src/logger' import { SandboxManager } from '@anthropic-ai/sandbox-runtime' import { type AgentTool, type AgentToolResult } from '@earendil-works/pi-agent-core' import { Type } from '@sinclair/typebox' diff --git a/packages/api/package.json b/packages/api/package.json new file mode 100644 index 00000000..12ada829 --- /dev/null +++ b/packages/api/package.json @@ -0,0 +1,22 @@ +{ + "name": "@shumai/api", + "version": "0.1.0", + "private": true, + "type": "module", + "main": "./src/index.ts", + "types": "./src/index.ts", + "dependencies": { + "@shumai/core": "workspace:*", + "@shumai/db": "workspace:*", + "@shumai/dtos": "workspace:*", + "@shumai/workflow-core": "workspace:*", + "@shumai/agent": "workspace:*", + "@shumai/transcode": "workspace:*", + "@shumai/worker-db": "workspace:*", + "hono": "^4.12.14", + "@hono/zod-validator": "^0.7.6", + "zod": "^4.4.3", + "better-auth": "^1.6.6", + "pino": "^10.3.1" + } +} diff --git a/src/api/agent.test.ts b/packages/api/src/api/agent.test.ts similarity index 100% rename from src/api/agent.test.ts rename to packages/api/src/api/agent.test.ts diff --git a/src/api/agent.ts b/packages/api/src/api/agent.ts similarity index 100% rename from src/api/agent.ts rename to packages/api/src/api/agent.ts diff --git a/src/api/attachment.test.ts b/packages/api/src/api/attachment.test.ts similarity index 95% rename from src/api/attachment.test.ts rename to packages/api/src/api/attachment.test.ts index 2c7ecb6b..fac3df6a 100644 --- a/src/api/attachment.test.ts +++ b/packages/api/src/api/attachment.test.ts @@ -3,10 +3,10 @@ import { Hono } from 'hono' import attachmentRoute from './attachment' import { assetService } from '@shumai/core/src/asset/asset' import { AssetType } from '@shumai/db' -import { authMiddleware } from '@/api/middleware/auth' +import { authMiddleware } from './middleware/auth' import { authzService, Permission, ResourceType } from '@shumai/core/src/authz/authz' -vi.mock('@/api/middleware/auth', () => ({ +vi.mock('./middleware/auth', () => ({ // any is used here because Hono's Context and Next types are complex to mock in vitest.mock // eslint-disable-next-line @typescript-eslint/no-explicit-any authMiddleware: async (c: any, next: any) => { diff --git a/src/api/attachment.ts b/packages/api/src/api/attachment.ts similarity index 100% rename from src/api/attachment.ts rename to packages/api/src/api/attachment.ts diff --git a/src/api/authn.test.ts b/packages/api/src/api/authn.test.ts similarity index 100% rename from src/api/authn.test.ts rename to packages/api/src/api/authn.test.ts diff --git a/src/api/authn.ts b/packages/api/src/api/authn.ts similarity index 100% rename from src/api/authn.ts rename to packages/api/src/api/authn.ts diff --git a/src/api/collection.test.ts b/packages/api/src/api/collection.test.ts similarity index 99% rename from src/api/collection.test.ts rename to packages/api/src/api/collection.test.ts index 4239ab4b..686f18fe 100644 --- a/src/api/collection.test.ts +++ b/packages/api/src/api/collection.test.ts @@ -4,7 +4,7 @@ import { authzService, Permission, ResourceType } from '@shumai/core/src/authz/a import { Hono, Context, Next } from 'hono' import collectionRoute from './collection' -vi.mock('@/api/middleware/auth', () => ({ +vi.mock('./middleware/auth', () => ({ authMiddleware: async (c: Context, next: Next) => { c.set('user', { id: 'user-1', name: 'Test User' }) await next() diff --git a/src/api/collection.ts b/packages/api/src/api/collection.ts similarity index 100% rename from src/api/collection.ts rename to packages/api/src/api/collection.ts diff --git a/src/api/file.test.ts b/packages/api/src/api/file.test.ts similarity index 99% rename from src/api/file.test.ts rename to packages/api/src/api/file.test.ts index be80550d..9106a597 100644 --- a/src/api/file.test.ts +++ b/packages/api/src/api/file.test.ts @@ -6,7 +6,7 @@ import { assetService } from '@shumai/core/src/asset/asset' import { metadataService } from '@shumai/core/src/metadata/metadata' import { notificationService } from '@shumai/core/src/notification/notification' import { s3Service } from '@shumai/core/src/s3/s3' -import { authMiddleware } from '@/api/middleware/auth' +import { authMiddleware } from './middleware/auth' import { authzService, ResourceType, Permission } from '@shumai/core/src/authz/authz' vi.mock('@shumai/core/src/authz/authz', () => ({ @@ -24,7 +24,7 @@ vi.mock('@shumai/core/src/authz/authz', () => ({ }, })) -vi.mock('@/api/middleware/auth', () => ({ +vi.mock('./middleware/auth', () => ({ authMiddleware: async (c: Context, next: Next) => { c.set('user', { id: 'user1', name: 'Test User' }) await next() diff --git a/src/api/file.ts b/packages/api/src/api/file.ts similarity index 100% rename from src/api/file.ts rename to packages/api/src/api/file.ts diff --git a/src/api/folder.test.ts b/packages/api/src/api/folder.test.ts similarity index 98% rename from src/api/folder.test.ts rename to packages/api/src/api/folder.test.ts index 2fe118ff..24b32a92 100644 --- a/src/api/folder.test.ts +++ b/packages/api/src/api/folder.test.ts @@ -4,7 +4,7 @@ import folderRoute from './folder' import { assetService } from '@shumai/core/src/asset/asset' import { searchService } from '@shumai/core/src/search/search' import { authzService, ResourceType, Permission } from '@shumai/core/src/authz/authz' -import { authMiddleware } from '@/api/middleware/auth' +import { authMiddleware } from './middleware/auth' vi.mock('@shumai/core/src/authz/authz', () => ({ authzService: { @@ -20,7 +20,7 @@ vi.mock('@shumai/core/src/authz/authz', () => ({ }, })) -vi.mock('@/api/middleware/auth', () => ({ +vi.mock('./middleware/auth', () => ({ // eslint-disable-next-line @typescript-eslint/no-explicit-any authMiddleware: async (c: any, next: any) => { c.set('user', { id: 'user1', name: 'Test User' }) diff --git a/src/api/folder.ts b/packages/api/src/api/folder.ts similarity index 100% rename from src/api/folder.ts rename to packages/api/src/api/folder.ts diff --git a/src/api/invite.test.ts b/packages/api/src/api/invite.test.ts similarity index 99% rename from src/api/invite.test.ts rename to packages/api/src/api/invite.test.ts index 14b09ebe..9fa3bf9d 100644 --- a/src/api/invite.test.ts +++ b/packages/api/src/api/invite.test.ts @@ -10,7 +10,7 @@ vi.mock('@shumai/core/src/invite/invite') vi.mock('@shumai/core/src/notification/notification') vi.mock('@shumai/core/src/authz/authz') -vi.mock('@/api/middleware/auth', () => ({ +vi.mock('./middleware/auth', () => ({ authMiddleware: async ( c: Context<{ Variables: { user: { id: string; name: string } } }>, next: Next, diff --git a/src/api/invite.ts b/packages/api/src/api/invite.ts similarity index 100% rename from src/api/invite.ts rename to packages/api/src/api/invite.ts diff --git a/src/api/metadata.test.ts b/packages/api/src/api/metadata.test.ts similarity index 99% rename from src/api/metadata.test.ts rename to packages/api/src/api/metadata.test.ts index f72836ed..18c0d733 100644 --- a/src/api/metadata.test.ts +++ b/packages/api/src/api/metadata.test.ts @@ -4,7 +4,7 @@ import metadataRoute from './metadata' import { metadataService } from '@shumai/core/src/metadata/metadata' import { authzService, Permission, ResourceType } from '@shumai/core/src/authz/authz' -vi.mock('@/api/middleware/auth', () => ({ +vi.mock('./middleware/auth', () => ({ authMiddleware: async ( c: Context<{ Variables: { user: { id: string; name: string } } }>, next: Next, diff --git a/src/api/metadata.ts b/packages/api/src/api/metadata.ts similarity index 100% rename from src/api/metadata.ts rename to packages/api/src/api/metadata.ts diff --git a/src/api/middleware/auth.ts b/packages/api/src/api/middleware/auth.ts similarity index 100% rename from src/api/middleware/auth.ts rename to packages/api/src/api/middleware/auth.ts diff --git a/src/api/notification.test.ts b/packages/api/src/api/notification.test.ts similarity index 99% rename from src/api/notification.test.ts rename to packages/api/src/api/notification.test.ts index a3a22ece..9ffc3361 100644 --- a/src/api/notification.test.ts +++ b/packages/api/src/api/notification.test.ts @@ -5,7 +5,7 @@ import { notificationService } from '@shumai/core/src/notification/notification' import { authzService, Permission, ResourceType } from '@shumai/core/src/authz/authz' import { userMetadataService } from '@shumai/core/src/user-metadata/user-metadata' -vi.mock('@/api/middleware/auth', () => ({ +vi.mock('./middleware/auth', () => ({ authMiddleware: async ( c: Context<{ Variables: { user: { id: string; name: string } } }>, next: Next, diff --git a/src/api/notification.ts b/packages/api/src/api/notification.ts similarity index 100% rename from src/api/notification.ts rename to packages/api/src/api/notification.ts diff --git a/src/api/project.test.ts b/packages/api/src/api/project.test.ts similarity index 99% rename from src/api/project.test.ts rename to packages/api/src/api/project.test.ts index 6ef03683..dba8bf0d 100644 --- a/src/api/project.test.ts +++ b/packages/api/src/api/project.test.ts @@ -5,7 +5,7 @@ import { authzService, Permission, ResourceType } from '@shumai/core/src/authz/a import { projectService } from '@shumai/core/src/project/project' import { assetService } from '@shumai/core/src/asset/asset' -vi.mock('@/api/middleware/auth', () => ({ +vi.mock('./middleware/auth', () => ({ authMiddleware: async ( c: Context<{ Variables: { user: { id: string; name: string } } }>, next: Next, diff --git a/src/api/project.ts b/packages/api/src/api/project.ts similarity index 100% rename from src/api/project.ts rename to packages/api/src/api/project.ts diff --git a/src/api/provider.test.ts b/packages/api/src/api/provider.test.ts similarity index 99% rename from src/api/provider.test.ts rename to packages/api/src/api/provider.test.ts index e053df50..97121c86 100644 --- a/src/api/provider.test.ts +++ b/packages/api/src/api/provider.test.ts @@ -4,7 +4,7 @@ import providerRoute from './provider' import { providerService } from '@shumai/core/src/provider/provider' import { authzService, Permission, ResourceType } from '@shumai/core/src/authz/authz' -vi.mock('@/api/middleware/auth', () => ({ +vi.mock('./middleware/auth', () => ({ authMiddleware: async ( c: Context<{ Variables: { user: { id: string; name: string } } }>, next: Next, diff --git a/src/api/provider.ts b/packages/api/src/api/provider.ts similarity index 100% rename from src/api/provider.ts rename to packages/api/src/api/provider.ts diff --git a/src/api/public-invite.ts b/packages/api/src/api/public-invite.ts similarity index 100% rename from src/api/public-invite.ts rename to packages/api/src/api/public-invite.ts diff --git a/src/api/public-share.ts b/packages/api/src/api/public-share.ts similarity index 100% rename from src/api/public-share.ts rename to packages/api/src/api/public-share.ts diff --git a/src/api/s3.test.ts b/packages/api/src/api/s3.test.ts similarity index 100% rename from src/api/s3.test.ts rename to packages/api/src/api/s3.test.ts diff --git a/src/api/s3.ts b/packages/api/src/api/s3.ts similarity index 100% rename from src/api/s3.ts rename to packages/api/src/api/s3.ts diff --git a/src/api/share.test.ts b/packages/api/src/api/share.test.ts similarity index 98% rename from src/api/share.test.ts rename to packages/api/src/api/share.test.ts index 6206a9d6..ae09fc1e 100644 --- a/src/api/share.test.ts +++ b/packages/api/src/api/share.test.ts @@ -2,12 +2,12 @@ import { describe, expect, test, vi, beforeEach } from 'vitest' import { Hono } from 'hono' import shareRoute from './share' import publicShareRoute from './public-share' -import { authMiddleware } from '@/api/middleware/auth' +import { authMiddleware } from './middleware/auth' import { shareService } from '@shumai/core/src/share/share' import { assetService } from '@shumai/core/src/asset/asset' import { authzService, Permission, ResourceType } from '@shumai/core/src/authz/authz' -vi.mock('@/api/middleware/auth', () => ({ +vi.mock('./middleware/auth', () => ({ // eslint-disable-next-line @typescript-eslint/no-explicit-any authMiddleware: async (c: any, next: any) => { // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/src/api/share.ts b/packages/api/src/api/share.ts similarity index 100% rename from src/api/share.ts rename to packages/api/src/api/share.ts diff --git a/src/api/skill.test.ts b/packages/api/src/api/skill.test.ts similarity index 98% rename from src/api/skill.test.ts rename to packages/api/src/api/skill.test.ts index 5dbd4e93..3d8064a6 100644 --- a/src/api/skill.test.ts +++ b/packages/api/src/api/skill.test.ts @@ -2,10 +2,10 @@ import { describe, expect, test, vi, beforeEach } from 'vitest' import { Hono } from 'hono' import skillRoute from './skill' import { skillService } from '@shumai/core/src/skill/skill' -import { authMiddleware } from '@/api/middleware/auth' +import { authMiddleware } from './middleware/auth' import { authzService, ResourceType, Permission } from '@shumai/core/src/authz/authz' -vi.mock('@/api/middleware/auth', () => ({ +vi.mock('./middleware/auth', () => ({ // eslint-disable-next-line @typescript-eslint/no-explicit-any authMiddleware: async (c: any, next: any) => { // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/src/api/skill.ts b/packages/api/src/api/skill.ts similarity index 100% rename from src/api/skill.ts rename to packages/api/src/api/skill.ts diff --git a/src/api/team.test.ts b/packages/api/src/api/team.test.ts similarity index 99% rename from src/api/team.test.ts rename to packages/api/src/api/team.test.ts index a045d4c2..b1ffc1d1 100644 --- a/src/api/team.test.ts +++ b/packages/api/src/api/team.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it, vi, beforeEach, afterEach } from 'vitest' import { Hono } from 'hono' import teamRoute from './team' -import { authMiddleware } from '@/api/middleware/auth' +import { authMiddleware } from './middleware/auth' import { teamService } from '@shumai/core/src/team/team' import { userMetadataService } from '@shumai/core/src/user-metadata/user-metadata' import { notificationService } from '@shumai/core/src/notification/notification' @@ -21,7 +21,7 @@ vi.mock('@shumai/core/src/authz/authz', () => ({ }, })) -vi.mock('@/api/middleware/auth', () => ({ +vi.mock('./middleware/auth', () => ({ // eslint-disable-next-line @typescript-eslint/no-explicit-any authMiddleware: async (c: any, next: any) => { c.set('user', { id: 'user1', name: 'Test User' }) diff --git a/src/api/team.ts b/packages/api/src/api/team.ts similarity index 100% rename from src/api/team.ts rename to packages/api/src/api/team.ts diff --git a/src/api/upload.test.ts b/packages/api/src/api/upload.test.ts similarity index 97% rename from src/api/upload.test.ts rename to packages/api/src/api/upload.test.ts index 671f554f..80d68c15 100644 --- a/src/api/upload.test.ts +++ b/packages/api/src/api/upload.test.ts @@ -1,13 +1,13 @@ import { describe, expect, it, vi, beforeEach } from 'vitest' import { Hono } from 'hono' import uploadRoute from './upload' -import { authMiddleware } from '@/api/middleware/auth' +import { authMiddleware } from './middleware/auth' import { uploadService } from '@shumai/core/src/upload/upload' import type { CreateUploadTaskResponse, TaskInfo } from '@shumai/dtos' import type { PaginatedData } from '@shumai/core/src/pagination' import { authzService, ResourceType, Permission } from '@shumai/core/src/authz/authz' -vi.mock('@/api/middleware/auth', () => ({ +vi.mock('./middleware/auth', () => ({ // We use any here because mocking Hono context and middleware // with full type safety is overly complex for these unit tests. // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/src/api/upload.ts b/packages/api/src/api/upload.ts similarity index 100% rename from src/api/upload.ts rename to packages/api/src/api/upload.ts diff --git a/src/api/versionStack.test.ts b/packages/api/src/api/versionStack.test.ts similarity index 98% rename from src/api/versionStack.test.ts rename to packages/api/src/api/versionStack.test.ts index bde6450a..39ffed2f 100644 --- a/src/api/versionStack.test.ts +++ b/packages/api/src/api/versionStack.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it, vi, beforeEach, afterEach } from 'vitest' import { Hono } from 'hono' import versionStackRoute from './versionStack' -import { authMiddleware } from '@/api/middleware/auth' +import { authMiddleware } from './middleware/auth' import { versionStackService } from '@shumai/core/src/versionStack/versionStack' import { assetService } from '@shumai/core/src/asset/asset' import { authzService, ResourceType, Permission } from '@shumai/core/src/authz/authz' @@ -21,7 +21,7 @@ vi.mock('@shumai/core/src/authz/authz', () => ({ }, })) -vi.mock('@/api/middleware/auth', () => ({ +vi.mock('./middleware/auth', () => ({ // eslint-disable-next-line @typescript-eslint/no-explicit-any authMiddleware: async (c: any, next: any) => { c.set('user', { id: 'user1', name: 'Test User' }) diff --git a/src/api/versionStack.ts b/packages/api/src/api/versionStack.ts similarity index 100% rename from src/api/versionStack.ts rename to packages/api/src/api/versionStack.ts diff --git a/src/index.ts b/packages/api/src/index.ts similarity index 67% rename from src/index.ts rename to packages/api/src/index.ts index b837736b..0211b49e 100644 --- a/src/index.ts +++ b/packages/api/src/index.ts @@ -1,17 +1,17 @@ -import { loadEnvConfig } from './env-loader' +import { loadEnvConfig } from '@shumai/core/src/env-loader' loadEnvConfig(process.cwd(), process.env.NODE_ENV !== 'production') const command = process.argv[2] if (command === 'worker') { - const { run } = await import('./cli/worker') + const { run } = await import('./worker') run().catch((err) => { console.error(err) process.exit(1) }) } else { // Default or 'serve' command - const { run } = await import('./cli/serve') + const { run } = await import('./serve') run().catch((err) => { console.error(err) process.exit(1) @@ -19,4 +19,4 @@ if (command === 'worker') { } // Re-export AppType for frontend client.ts usage (type-only) -export type { AppType } from './cli/serve' +export type { AppType } from './serve' diff --git a/src/cli/serve.ts b/packages/api/src/serve.ts similarity index 77% rename from src/cli/serve.ts rename to packages/api/src/serve.ts index f3b17df8..aa61cd36 100644 --- a/src/cli/serve.ts +++ b/packages/api/src/serve.ts @@ -1,27 +1,27 @@ -import index from '@/ui/index.html' +import index from '../../webui/index.html' import type { Prisma } from '@shumai/db' import { Hono } from 'hono' -import agentRoute from '@/api/agent' -import attachmentRoute from '@/api/attachment' -import authnRoute from '@/api/authn' -import collectionRoute from '@/api/collection' -import fileRoute from '@/api/file' -import folderRoute from '@/api/folder' -import inviteRoute from '@/api/invite' -import metadataRoute from '@/api/metadata' -import { authMiddleware } from '@/api/middleware/auth' -import notificationRoute from '@/api/notification' -import projectRoute from '@/api/project' -import providerRoute from '@/api/provider' -import publicInviteRoute from '@/api/public-invite' -import publicShareRoute from '@/api/public-share' -import s3Route from '@/api/s3' -import shareRoute from '@/api/share' -import skillRoute from '@/api/skill' -import teamRoute from '@/api/team' -import uploadRoute from '@/api/upload' -import versionStackRoute from '@/api/versionStack' +import agentRoute from './api/agent' +import attachmentRoute from './api/attachment' +import authnRoute from './api/authn' +import collectionRoute from './api/collection' +import fileRoute from './api/file' +import folderRoute from './api/folder' +import inviteRoute from './api/invite' +import metadataRoute from './api/metadata' +import { authMiddleware } from './api/middleware/auth' +import notificationRoute from './api/notification' +import projectRoute from './api/project' +import providerRoute from './api/provider' +import publicInviteRoute from './api/public-invite' +import publicShareRoute from './api/public-share' +import s3Route from './api/s3' +import shareRoute from './api/share' +import skillRoute from './api/skill' +import teamRoute from './api/team' +import uploadRoute from './api/upload' +import versionStackRoute from './api/versionStack' import { metadataService } from '@shumai/core/src/metadata/metadata' import { assetService } from '@shumai/core/src/asset/asset' import { workflowService } from '@shumai/workflow-core' diff --git a/src/cli/worker.ts b/packages/api/src/worker.ts similarity index 100% rename from src/cli/worker.ts rename to packages/api/src/worker.ts diff --git a/packages/api/tsconfig.json b/packages/api/tsconfig.json new file mode 100644 index 00000000..fc4e681f --- /dev/null +++ b/packages/api/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "ignoreDeprecations": "6.0" + }, + "include": ["src/**/*"] +} diff --git a/packages/core/src/asset/asset.ts b/packages/core/src/asset/asset.ts index d32a99f0..602855b4 100644 --- a/packages/core/src/asset/asset.ts +++ b/packages/core/src/asset/asset.ts @@ -18,7 +18,7 @@ import { AssetUserInfo, } from '@shumai/dtos' import { type Asset, AssetStatus, AssetType, Prisma, type StorageKey } from '@shumai/db' -import { logger } from '@/logger' +import { logger } from '@shumai/core/src/logger' import { PaginatedData, paginateQuery, PaginationParams } from '@shumai/core/src/pagination' import { s3Service } from '@shumai/core/src/s3/s3' import { generateKeyBetween } from 'jittered-fractional-indexing' diff --git a/src/env-loader.ts b/packages/core/src/env-loader.ts similarity index 100% rename from src/env-loader.ts rename to packages/core/src/env-loader.ts diff --git a/packages/core/src/generated/providers.generated.ts b/packages/core/src/generated/providers.generated.ts new file mode 100644 index 00000000..2a4bccd5 --- /dev/null +++ b/packages/core/src/generated/providers.generated.ts @@ -0,0 +1,16017 @@ +// This file is auto-generated by scripts/generate-builtin-providers.ts +// Do not edit manually - run 'bun run generate-providers' to update + +export const builtinProviders: Record = { + openai: { + name: 'openai', + config: { + api: 'openai-responses', + baseUrl: 'https://api.openai.com/v1', + apiKey: 'OPENAI_API_KEY', + }, + models: [ + { + modelId: 'gpt-4', + name: 'GPT-4', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text'], + contextWindow: 8192, + maxTokens: 8192, + cost: { + input: 30, + output: 60, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4-turbo', + name: 'GPT-4 Turbo', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 10, + output: 30, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4.1', + name: 'GPT-4.1', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1047576, + maxTokens: 32768, + cost: { + input: 2, + output: 8, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4.1-mini', + name: 'GPT-4.1 mini', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1047576, + maxTokens: 32768, + cost: { + input: 0.4, + output: 1.6, + cacheRead: 0.1, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4.1-nano', + name: 'GPT-4.1 nano', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1047576, + maxTokens: 32768, + cost: { + input: 0.1, + output: 0.4, + cacheRead: 0.025, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4o', + name: 'GPT-4o', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 2.5, + output: 10, + cacheRead: 1.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4o-2024-05-13', + name: 'GPT-4o (2024-05-13)', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 5, + output: 15, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4o-2024-08-06', + name: 'GPT-4o (2024-08-06)', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 2.5, + output: 10, + cacheRead: 1.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4o-2024-11-20', + name: 'GPT-4o (2024-11-20)', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 2.5, + output: 10, + cacheRead: 1.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4o-mini', + name: 'GPT-4o mini', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0.075, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5', + name: 'GPT-5', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5-chat-latest', + name: 'GPT-5 Chat Latest', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5-codex', + name: 'GPT-5-Codex', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5-mini', + name: 'GPT-5 Mini', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.25, + output: 2, + cacheRead: 0.025, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5-nano', + name: 'GPT-5 Nano', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.05, + output: 0.4, + cacheRead: 0.005, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5-pro', + name: 'GPT-5 Pro', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 272000, + cost: { + input: 15, + output: 120, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1', + name: 'GPT-5.1', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1-chat-latest', + name: 'GPT-5.1 Chat', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1-codex', + name: 'GPT-5.1 Codex', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1-codex-max', + name: 'GPT-5.1 Codex Max', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1-codex-mini', + name: 'GPT-5.1 Codex mini', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.25, + output: 2, + cacheRead: 0.025, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.2', + name: 'GPT-5.2', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.2-chat-latest', + name: 'GPT-5.2 Chat', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.2-codex', + name: 'GPT-5.2 Codex', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.2-pro', + name: 'GPT-5.2 Pro', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 21, + output: 168, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.3-chat-latest', + name: 'GPT-5.3 Chat (latest)', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.3-codex', + name: 'GPT-5.3 Codex', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.3-codex-spark', + name: 'GPT-5.3 Codex Spark', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 32000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4', + name: 'GPT-5.4', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 272000, + maxTokens: 128000, + cost: { + input: 2.5, + output: 15, + cacheRead: 0.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4-mini', + name: 'GPT-5.4 mini', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.75, + output: 4.5, + cacheRead: 0.075, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4-nano', + name: 'GPT-5.4 nano', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.2, + output: 1.25, + cacheRead: 0.02, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4-pro', + name: 'GPT-5.4 Pro', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 30, + output: 180, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.5', + name: 'GPT-5.5', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 272000, + maxTokens: 128000, + cost: { + input: 5, + output: 30, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.5-pro', + name: 'GPT-5.5 Pro', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 30, + output: 180, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o1', + name: 'o1', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 15, + output: 60, + cacheRead: 7.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o1-pro', + name: 'o1-pro', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 150, + output: 600, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o3', + name: 'o3', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 2, + output: 8, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o3-deep-research', + name: 'o3-deep-research', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 10, + output: 40, + cacheRead: 2.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o3-mini', + name: 'o3-mini', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 1.1, + output: 4.4, + cacheRead: 0.55, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o3-pro', + name: 'o3-pro', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 20, + output: 80, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o4-mini', + name: 'o4-mini', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 1.1, + output: 4.4, + cacheRead: 0.275, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o4-mini-deep-research', + name: 'o4-mini-deep-research', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 2, + output: 8, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + ], + }, + anthropic: { + name: 'anthropic', + config: { + api: 'anthropic-messages', + baseUrl: 'https://api.anthropic.com', + apiKey: 'ANTHROPIC_API_KEY', + }, + models: [ + { + modelId: 'claude-3-5-haiku-20241022', + name: 'Claude Haiku 3.5', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 8192, + cost: { + input: 0.8, + output: 4, + cacheRead: 0.08, + cacheWrite: 1, + }, + }, + }, + { + modelId: 'claude-3-5-haiku-latest', + name: 'Claude Haiku 3.5 (latest)', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 8192, + cost: { + input: 0.8, + output: 4, + cacheRead: 0.08, + cacheWrite: 1, + }, + }, + }, + { + modelId: 'claude-3-5-sonnet-20240620', + name: 'Claude Sonnet 3.5', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 8192, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'claude-3-5-sonnet-20241022', + name: 'Claude Sonnet 3.5 v2', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 8192, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'claude-3-7-sonnet-20250219', + name: 'Claude Sonnet 3.7', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'claude-3-haiku-20240307', + name: 'Claude Haiku 3', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 4096, + cost: { + input: 0.25, + output: 1.25, + cacheRead: 0.03, + cacheWrite: 0.3, + }, + }, + }, + { + modelId: 'claude-3-opus-20240229', + name: 'Claude Opus 3', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 4096, + cost: { + input: 15, + output: 75, + cacheRead: 1.5, + cacheWrite: 18.75, + }, + }, + }, + { + modelId: 'claude-3-sonnet-20240229', + name: 'Claude Sonnet 3', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 4096, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 0.3, + }, + }, + }, + { + modelId: 'claude-haiku-4-5', + name: 'Claude Haiku 4.5 (latest)', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 1, + output: 5, + cacheRead: 0.1, + cacheWrite: 1.25, + }, + }, + }, + { + modelId: 'claude-haiku-4-5-20251001', + name: 'Claude Haiku 4.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 1, + output: 5, + cacheRead: 0.1, + cacheWrite: 1.25, + }, + }, + }, + { + modelId: 'claude-opus-4-0', + name: 'Claude Opus 4 (latest)', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 15, + output: 75, + cacheRead: 1.5, + cacheWrite: 18.75, + }, + }, + }, + { + modelId: 'claude-opus-4-1', + name: 'Claude Opus 4.1 (latest)', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 15, + output: 75, + cacheRead: 1.5, + cacheWrite: 18.75, + }, + }, + }, + { + modelId: 'claude-opus-4-1-20250805', + name: 'Claude Opus 4.1', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 15, + output: 75, + cacheRead: 1.5, + cacheWrite: 18.75, + }, + }, + }, + { + modelId: 'claude-opus-4-20250514', + name: 'Claude Opus 4', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 15, + output: 75, + cacheRead: 1.5, + cacheWrite: 18.75, + }, + }, + }, + { + modelId: 'claude-opus-4-5', + name: 'Claude Opus 4.5 (latest)', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'claude-opus-4-5-20251101', + name: 'Claude Opus 4.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'claude-opus-4-6', + name: 'Claude Opus 4.6', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'claude-opus-4-7', + name: 'Claude Opus 4.7', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'claude-opus-4-8', + name: 'Claude Opus 4.8', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'claude-sonnet-4-0', + name: 'Claude Sonnet 4 (latest)', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'claude-sonnet-4-20250514', + name: 'Claude Sonnet 4', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'claude-sonnet-4-5', + name: 'Claude Sonnet 4.5 (latest)', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'claude-sonnet-4-5-20250929', + name: 'Claude Sonnet 4.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'claude-sonnet-4-6', + name: 'Claude Sonnet 4.6', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + ], + }, + google: { + name: 'google', + config: { + api: 'google-generative-ai', + baseUrl: 'https://generativelanguage.googleapis.com/v1beta', + apiKey: 'GEMINI_API_KEY', + }, + models: [ + { + modelId: 'gemini-2.0-flash', + name: 'Gemini 2.0 Flash', + config: { + api: 'google-generative-ai', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 8192, + cost: { + input: 0.1, + output: 0.4, + cacheRead: 0.025, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-2.0-flash-lite', + name: 'Gemini 2.0 Flash-Lite', + config: { + api: 'google-generative-ai', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 8192, + cost: { + input: 0.075, + output: 0.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-2.5-flash', + name: 'Gemini 2.5 Flash', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.3, + output: 2.5, + cacheRead: 0.03, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-2.5-flash-lite', + name: 'Gemini 2.5 Flash-Lite', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.1, + output: 0.4, + cacheRead: 0.01, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-2.5-pro', + name: 'Gemini 2.5 Pro', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3-flash-preview', + name: 'Gemini 3 Flash Preview', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.5, + output: 3, + cacheRead: 0.05, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3-pro-preview', + name: 'Gemini 3 Pro Preview', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 2, + output: 12, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3.1-flash-lite', + name: 'Gemini 3.1 Flash Lite', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.25, + output: 1.5, + cacheRead: 0.025, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3.1-flash-lite-preview', + name: 'Gemini 3.1 Flash Lite Preview', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.25, + output: 1.5, + cacheRead: 0.025, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3.1-pro-preview', + name: 'Gemini 3.1 Pro Preview', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 2, + output: 12, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3.1-pro-preview-customtools', + name: 'Gemini 3.1 Pro Preview Custom Tools', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 2, + output: 12, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3.5-flash', + name: 'Gemini 3.5 Flash', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 1.5, + output: 9, + cacheRead: 0.15, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-flash-latest', + name: 'Gemini Flash Latest', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.3, + output: 2.5, + cacheRead: 0.075, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-flash-lite-latest', + name: 'Gemini Flash-Lite Latest', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.1, + output: 0.4, + cacheRead: 0.025, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemma-4-26b-a4b-it', + name: 'Gemma 4 26B A4B IT', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemma-4-31b-it', + name: 'Gemma 4 31B IT', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + ], + }, + deepseek: { + name: 'deepseek', + config: { + api: 'openai-completions', + baseUrl: 'https://api.deepseek.com', + apiKey: 'DEEPSEEK_API_KEY', + }, + models: [ + { + modelId: 'deepseek-v4-flash', + name: 'DeepSeek V4 Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 384000, + cost: { + input: 0.14, + output: 0.28, + cacheRead: 0.0028, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek-v4-pro', + name: 'DeepSeek V4 Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 384000, + cost: { + input: 0.435, + output: 0.87, + cacheRead: 0.003625, + cacheWrite: 0, + }, + }, + }, + ], + }, + groq: { + name: 'groq', + config: { + api: 'openai-completions', + baseUrl: 'https://api.groq.com/openai/v1', + apiKey: 'GROQ_API_KEY', + }, + models: [ + { + modelId: 'deepseek-r1-distill-llama-70b', + name: 'DeepSeek R1 Distill Llama 70B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 8192, + cost: { + input: 0.75, + output: 0.99, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemma2-9b-it', + name: 'Gemma 2 9B', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 8192, + maxTokens: 8192, + cost: { + input: 0.2, + output: 0.2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'groq/compound', + name: 'Compound', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 8192, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'groq/compound-mini', + name: 'Compound Mini', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 8192, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'llama-3.1-8b-instant', + name: 'Llama 3.1 8B Instant', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 0.05, + output: 0.08, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'llama-3.3-70b-versatile', + name: 'Llama 3.3 70B Versatile', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 32768, + cost: { + input: 0.59, + output: 0.79, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'llama3-70b-8192', + name: 'Llama 3 70B', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 8192, + maxTokens: 8192, + cost: { + input: 0.59, + output: 0.79, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'llama3-8b-8192', + name: 'Llama 3 8B', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 8192, + maxTokens: 8192, + cost: { + input: 0.05, + output: 0.08, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta-llama/llama-4-maverick-17b-128e-instruct', + name: 'Llama 4 Maverick 17B', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 131072, + maxTokens: 8192, + cost: { + input: 0.2, + output: 0.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta-llama/llama-4-scout-17b-16e-instruct', + name: 'Llama 4 Scout 17B', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 131072, + maxTokens: 8192, + cost: { + input: 0.11, + output: 0.34, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral-saba-24b', + name: 'Mistral Saba 24B', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 32768, + maxTokens: 32768, + cost: { + input: 0.79, + output: 0.79, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/kimi-k2-instruct', + name: 'Kimi K2 Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 1, + output: 3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/kimi-k2-instruct-0905', + name: 'Kimi K2 Instruct 0905', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 16384, + cost: { + input: 1, + output: 3, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-oss-120b', + name: 'GPT OSS 120B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 65536, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0.075, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-oss-20b', + name: 'GPT OSS 20B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 65536, + cost: { + input: 0.075, + output: 0.3, + cacheRead: 0.0375, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-oss-safeguard-20b', + name: 'Safety GPT OSS 20B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 65536, + cost: { + input: 0.075, + output: 0.3, + cacheRead: 0.037, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen-qwq-32b', + name: 'Qwen QwQ 32B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 0.29, + output: 0.39, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-32b', + name: 'Qwen3 32B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 40960, + cost: { + input: 0.29, + output: 0.59, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + ], + }, + openrouter: { + name: 'openrouter', + config: { + api: 'openai-completions', + baseUrl: 'https://openrouter.ai/api/v1', + apiKey: 'OPENROUTER_API_KEY', + }, + models: [ + { + modelId: 'ai21/jamba-large-1.7', + name: 'AI21: Jamba Large 1.7', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 256000, + maxTokens: 4096, + cost: { + input: 2, + output: 8, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'amazon/nova-2-lite-v1', + name: 'Amazon: Nova 2 Lite', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 65535, + cost: { + input: 0.3, + output: 2.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'amazon/nova-lite-v1', + name: 'Amazon: Nova Lite 1.0', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 300000, + maxTokens: 5120, + cost: { + input: 0.06, + output: 0.24, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'amazon/nova-micro-v1', + name: 'Amazon: Nova Micro 1.0', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 5120, + cost: { + input: 0.035, + output: 0.14, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'amazon/nova-premier-v1', + name: 'Amazon: Nova Premier 1.0', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 32000, + cost: { + input: 2.5, + output: 12.5, + cacheRead: 0.625, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'amazon/nova-pro-v1', + name: 'Amazon: Nova Pro 1.0', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 300000, + maxTokens: 5120, + cost: { + input: 0.7999999999999999, + output: 3.1999999999999997, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'anthropic/claude-3-haiku', + name: 'Anthropic: Claude 3 Haiku', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 4096, + cost: { + input: 0.25, + output: 1.25, + cacheRead: 0.03, + cacheWrite: 0.3, + }, + }, + }, + { + modelId: 'anthropic/claude-3.5-haiku', + name: 'Anthropic: Claude 3.5 Haiku', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 8192, + cost: { + input: 0.7999999999999999, + output: 4, + cacheRead: 0.08, + cacheWrite: 1, + }, + }, + }, + { + modelId: 'anthropic/claude-haiku-4.5', + name: 'Anthropic: Claude Haiku 4.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 1, + output: 5, + cacheRead: 0.09999999999999999, + cacheWrite: 1.25, + }, + }, + }, + { + modelId: 'anthropic/claude-opus-4', + name: 'Anthropic: Claude Opus 4', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 15, + output: 75, + cacheRead: 1.5, + cacheWrite: 18.75, + }, + }, + }, + { + modelId: 'anthropic/claude-opus-4.1', + name: 'Anthropic: Claude Opus 4.1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 15, + output: 75, + cacheRead: 1.5, + cacheWrite: 18.75, + }, + }, + }, + { + modelId: 'anthropic/claude-opus-4.5', + name: 'Anthropic: Claude Opus 4.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'anthropic/claude-opus-4.6', + name: 'Anthropic: Claude Opus 4.6', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'anthropic/claude-opus-4.6-fast', + name: 'Anthropic: Claude Opus 4.6 (Fast)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 30, + output: 150, + cacheRead: 3, + cacheWrite: 37.5, + }, + }, + }, + { + modelId: 'anthropic/claude-opus-4.7', + name: 'Anthropic: Claude Opus 4.7', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'anthropic/claude-opus-4.7-fast', + name: 'Anthropic: Claude Opus 4.7 (Fast)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 30, + output: 150, + cacheRead: 3, + cacheWrite: 37.5, + }, + }, + }, + { + modelId: 'anthropic/claude-opus-4.8', + name: 'Anthropic: Claude Opus 4.8', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'anthropic/claude-opus-4.8-fast', + name: 'Anthropic: Claude Opus 4.8 (Fast)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 10, + output: 50, + cacheRead: 1, + cacheWrite: 12.5, + }, + }, + }, + { + modelId: 'anthropic/claude-sonnet-4', + name: 'Anthropic: Claude Sonnet 4', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'anthropic/claude-sonnet-4.5', + name: 'Anthropic: Claude Sonnet 4.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'anthropic/claude-sonnet-4.6', + name: 'Anthropic: Claude Sonnet 4.6', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'arcee-ai/trinity-large-thinking', + name: 'Arcee AI: Trinity Large Thinking', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.22, + output: 0.85, + cacheRead: 0.06, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'arcee-ai/trinity-mini', + name: 'Arcee AI: Trinity Mini', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 0.045, + output: 0.15, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'arcee-ai/virtuoso-large', + name: 'Arcee AI: Virtuoso Large', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 64000, + cost: { + input: 0.75, + output: 1.2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'auto', + name: 'Auto', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 2000000, + maxTokens: 30000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'baidu/ernie-4.5-vl-28b-a3b', + name: 'Baidu: ERNIE 4.5 VL 28B A3B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 131072, + maxTokens: 8000, + cost: { + input: 0.14, + output: 0.56, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'bytedance-seed/seed-1.6', + name: 'ByteDance Seed: Seed 1.6', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0.25, + output: 2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'bytedance-seed/seed-1.6-flash', + name: 'ByteDance Seed: Seed 1.6 Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0.075, + output: 0.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'bytedance-seed/seed-2.0-lite', + name: 'ByteDance Seed: Seed-2.0-Lite', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 131072, + cost: { + input: 0.25, + output: 2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'bytedance-seed/seed-2.0-mini', + name: 'ByteDance Seed: Seed-2.0-Mini', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 131072, + cost: { + input: 0.09999999999999999, + output: 0.39999999999999997, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'cohere/command-r-08-2024', + name: 'Cohere: Command R (08-2024)', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4000, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'cohere/command-r-plus-08-2024', + name: 'Cohere: Command R+ (08-2024)', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4000, + cost: { + input: 2.5, + output: 10, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-chat', + name: 'DeepSeek: DeepSeek V3', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 16000, + cost: { + input: 0.2288, + output: 0.9144, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-chat-v3-0324', + name: 'DeepSeek: DeepSeek V3 0324', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 163840, + maxTokens: 16384, + cost: { + input: 0.19999999999999998, + output: 0.77, + cacheRead: 0.135, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-chat-v3.1', + name: 'DeepSeek: DeepSeek V3.1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 163840, + maxTokens: 32768, + cost: { + input: 0.21, + output: 0.7899999999999999, + cacheRead: 0.13, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-r1', + name: 'DeepSeek: R1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 163840, + maxTokens: 16000, + cost: { + input: 0.7, + output: 2.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-r1-0528', + name: 'DeepSeek: R1 0528', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 163840, + maxTokens: 32768, + cost: { + input: 0.5, + output: 2.1500000000000004, + cacheRead: 0.35, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-v3.1-terminus', + name: 'DeepSeek: DeepSeek V3.1 Terminus', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 163840, + maxTokens: 32768, + cost: { + input: 0.27, + output: 0.95, + cacheRead: 0.13, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-v3.2', + name: 'DeepSeek: DeepSeek V3.2', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 65536, + cost: { + input: 0.252, + output: 0.378, + cacheRead: 0.0252, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-v3.2-exp', + name: 'DeepSeek: DeepSeek V3.2 Exp', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 163840, + maxTokens: 65536, + cost: { + input: 0.27, + output: 0.41, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-v4-flash', + name: 'DeepSeek: DeepSeek V4 Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1048576, + maxTokens: 131072, + cost: { + input: 0.0983, + output: 0.1966, + cacheRead: 0.019700000000000002, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-v4-pro', + name: 'DeepSeek: DeepSeek V4 Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1048576, + maxTokens: 384000, + cost: { + input: 0.435, + output: 0.87, + cacheRead: 0.003625, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'essentialai/rnj-1-instruct', + name: 'EssentialAI: Rnj 1 Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 32768, + maxTokens: 4096, + cost: { + input: 0.15, + output: 0.15, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemini-2.0-flash-001', + name: 'Google: Gemini 2.0 Flash', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 8192, + cost: { + input: 0.09999999999999999, + output: 0.39999999999999997, + cacheRead: 0.024999999999999998, + cacheWrite: 0.08333333333333334, + }, + }, + }, + { + modelId: 'google/gemini-2.0-flash-lite-001', + name: 'Google: Gemini 2.0 Flash Lite', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 8192, + cost: { + input: 0.075, + output: 0.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemini-2.5-flash', + name: 'Google: Gemini 2.5 Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65535, + cost: { + input: 0.3, + output: 2.5, + cacheRead: 0.03, + cacheWrite: 0.08333333333333334, + }, + }, + }, + { + modelId: 'google/gemini-2.5-flash-lite', + name: 'Google: Gemini 2.5 Flash Lite', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65535, + cost: { + input: 0.09999999999999999, + output: 0.39999999999999997, + cacheRead: 0.01, + cacheWrite: 0.08333333333333334, + }, + }, + }, + { + modelId: 'google/gemini-2.5-flash-lite-preview-09-2025', + name: 'Google: Gemini 2.5 Flash Lite Preview 09-2025', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65535, + cost: { + input: 0.09999999999999999, + output: 0.39999999999999997, + cacheRead: 0.01, + cacheWrite: 0.08333333333333334, + }, + }, + }, + { + modelId: 'google/gemini-2.5-pro', + name: 'Google: Gemini 2.5 Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: 'google/gemini-2.5-pro-preview', + name: 'Google: Gemini 2.5 Pro Preview 06-05', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: 'google/gemini-2.5-pro-preview-05-06', + name: 'Google: Gemini 2.5 Pro Preview 05-06', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65535, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: 'google/gemini-3-flash-preview', + name: 'Google: Gemini 3 Flash Preview', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.5, + output: 3, + cacheRead: 0.049999999999999996, + cacheWrite: 0.08333333333333334, + }, + }, + }, + { + modelId: 'google/gemini-3.1-flash-lite', + name: 'Google: Gemini 3.1 Flash Lite', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.25, + output: 1.5, + cacheRead: 0.024999999999999998, + cacheWrite: 0.08333333333333334, + }, + }, + }, + { + modelId: 'google/gemini-3.1-flash-lite-preview', + name: 'Google: Gemini 3.1 Flash Lite Preview', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.25, + output: 1.5, + cacheRead: 0.024999999999999998, + cacheWrite: 0.08333333333333334, + }, + }, + }, + { + modelId: 'google/gemini-3.1-pro-preview', + name: 'Google: Gemini 3.1 Pro Preview', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 2, + output: 12, + cacheRead: 0.19999999999999998, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: 'google/gemini-3.1-pro-preview-customtools', + name: 'Google: Gemini 3.1 Pro Preview Custom Tools', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048756, + maxTokens: 65536, + cost: { + input: 2, + output: 12, + cacheRead: 0.19999999999999998, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: 'google/gemini-3.5-flash', + name: 'Google: Gemini 3.5 Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 1.5, + output: 9, + cacheRead: 0.15, + cacheWrite: 0.08333333333333334, + }, + }, + }, + { + modelId: 'google/gemma-3-12b-it', + name: 'Google: Gemma 3 12B', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 0.04, + output: 0.13, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemma-3-27b-it', + name: 'Google: Gemma 3 27B', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 0.08, + output: 0.16, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemma-4-26b-a4b-it', + name: 'Google: Gemma 4 26B A4B ', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 4096, + cost: { + input: 0.06, + output: 0.33, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemma-4-26b-a4b-it:free', + name: 'Google: Gemma 4 26B A4B (free)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemma-4-31b-it', + name: 'Google: Gemma 4 31B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 16384, + cost: { + input: 0.12, + output: 0.37, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemma-4-31b-it:free', + name: 'Google: Gemma 4 31B (free)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'ibm-granite/granite-4.1-8b', + name: 'IBM: Granite 4.1 8B', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 0.049999999999999996, + output: 0.09999999999999999, + cacheRead: 0.049999999999999996, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'inception/mercury-2', + name: 'Inception: Mercury 2', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 50000, + cost: { + input: 0.25, + output: 0.75, + cacheRead: 0.024999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'inclusionai/ling-2.6-1t', + name: 'inclusionAI: Ling-2.6-1T', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0.075, + output: 0.625, + cacheRead: 0.015, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'inclusionai/ling-2.6-flash', + name: 'inclusionAI: Ling-2.6-flash', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0.01, + output: 0.03, + cacheRead: 0.002, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'inclusionai/ring-2.6-1t', + name: 'inclusionAI: Ring-2.6-1T', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 65536, + cost: { + input: 0.3, + output: 2.5, + cacheRead: 0.06, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kwaipilot/kat-coder-pro-v2', + name: 'Kwaipilot: KAT-Coder-Pro V2', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 256000, + maxTokens: 80000, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.06, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta-llama/llama-3.1-70b-instruct', + name: 'Meta: Llama 3.1 70B Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 0.39999999999999997, + output: 0.39999999999999997, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta-llama/llama-3.1-8b-instruct', + name: 'Meta: Llama 3.1 8B Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 0.02, + output: 0.049999999999999996, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta-llama/llama-3.3-70b-instruct', + name: 'Meta: Llama 3.3 70B Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 0.09999999999999999, + output: 0.32, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta-llama/llama-3.3-70b-instruct:free', + name: 'Meta: Llama 3.3 70B Instruct (free)', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 4096, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta-llama/llama-4-maverick', + name: 'Meta: Llama 4 Maverick', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 16384, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta-llama/llama-4-scout', + name: 'Meta: Llama 4 Scout', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 10000000, + maxTokens: 16384, + cost: { + input: 0.08, + output: 0.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'minimax/minimax-m1', + name: 'MiniMax: MiniMax M1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 40000, + cost: { + input: 0.39999999999999997, + output: 2.2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'minimax/minimax-m2', + name: 'MiniMax: MiniMax M2', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 196608, + cost: { + input: 0.255, + output: 1, + cacheRead: 0.03, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'minimax/minimax-m2.1', + name: 'MiniMax: MiniMax M2.1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 196608, + cost: { + input: 0.29, + output: 0.95, + cacheRead: 0.03, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'minimax/minimax-m2.5', + name: 'MiniMax: MiniMax M2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 196608, + cost: { + input: 0.15, + output: 1.15, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'minimax/minimax-m2.7', + name: 'MiniMax: MiniMax M2.7', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 4096, + cost: { + input: 0.26, + output: 1.2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/codestral-2508', + name: 'Mistral: Codestral 2508', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 256000, + maxTokens: 4096, + cost: { + input: 0.3, + output: 0.8999999999999999, + cacheRead: 0.03, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/devstral-2512', + name: 'Mistral: Devstral 2 2512', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 4096, + cost: { + input: 0.39999999999999997, + output: 2, + cacheRead: 0.04, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/ministral-14b-2512', + name: 'Mistral: Ministral 3 14B 2512', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 4096, + cost: { + input: 0.19999999999999998, + output: 0.19999999999999998, + cacheRead: 0.02, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/ministral-3b-2512', + name: 'Mistral: Ministral 3 3B 2512', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 131072, + maxTokens: 4096, + cost: { + input: 0.09999999999999999, + output: 0.09999999999999999, + cacheRead: 0.01, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/ministral-8b-2512', + name: 'Mistral: Ministral 3 8B 2512', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 4096, + cost: { + input: 0.15, + output: 0.15, + cacheRead: 0.015, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/mistral-large', + name: 'Mistral Large', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 2, + output: 6, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/mistral-large-2407', + name: 'Mistral Large 2407', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 4096, + cost: { + input: 2, + output: 6, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/mistral-large-2512', + name: 'Mistral: Mistral Large 3 2512', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 4096, + cost: { + input: 0.5, + output: 1.5, + cacheRead: 0.049999999999999996, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/mistral-medium-3', + name: 'Mistral: Mistral Medium 3', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 131072, + maxTokens: 4096, + cost: { + input: 0.39999999999999997, + output: 2, + cacheRead: 0.04, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/mistral-medium-3-5', + name: 'Mistral: Mistral Medium 3.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 4096, + cost: { + input: 1.5, + output: 7.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/mistral-medium-3.1', + name: 'Mistral: Mistral Medium 3.1', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 131072, + maxTokens: 4096, + cost: { + input: 0.39999999999999997, + output: 2, + cacheRead: 0.04, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/mistral-nemo', + name: 'Mistral: Mistral Nemo', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 4096, + cost: { + input: 0.02, + output: 0.03, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/mistral-saba', + name: 'Mistral: Saba', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 32768, + maxTokens: 4096, + cost: { + input: 0.19999999999999998, + output: 0.6, + cacheRead: 0.02, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/mistral-small-2603', + name: 'Mistral: Mistral Small 4', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 4096, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0.015, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/mistral-small-3.2-24b-instruct', + name: 'Mistral: Mistral Small 3.2 24B', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0.075, + output: 0.19999999999999998, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/mixtral-8x22b-instruct', + name: 'Mistral: Mixtral 8x22B Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 65536, + maxTokens: 4096, + cost: { + input: 2, + output: 6, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistralai/voxtral-small-24b-2507', + name: 'Mistral: Voxtral Small 24B 2507', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 32000, + maxTokens: 4096, + cost: { + input: 0.09999999999999999, + output: 0.3, + cacheRead: 0.01, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/kimi-k2', + name: 'MoonshotAI: Kimi K2 0711', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 32768, + cost: { + input: 0.5700000000000001, + output: 2.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/kimi-k2-0905', + name: 'MoonshotAI: Kimi K2 0905', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.6, + output: 2.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/kimi-k2-thinking', + name: 'MoonshotAI: Kimi K2 Thinking', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.6, + output: 2.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/kimi-k2.5', + name: 'MoonshotAI: Kimi K2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 4096, + cost: { + input: 0.41, + output: 2.06, + cacheRead: 0.07, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/kimi-k2.6', + name: 'MoonshotAI: Kimi K2.6', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.684, + output: 3.42, + cacheRead: 0.144, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/kimi-k2.6:free', + name: 'MoonshotAI: Kimi K2.6 (free)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 4096, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nex-agi/deepseek-v3.1-nex-n1', + name: 'Nex AGI: DeepSeek V3.1 Nex N1', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 163840, + cost: { + input: 0.135, + output: 0.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nvidia/llama-3.3-nemotron-super-49b-v1.5', + name: 'NVIDIA: Llama 3.3 Nemotron Super 49B V1.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 0.09999999999999999, + output: 0.39999999999999997, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nvidia/nemotron-3-nano-30b-a3b', + name: 'NVIDIA: Nemotron 3 Nano 30B A3B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 228000, + cost: { + input: 0.049999999999999996, + output: 0.19999999999999998, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nvidia/nemotron-3-nano-30b-a3b:free', + name: 'NVIDIA: Nemotron 3 Nano 30B A3B (free)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 256000, + maxTokens: 4096, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + name: 'NVIDIA: Nemotron 3 Nano Omni (free)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 65536, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nvidia/nemotron-3-super-120b-a12b', + name: 'NVIDIA: Nemotron 3 Super', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 4096, + cost: { + input: 0.09, + output: 0.44999999999999996, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nvidia/nemotron-3-super-120b-a12b:free', + name: 'NVIDIA: Nemotron 3 Super (free)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 262144, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nvidia/nemotron-nano-12b-v2-vl:free', + name: 'NVIDIA: Nemotron Nano 12B 2 VL (free)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 128000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nvidia/nemotron-nano-9b-v2', + name: 'NVIDIA: Nemotron Nano 9B V2', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 0.04, + output: 0.16, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nvidia/nemotron-nano-9b-v2:free', + name: 'NVIDIA: Nemotron Nano 9B V2 (free)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-3.5-turbo', + name: 'OpenAI: GPT-3.5 Turbo', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 16385, + maxTokens: 4096, + cost: { + input: 0.5, + output: 1.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-3.5-turbo-0613', + name: 'OpenAI: GPT-3.5 Turbo (older v0613)', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 4095, + maxTokens: 4096, + cost: { + input: 1, + output: 2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-3.5-turbo-16k', + name: 'OpenAI: GPT-3.5 Turbo 16k', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 16385, + maxTokens: 4096, + cost: { + input: 3, + output: 4, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4', + name: 'OpenAI: GPT-4', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 8191, + maxTokens: 4096, + cost: { + input: 30, + output: 60, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4-0314', + name: 'OpenAI: GPT-4 (older v0314)', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 8191, + maxTokens: 4096, + cost: { + input: 30, + output: 60, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4-1106-preview', + name: 'OpenAI: GPT-4 Turbo (older v1106)', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 10, + output: 30, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4-turbo', + name: 'OpenAI: GPT-4 Turbo', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 10, + output: 30, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4-turbo-preview', + name: 'OpenAI: GPT-4 Turbo Preview', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 10, + output: 30, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4.1', + name: 'OpenAI: GPT-4.1', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1047576, + maxTokens: 4096, + cost: { + input: 2, + output: 8, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4.1-mini', + name: 'OpenAI: GPT-4.1 Mini', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1047576, + maxTokens: 32768, + cost: { + input: 0.39999999999999997, + output: 1.5999999999999999, + cacheRead: 0.09999999999999999, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4.1-nano', + name: 'OpenAI: GPT-4.1 Nano', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1047576, + maxTokens: 32768, + cost: { + input: 0.09999999999999999, + output: 0.39999999999999997, + cacheRead: 0.024999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4o', + name: 'OpenAI: GPT-4o', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 2.5, + output: 10, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4o-2024-05-13', + name: 'OpenAI: GPT-4o (2024-05-13)', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 5, + output: 15, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4o-2024-08-06', + name: 'OpenAI: GPT-4o (2024-08-06)', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 2.5, + output: 10, + cacheRead: 1.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4o-2024-11-20', + name: 'OpenAI: GPT-4o (2024-11-20)', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 2.5, + output: 10, + cacheRead: 1.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4o-mini', + name: 'OpenAI: GPT-4o-mini', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0.075, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4o-mini-2024-07-18', + name: 'OpenAI: GPT-4o-mini (2024-07-18)', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0.075, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5', + name: 'OpenAI: GPT-5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5-codex', + name: 'OpenAI: GPT-5 Codex', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5-mini', + name: 'OpenAI: GPT-5 Mini', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.25, + output: 2, + cacheRead: 0.024999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5-nano', + name: 'OpenAI: GPT-5 Nano', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 4096, + cost: { + input: 0.049999999999999996, + output: 0.39999999999999997, + cacheRead: 0.01, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5-pro', + name: 'OpenAI: GPT-5 Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 15, + output: 120, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.1', + name: 'OpenAI: GPT-5.1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.13, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.1-chat', + name: 'OpenAI: GPT-5.1 Chat', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 32000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.13, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.1-codex', + name: 'OpenAI: GPT-5.1-Codex', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.13, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.1-codex-max', + name: 'OpenAI: GPT-5.1-Codex-Max', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.1-codex-mini', + name: 'OpenAI: GPT-5.1-Codex-Mini', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 100000, + cost: { + input: 0.25, + output: 2, + cacheRead: 0.024999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.2', + name: 'OpenAI: GPT-5.2', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.2-chat', + name: 'OpenAI: GPT-5.2 Chat', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.2-codex', + name: 'OpenAI: GPT-5.2-Codex', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.2-pro', + name: 'OpenAI: GPT-5.2 Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 21, + output: 168, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.3-chat', + name: 'OpenAI: GPT-5.3 Chat', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.3-codex', + name: 'OpenAI: GPT-5.3-Codex', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.4', + name: 'OpenAI: GPT-5.4', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 2.5, + output: 15, + cacheRead: 0.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.4-mini', + name: 'OpenAI: GPT-5.4 Mini', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.75, + output: 4.5, + cacheRead: 0.075, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.4-nano', + name: 'OpenAI: GPT-5.4 Nano', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.19999999999999998, + output: 1.25, + cacheRead: 0.02, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.4-pro', + name: 'OpenAI: GPT-5.4 Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 30, + output: 180, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.5', + name: 'OpenAI: GPT-5.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 5, + output: 30, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.5-pro', + name: 'OpenAI: GPT-5.5 Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 30, + output: 180, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-audio', + name: 'OpenAI: GPT Audio', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 2.5, + output: 10, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-audio-mini', + name: 'OpenAI: GPT Audio Mini', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0.6, + output: 2.4, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-chat-latest', + name: 'OpenAI: GPT Chat Latest', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 5, + output: 30, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-oss-120b', + name: 'OpenAI: gpt-oss-120b', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 4096, + cost: { + input: 0.039, + output: 0.18, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-oss-120b:free', + name: 'OpenAI: gpt-oss-120b (free)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-oss-20b', + name: 'OpenAI: gpt-oss-20b', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 4096, + cost: { + input: 0.029, + output: 0.14, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-oss-20b:free', + name: 'OpenAI: gpt-oss-20b (free)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 8192, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-oss-safeguard-20b', + name: 'OpenAI: gpt-oss-safeguard-20b', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 65536, + cost: { + input: 0.075, + output: 0.3, + cacheRead: 0.037, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/o1', + name: 'OpenAI: o1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 15, + output: 60, + cacheRead: 7.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/o3', + name: 'OpenAI: o3', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 2, + output: 8, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/o3-deep-research', + name: 'OpenAI: o3 Deep Research', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 10, + output: 40, + cacheRead: 2.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/o3-mini', + name: 'OpenAI: o3 Mini', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 1.1, + output: 4.4, + cacheRead: 0.55, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/o3-mini-high', + name: 'OpenAI: o3 Mini High', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 1.1, + output: 4.4, + cacheRead: 0.55, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/o3-pro', + name: 'OpenAI: o3 Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 20, + output: 80, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/o4-mini', + name: 'OpenAI: o4 Mini', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 1.1, + output: 4.4, + cacheRead: 0.275, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/o4-mini-deep-research', + name: 'OpenAI: o4 Mini Deep Research', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 2, + output: 8, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/o4-mini-high', + name: 'OpenAI: o4 Mini High', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 1.1, + output: 4.4, + cacheRead: 0.275, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openrouter/auto', + name: 'Auto Router', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 2000000, + maxTokens: 4096, + cost: { + input: -1000000, + output: -1000000, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openrouter/free', + name: 'Free Models Router', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 4096, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openrouter/owl-alpha', + name: 'Owl Alpha', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 1048756, + maxTokens: 262144, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'poolside/laguna-m.1:free', + name: 'Poolside: Laguna M.1 (free)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'poolside/laguna-xs.2:free', + name: 'Poolside: Laguna XS.2 (free)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'prime-intellect/intellect-3', + name: 'Prime Intellect: INTELLECT-3', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 0.19999999999999998, + output: 1.1, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen-2.5-72b-instruct', + name: 'Qwen2.5 72B Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 0.36, + output: 0.39999999999999997, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen-plus', + name: 'Qwen: Qwen-Plus', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 1000000, + maxTokens: 32768, + cost: { + input: 0.26, + output: 0.78, + cacheRead: 0.052000000000000005, + cacheWrite: 0.325, + }, + }, + }, + { + modelId: 'qwen/qwen-plus-2025-07-28', + name: 'Qwen: Qwen Plus 0728', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 1000000, + maxTokens: 32768, + cost: { + input: 0.26, + output: 0.78, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen-plus-2025-07-28:thinking', + name: 'Qwen: Qwen Plus 0728 (thinking)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 32768, + cost: { + input: 0.26, + output: 0.78, + cacheRead: 0, + cacheWrite: 0.325, + }, + }, + }, + { + modelId: 'qwen/qwen3-14b', + name: 'Qwen: Qwen3 14B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131702, + maxTokens: 40960, + cost: { + input: 0.09999999999999999, + output: 0.24, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-235b-a22b', + name: 'Qwen: Qwen3 235B A22B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 8192, + cost: { + input: 0.45499999999999996, + output: 1.8199999999999998, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-235b-a22b-2507', + name: 'Qwen: Qwen3 235B A22B Instruct 2507', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 16384, + cost: { + input: 0.071, + output: 0.09999999999999999, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-235b-a22b-thinking-2507', + name: 'Qwen: Qwen3 235B A22B Thinking 2507', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.09999999999999999, + output: 0.09999999999999999, + cacheRead: 0.09999999999999999, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-30b-a3b', + name: 'Qwen: Qwen3 30B A3B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 20000, + cost: { + input: 0.09, + output: 0.44999999999999996, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-30b-a3b-instruct-2507', + name: 'Qwen: Qwen3 30B A3B Instruct 2507', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.09, + output: 0.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-30b-a3b-thinking-2507', + name: 'Qwen: Qwen3 30B A3B Thinking 2507', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 0.08, + output: 0.39999999999999997, + cacheRead: 0.08, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-32b', + name: 'Qwen: Qwen3 32B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 0.08, + output: 0.28, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-8b', + name: 'Qwen: Qwen3 8B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 8192, + cost: { + input: 0.049999999999999996, + output: 0.39999999999999997, + cacheRead: 0.049999999999999996, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-coder', + name: 'Qwen: Qwen3 Coder 480B A35B', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.22, + output: 1.7999999999999998, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-coder-30b-a3b-instruct', + name: 'Qwen: Qwen3 Coder 30B A3B Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 160000, + maxTokens: 32768, + cost: { + input: 0.07, + output: 0.27, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-coder-flash', + name: 'Qwen: Qwen3 Coder Flash', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 1000000, + maxTokens: 65536, + cost: { + input: 0.195, + output: 0.975, + cacheRead: 0.039, + cacheWrite: 0.24375, + }, + }, + }, + { + modelId: 'qwen/qwen3-coder-next', + name: 'Qwen: Qwen3 Coder Next', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.11, + output: 0.7999999999999999, + cacheRead: 0.07, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-coder-plus', + name: 'Qwen: Qwen3 Coder Plus', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 1000000, + maxTokens: 65536, + cost: { + input: 0.65, + output: 3.25, + cacheRead: 0.13, + cacheWrite: 0.8125, + }, + }, + }, + { + modelId: 'qwen/qwen3-coder:free', + name: 'Qwen: Qwen3 Coder 480B A35B (free)', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 1048576, + maxTokens: 262000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-max', + name: 'Qwen: Qwen3 Max', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0.78, + output: 3.9, + cacheRead: 0.156, + cacheWrite: 0.975, + }, + }, + }, + { + modelId: 'qwen/qwen3-max-thinking', + name: 'Qwen: Qwen3 Max Thinking', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0.78, + output: 3.9, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-next-80b-a3b-instruct', + name: 'Qwen: Qwen3 Next 80B A3B Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 16384, + cost: { + input: 0.09, + output: 1.1, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-next-80b-a3b-instruct:free', + name: 'Qwen: Qwen3 Next 80B A3B Instruct (free)', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 4096, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-next-80b-a3b-thinking', + name: 'Qwen: Qwen3 Next 80B A3B Thinking', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0.0975, + output: 0.78, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-vl-235b-a22b-instruct', + name: 'Qwen: Qwen3 VL 235B A22B Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 16384, + cost: { + input: 0.19999999999999998, + output: 0.88, + cacheRead: 0.11, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-vl-235b-a22b-thinking', + name: 'Qwen: Qwen3 VL 235B A22B Thinking', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 131072, + maxTokens: 32768, + cost: { + input: 0.26, + output: 2.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-vl-30b-a3b-instruct', + name: 'Qwen: Qwen3 VL 30B A3B Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0.13, + output: 0.52, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-vl-30b-a3b-thinking', + name: 'Qwen: Qwen3 VL 30B A3B Thinking', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 131072, + maxTokens: 32768, + cost: { + input: 0.13, + output: 1.56, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-vl-32b-instruct', + name: 'Qwen: Qwen3 VL 32B Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0.10400000000000001, + output: 0.41600000000000004, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-vl-8b-instruct', + name: 'Qwen: Qwen3 VL 8B Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 32768, + cost: { + input: 0.08, + output: 0.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3-vl-8b-thinking', + name: 'Qwen: Qwen3 VL 8B Thinking', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 32768, + cost: { + input: 0.117, + output: 1.365, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3.5-122b-a10b', + name: 'Qwen: Qwen3.5-122B-A10B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.26, + output: 2.08, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3.5-27b', + name: 'Qwen: Qwen3.5-27B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 65536, + cost: { + input: 0.195, + output: 1.56, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3.5-35b-a3b', + name: 'Qwen: Qwen3.5-35B-A3B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.14, + output: 1, + cacheRead: 0.049999999999999996, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3.5-397b-a17b', + name: 'Qwen: Qwen3.5 397B A17B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 65536, + cost: { + input: 0.39, + output: 2.34, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3.5-9b', + name: 'Qwen: Qwen3.5-9B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 81920, + cost: { + input: 0.04, + output: 0.15, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3.5-flash-02-23', + name: 'Qwen: Qwen3.5-Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 65536, + cost: { + input: 0.065, + output: 0.26, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3.5-plus-02-15', + name: 'Qwen: Qwen3.5 Plus 2026-02-15', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 65536, + cost: { + input: 0.26, + output: 1.56, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3.5-plus-20260420', + name: 'Qwen: Qwen3.5 Plus 2026-04-20', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 65536, + cost: { + input: 0.3, + output: 1.7999999999999998, + cacheRead: 0, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: 'qwen/qwen3.6-27b', + name: 'Qwen: Qwen3.6 27B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262140, + cost: { + input: 0.29, + output: 3.1999999999999997, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3.6-35b-a3b', + name: 'Qwen: Qwen3.6 35B A3B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262140, + cost: { + input: 0.14, + output: 1, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen/qwen3.6-flash', + name: 'Qwen: Qwen3.6 Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 65536, + cost: { + input: 0.1875, + output: 1.125, + cacheRead: 0, + cacheWrite: 0.234375, + }, + }, + }, + { + modelId: 'qwen/qwen3.6-max-preview', + name: 'Qwen: Qwen3.6 Max Preview', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 65536, + cost: { + input: 1.04, + output: 6.24, + cacheRead: 0, + cacheWrite: 1.3, + }, + }, + }, + { + modelId: 'qwen/qwen3.6-plus', + name: 'Qwen: Qwen3.6 Plus', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 65536, + cost: { + input: 0.325, + output: 1.95, + cacheRead: 0, + cacheWrite: 0.40625, + }, + }, + }, + { + modelId: 'qwen/qwen3.7-max', + name: 'Qwen: Qwen3.7 Max', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 65536, + cost: { + input: 1.25, + output: 3.75, + cacheRead: 0.25, + cacheWrite: 1.5625, + }, + }, + }, + { + modelId: 'rekaai/reka-edge', + name: 'Reka Edge', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 16384, + maxTokens: 16384, + cost: { + input: 0.09999999999999999, + output: 0.09999999999999999, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'relace/relace-search', + name: 'Relace: Relace Search', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 256000, + maxTokens: 128000, + cost: { + input: 1, + output: 3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'sao10k/l3-euryale-70b', + name: 'Sao10k: Llama 3 Euryale 70B v2.1', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 8192, + maxTokens: 8192, + cost: { + input: 1.48, + output: 1.48, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'sao10k/l3.1-euryale-70b', + name: 'Sao10K: Llama 3.1 Euryale 70B v2.2', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 0.85, + output: 0.85, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'stepfun/step-3.5-flash', + name: 'StepFun: Step 3.5 Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 16384, + cost: { + input: 0.09, + output: 0.3, + cacheRead: 0.02, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'stepfun/step-3.7-flash', + name: 'StepFun: Step 3.7 Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 0.19999999999999998, + output: 1.15, + cacheRead: 0.04, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'tencent/hy3-preview', + name: 'Tencent: Hy3 preview', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 4096, + cost: { + input: 0.063, + output: 0.21, + cacheRead: 0.020999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'thedrummer/rocinante-12b', + name: 'TheDrummer: Rocinante 12B', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 32768, + maxTokens: 32768, + cost: { + input: 0.16999999999999998, + output: 0.43, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'thedrummer/unslopnemo-12b', + name: 'TheDrummer: UnslopNemo 12B', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 32768, + maxTokens: 32768, + cost: { + input: 0.39999999999999997, + output: 0.39999999999999997, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'x-ai/grok-4.20', + name: 'xAI: Grok 4.20', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 2000000, + maxTokens: 4096, + cost: { + input: 1.25, + output: 2.5, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'x-ai/grok-4.3', + name: 'xAI: Grok 4.3', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 4096, + cost: { + input: 1.25, + output: 2.5, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'x-ai/grok-build-0.1', + name: 'xAI: Grok Build 0.1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 4096, + cost: { + input: 1, + output: 2, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xiaomi/mimo-v2-flash', + name: 'Xiaomi: MiMo-V2-Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 65536, + cost: { + input: 0.09999999999999999, + output: 0.3, + cacheRead: 0.01, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xiaomi/mimo-v2.5', + name: 'Xiaomi: MiMo-V2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 131072, + cost: { + input: 0.14, + output: 0.28, + cacheRead: 0.0028, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xiaomi/mimo-v2.5-pro', + name: 'Xiaomi: MiMo-V2.5-Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1048576, + maxTokens: 131072, + cost: { + input: 0.435, + output: 0.87, + cacheRead: 0.0036, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'z-ai/glm-4-32b', + name: 'Z.ai: GLM 4 32B ', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 0.09999999999999999, + output: 0.09999999999999999, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'z-ai/glm-4.5', + name: 'Z.ai: GLM 4.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 98304, + cost: { + input: 0.6, + output: 2.2, + cacheRead: 0.11, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'z-ai/glm-4.5-air', + name: 'Z.ai: GLM 4.5 Air', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 131070, + cost: { + input: 0.125, + output: 0.85, + cacheRead: 0.06, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'z-ai/glm-4.5-air:free', + name: 'Z.ai: GLM 4.5 Air (free)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 96000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'z-ai/glm-4.5v', + name: 'Z.ai: GLM 4.5V', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 65536, + maxTokens: 16384, + cost: { + input: 0.6, + output: 1.7999999999999998, + cacheRead: 0.11, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'z-ai/glm-4.6', + name: 'Z.ai: GLM 4.6', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 202752, + maxTokens: 131072, + cost: { + input: 0.43, + output: 1.74, + cacheRead: 0.08, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'z-ai/glm-4.6v', + name: 'Z.ai: GLM 4.6V', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 131072, + maxTokens: 24000, + cost: { + input: 0.3, + output: 0.8999999999999999, + cacheRead: 0.049999999999999996, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'z-ai/glm-4.7', + name: 'Z.ai: GLM 4.7', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 202752, + maxTokens: 131072, + cost: { + input: 0.39999999999999997, + output: 1.75, + cacheRead: 0.08, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'z-ai/glm-4.7-flash', + name: 'Z.ai: GLM 4.7 Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 202752, + maxTokens: 16384, + cost: { + input: 0.06, + output: 0.39999999999999997, + cacheRead: 0.01, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'z-ai/glm-5', + name: 'Z.ai: GLM 5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 202752, + maxTokens: 4096, + cost: { + input: 0.6, + output: 1.9, + cacheRead: 0.119, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'z-ai/glm-5-turbo', + name: 'Z.ai: GLM 5 Turbo', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 202752, + maxTokens: 131072, + cost: { + input: 1.2, + output: 4, + cacheRead: 0.24, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'z-ai/glm-5.1', + name: 'Z.ai: GLM 5.1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 202752, + maxTokens: 4096, + cost: { + input: 0.98, + output: 3.08, + cacheRead: 0.182, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'z-ai/glm-5v-turbo', + name: 'Z.ai: GLM 5V Turbo', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 202752, + maxTokens: 131072, + cost: { + input: 1.2, + output: 4, + cacheRead: 0.24, + cacheWrite: 0, + }, + }, + }, + { + modelId: '~anthropic/claude-haiku-latest', + name: 'Anthropic Claude Haiku Latest', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 1, + output: 5, + cacheRead: 0.09999999999999999, + cacheWrite: 1.25, + }, + }, + }, + { + modelId: '~anthropic/claude-opus-latest', + name: 'Anthropic: Claude Opus Latest', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: '~anthropic/claude-sonnet-latest', + name: 'Anthropic Claude Sonnet Latest', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: '~google/gemini-flash-latest', + name: 'Google Gemini Flash Latest', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 1.5, + output: 9, + cacheRead: 0.15, + cacheWrite: 0.08333333333333334, + }, + }, + }, + { + modelId: '~google/gemini-pro-latest', + name: 'Google Gemini Pro Latest', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 2, + output: 12, + cacheRead: 0.19999999999999998, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: '~moonshotai/kimi-latest', + name: 'MoonshotAI Kimi Latest', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.684, + output: 3.42, + cacheRead: 0.144, + cacheWrite: 0, + }, + }, + }, + { + modelId: '~openai/gpt-latest', + name: 'OpenAI GPT Latest', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 5, + output: 30, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: '~openai/gpt-mini-latest', + name: 'OpenAI GPT Mini Latest', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.75, + output: 4.5, + cacheRead: 0.075, + cacheWrite: 0, + }, + }, + }, + ], + }, + mistral: { + name: 'mistral', + config: { + api: 'mistral-conversations', + baseUrl: 'https://api.mistral.ai', + apiKey: 'MISTRAL_API_KEY', + }, + models: [ + { + modelId: 'codestral-latest', + name: 'Codestral (latest)', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text'], + contextWindow: 256000, + maxTokens: 4096, + cost: { + input: 0.3, + output: 0.9, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'devstral-2512', + name: 'Devstral 2', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.4, + output: 2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'devstral-medium-2507', + name: 'Devstral Medium', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 128000, + cost: { + input: 0.4, + output: 2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'devstral-medium-latest', + name: 'Devstral 2 (latest)', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.4, + output: 2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'devstral-small-2505', + name: 'Devstral Small 2505', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 128000, + cost: { + input: 0.1, + output: 0.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'devstral-small-2507', + name: 'Devstral Small', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 128000, + cost: { + input: 0.1, + output: 0.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'labs-devstral-small-2512', + name: 'Devstral Small 2', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'magistral-medium-latest', + name: 'Magistral Medium (latest)', + config: { + api: 'mistral-conversations', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 2, + output: 5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'magistral-small', + name: 'Magistral Small', + config: { + api: 'mistral-conversations', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 128000, + cost: { + input: 0.5, + output: 1.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'ministral-3b-latest', + name: 'Ministral 3B (latest)', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 128000, + cost: { + input: 0.04, + output: 0.04, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'ministral-8b-latest', + name: 'Ministral 8B (latest)', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 128000, + cost: { + input: 0.1, + output: 0.1, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral-large-2411', + name: 'Mistral Large 2.1', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 2, + output: 6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral-large-2512', + name: 'Mistral Large 3', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.5, + output: 1.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral-large-latest', + name: 'Mistral Large (latest)', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.5, + output: 1.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral-medium-2505', + name: 'Mistral Medium 3', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text', 'image'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 0.4, + output: 2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral-medium-2508', + name: 'Mistral Medium 3.1', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.4, + output: 2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral-medium-2604', + name: 'Mistral Medium 3.5', + config: { + api: 'mistral-conversations', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 1.5, + output: 7.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral-medium-3.5', + name: 'Mistral Medium 3.5', + config: { + api: 'mistral-conversations', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 1.5, + output: 7.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral-medium-latest', + name: 'Mistral Medium (latest)', + config: { + api: 'mistral-conversations', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 1.5, + output: 7.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral-nemo', + name: 'Mistral Nemo', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 128000, + cost: { + input: 0.15, + output: 0.15, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral-small-2506', + name: 'Mistral Small 3.2', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0.1, + output: 0.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral-small-2603', + name: 'Mistral Small 4', + config: { + api: 'mistral-conversations', + reasoning: true, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral-small-latest', + name: 'Mistral Small (latest)', + config: { + api: 'mistral-conversations', + reasoning: true, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'open-mistral-7b', + name: 'Mistral 7B', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text'], + contextWindow: 8000, + maxTokens: 8000, + cost: { + input: 0.25, + output: 0.25, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'open-mixtral-8x22b', + name: 'Mixtral 8x22B', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text'], + contextWindow: 64000, + maxTokens: 64000, + cost: { + input: 2, + output: 6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'open-mixtral-8x7b', + name: 'Mixtral 8x7B', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text'], + contextWindow: 32000, + maxTokens: 32000, + cost: { + input: 0.7, + output: 0.7, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'pixtral-12b', + name: 'Pixtral 12B', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 128000, + cost: { + input: 0.15, + output: 0.15, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'pixtral-large-latest', + name: 'Pixtral Large (latest)', + config: { + api: 'mistral-conversations', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 128000, + cost: { + input: 2, + output: 6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + ], + }, + 'amazon-bedrock': { + name: 'amazon-bedrock', + config: { + api: 'bedrock-converse-stream', + baseUrl: 'https://bedrock-runtime.us-east-1.amazonaws.com', + apiKey: '', + }, + models: [ + { + modelId: 'amazon.nova-2-lite-v1:0', + name: 'Nova 2 Lite', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 0.33, + output: 2.75, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'amazon.nova-lite-v1:0', + name: 'Nova Lite', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text', 'image'], + contextWindow: 300000, + maxTokens: 8192, + cost: { + input: 0.06, + output: 0.24, + cacheRead: 0.015, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'amazon.nova-micro-v1:0', + name: 'Nova Micro', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 8192, + cost: { + input: 0.035, + output: 0.14, + cacheRead: 0.00875, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'amazon.nova-pro-v1:0', + name: 'Nova Pro', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text', 'image'], + contextWindow: 300000, + maxTokens: 8192, + cost: { + input: 0.8, + output: 3.2, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'anthropic.claude-haiku-4-5-20251001-v1:0', + name: 'Claude Haiku 4.5', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 1, + output: 5, + cacheRead: 0.1, + cacheWrite: 1.25, + }, + }, + }, + { + modelId: 'anthropic.claude-opus-4-1-20250805-v1:0', + name: 'Claude Opus 4.1', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 15, + output: 75, + cacheRead: 1.5, + cacheWrite: 18.75, + }, + }, + }, + { + modelId: 'anthropic.claude-opus-4-5-20251101-v1:0', + name: 'Claude Opus 4.5', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'anthropic.claude-opus-4-6-v1', + name: 'Claude Opus 4.6', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'anthropic.claude-opus-4-7', + name: 'Claude Opus 4.7', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'anthropic.claude-opus-4-8', + name: 'Claude Opus 4.8', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'anthropic.claude-sonnet-4-5-20250929-v1:0', + name: 'Claude Sonnet 4.5', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'anthropic.claude-sonnet-4-6', + name: 'Claude Sonnet 4.6', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'au.anthropic.claude-haiku-4-5-20251001-v1:0', + name: 'Claude Haiku 4.5 (AU)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 1, + output: 5, + cacheRead: 0.1, + cacheWrite: 1.25, + }, + }, + }, + { + modelId: 'au.anthropic.claude-opus-4-6-v1', + name: 'AU Anthropic Claude Opus 4.6', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 16.5, + output: 82.5, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'au.anthropic.claude-opus-4-8', + name: 'Claude Opus 4.8 (AU)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'au.anthropic.claude-sonnet-4-5-20250929-v1:0', + name: 'Claude Sonnet 4.5 (AU)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'au.anthropic.claude-sonnet-4-6', + name: 'AU Anthropic Claude Sonnet 4.6', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 3.3, + output: 16.5, + cacheRead: 0.33, + cacheWrite: 4.125, + }, + }, + }, + { + modelId: 'deepseek.r1-v1:0', + name: 'DeepSeek-R1', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 32768, + cost: { + input: 1.35, + output: 5.4, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek.v3-v1:0', + name: 'DeepSeek-V3.1', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 163840, + maxTokens: 81920, + cost: { + input: 0.58, + output: 1.68, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek.v3.2', + name: 'DeepSeek-V3.2', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 163840, + maxTokens: 81920, + cost: { + input: 0.62, + output: 1.85, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'eu.anthropic.claude-haiku-4-5-20251001-v1:0', + name: 'Claude Haiku 4.5 (EU)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 1, + output: 5, + cacheRead: 0.1, + cacheWrite: 1.25, + }, + }, + }, + { + modelId: 'eu.anthropic.claude-opus-4-5-20251101-v1:0', + name: 'Claude Opus 4.5 (EU)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'eu.anthropic.claude-opus-4-6-v1', + name: 'Claude Opus 4.6 (EU)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'eu.anthropic.claude-opus-4-7', + name: 'Claude Opus 4.7 (EU)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'eu.anthropic.claude-opus-4-8', + name: 'Claude Opus 4.8 (EU)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'eu.anthropic.claude-sonnet-4-5-20250929-v1:0', + name: 'Claude Sonnet 4.5 (EU)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'eu.anthropic.claude-sonnet-4-6', + name: 'Claude Sonnet 4.6 (EU)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'global.anthropic.claude-haiku-4-5-20251001-v1:0', + name: 'Claude Haiku 4.5 (Global)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 1, + output: 5, + cacheRead: 0.1, + cacheWrite: 1.25, + }, + }, + }, + { + modelId: 'global.anthropic.claude-opus-4-5-20251101-v1:0', + name: 'Claude Opus 4.5 (Global)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'global.anthropic.claude-opus-4-6-v1', + name: 'Claude Opus 4.6 (Global)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'global.anthropic.claude-opus-4-7', + name: 'Claude Opus 4.7 (Global)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'global.anthropic.claude-opus-4-8', + name: 'Claude Opus 4.8 (Global)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'global.anthropic.claude-sonnet-4-5-20250929-v1:0', + name: 'Claude Sonnet 4.5 (Global)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'global.anthropic.claude-sonnet-4-6', + name: 'Claude Sonnet 4.6 (Global)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'google.gemma-3-27b-it', + name: 'Google Gemma 3 27B Instruct', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text', 'image'], + contextWindow: 202752, + maxTokens: 8192, + cost: { + input: 0.12, + output: 0.2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google.gemma-3-4b-it', + name: 'Gemma 3 4B IT', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 0.04, + output: 0.08, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'jp.anthropic.claude-opus-4-7', + name: 'Claude Opus 4.7 (JP)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'jp.anthropic.claude-opus-4-8', + name: 'Claude Opus 4.8 (JP)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'jp.anthropic.claude-sonnet-4-5-20250929-v1:0', + name: 'Claude Sonnet 4.5 (JP)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'jp.anthropic.claude-sonnet-4-6', + name: 'Claude Sonnet 4.6 (JP)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'meta.llama3-1-70b-instruct-v1:0', + name: 'Llama 3.1 70B Instruct', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 0.72, + output: 0.72, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta.llama3-1-8b-instruct-v1:0', + name: 'Llama 3.1 8B Instruct', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 0.22, + output: 0.22, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta.llama3-3-70b-instruct-v1:0', + name: 'Llama 3.3 70B Instruct', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 0.72, + output: 0.72, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta.llama4-maverick-17b-instruct-v1:0', + name: 'Llama 4 Maverick 17B Instruct', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 16384, + cost: { + input: 0.24, + output: 0.97, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta.llama4-scout-17b-instruct-v1:0', + name: 'Llama 4 Scout 17B Instruct', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text', 'image'], + contextWindow: 3500000, + maxTokens: 16384, + cost: { + input: 0.17, + output: 0.66, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'minimax.minimax-m2', + name: 'MiniMax M2', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 204608, + maxTokens: 128000, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'minimax.minimax-m2.1', + name: 'MiniMax M2.1', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'minimax.minimax-m2.5', + name: 'MiniMax M2.5', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 196608, + maxTokens: 98304, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral.devstral-2-123b', + name: 'Devstral 2 123B', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 256000, + maxTokens: 8192, + cost: { + input: 0.4, + output: 2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral.magistral-small-2509', + name: 'Magistral Small 1.2', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 40000, + cost: { + input: 0.5, + output: 1.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral.ministral-3-14b-instruct', + name: 'Ministral 14B 3.0', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 0.2, + output: 0.2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral.ministral-3-3b-instruct', + name: 'Ministral 3 3B', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 8192, + cost: { + input: 0.1, + output: 0.1, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral.ministral-3-8b-instruct', + name: 'Ministral 3 8B', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 0.15, + output: 0.15, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral.mistral-large-3-675b-instruct', + name: 'Mistral Large 3', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 8192, + cost: { + input: 0.5, + output: 1.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral.pixtral-large-2502-v1:0', + name: 'Pixtral Large (25.02)', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 8192, + cost: { + input: 2, + output: 6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral.voxtral-mini-3b-2507', + name: 'Voxtral Mini 3B 2507', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 0.04, + output: 0.04, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral.voxtral-small-24b-2507', + name: 'Voxtral Small 24B 2507', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 32000, + maxTokens: 8192, + cost: { + input: 0.15, + output: 0.35, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshot.kimi-k2-thinking', + name: 'Kimi K2 Thinking', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 262143, + maxTokens: 16000, + cost: { + input: 0.6, + output: 2.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai.kimi-k2.5', + name: 'Kimi K2.5', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262143, + maxTokens: 16000, + cost: { + input: 0.6, + output: 3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nvidia.nemotron-nano-12b-v2', + name: 'NVIDIA Nemotron Nano 12B v2 VL BF16', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 0.2, + output: 0.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nvidia.nemotron-nano-3-30b', + name: 'NVIDIA Nemotron Nano 3 30B', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 0.06, + output: 0.24, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nvidia.nemotron-nano-9b-v2', + name: 'NVIDIA Nemotron Nano 9B v2', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 0.06, + output: 0.23, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nvidia.nemotron-super-3-120b', + name: 'NVIDIA Nemotron 3 Super 120B A12B', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 131072, + cost: { + input: 0.15, + output: 0.65, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai.gpt-oss-120b-1:0', + name: 'gpt-oss-120b', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai.gpt-oss-20b-1:0', + name: 'gpt-oss-20b', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0.07, + output: 0.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai.gpt-oss-safeguard-120b', + name: 'GPT OSS Safeguard 120B', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai.gpt-oss-safeguard-20b', + name: 'GPT OSS Safeguard 20B', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0.07, + output: 0.2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen.qwen3-235b-a22b-2507-v1:0', + name: 'Qwen3 235B A22B 2507', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 131072, + cost: { + input: 0.22, + output: 0.88, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen.qwen3-32b-v1:0', + name: 'Qwen3 32B (dense)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 16384, + maxTokens: 16384, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen.qwen3-coder-30b-a3b-v1:0', + name: 'Qwen3 Coder 30B A3B Instruct', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 131072, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen.qwen3-coder-480b-a35b-v1:0', + name: 'Qwen3 Coder 480B A35B Instruct', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 65536, + cost: { + input: 0.22, + output: 1.8, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen.qwen3-coder-next', + name: 'Qwen3 Coder Next', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 65536, + cost: { + input: 0.22, + output: 1.8, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen.qwen3-next-80b-a3b', + name: 'Qwen/Qwen3-Next-80B-A3B-Instruct', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text'], + contextWindow: 262000, + maxTokens: 262000, + cost: { + input: 0.14, + output: 1.4, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen.qwen3-vl-235b-a22b', + name: 'Qwen/Qwen3-VL-235B-A22B-Instruct', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text', 'image'], + contextWindow: 262000, + maxTokens: 262000, + cost: { + input: 0.3, + output: 1.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'us.anthropic.claude-haiku-4-5-20251001-v1:0', + name: 'Claude Haiku 4.5 (US)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 1, + output: 5, + cacheRead: 0.1, + cacheWrite: 1.25, + }, + }, + }, + { + modelId: 'us.anthropic.claude-opus-4-1-20250805-v1:0', + name: 'Claude Opus 4.1 (US)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 15, + output: 75, + cacheRead: 1.5, + cacheWrite: 18.75, + }, + }, + }, + { + modelId: 'us.anthropic.claude-opus-4-5-20251101-v1:0', + name: 'Claude Opus 4.5 (US)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'us.anthropic.claude-opus-4-6-v1', + name: 'Claude Opus 4.6 (US)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'us.anthropic.claude-opus-4-7', + name: 'Claude Opus 4.7 (US)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'us.anthropic.claude-opus-4-8', + name: 'Claude Opus 4.8 (US)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'us.anthropic.claude-sonnet-4-5-20250929-v1:0', + name: 'Claude Sonnet 4.5 (US)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'us.anthropic.claude-sonnet-4-6', + name: 'Claude Sonnet 4.6 (US)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'us.deepseek.r1-v1:0', + name: 'DeepSeek-R1 (US)', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 32768, + cost: { + input: 1.35, + output: 5.4, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'us.meta.llama4-maverick-17b-instruct-v1:0', + name: 'Llama 4 Maverick 17B Instruct (US)', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 16384, + cost: { + input: 0.24, + output: 0.97, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'us.meta.llama4-scout-17b-instruct-v1:0', + name: 'Llama 4 Scout 17B Instruct (US)', + config: { + api: 'bedrock-converse-stream', + reasoning: false, + input: ['text', 'image'], + contextWindow: 3500000, + maxTokens: 16384, + cost: { + input: 0.17, + output: 0.66, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'writer.palmyra-x4-v1:0', + name: 'Palmyra X4', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 122880, + maxTokens: 8192, + cost: { + input: 2.5, + output: 10, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'writer.palmyra-x5-v1:0', + name: 'Palmyra X5', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 1040000, + maxTokens: 8192, + cost: { + input: 0.6, + output: 6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai.glm-4.7', + name: 'GLM-4.7', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.6, + output: 2.2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai.glm-4.7-flash', + name: 'GLM-4.7-Flash', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 200000, + maxTokens: 131072, + cost: { + input: 0.07, + output: 0.4, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai.glm-5', + name: 'GLM-5', + config: { + api: 'bedrock-converse-stream', + reasoning: true, + input: ['text'], + contextWindow: 202752, + maxTokens: 101376, + cost: { + input: 1, + output: 3.2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + ], + }, + 'azure-openai-responses': { + name: 'azure-openai-responses', + config: { + api: 'azure-openai-responses', + baseUrl: '', + apiKey: 'AZURE_OPENAI_API_KEY', + }, + models: [ + { + modelId: 'gpt-4', + name: 'GPT-4', + config: { + api: 'azure-openai-responses', + reasoning: false, + input: ['text'], + contextWindow: 8192, + maxTokens: 8192, + cost: { + input: 30, + output: 60, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4-turbo', + name: 'GPT-4 Turbo', + config: { + api: 'azure-openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 10, + output: 30, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4.1', + name: 'GPT-4.1', + config: { + api: 'azure-openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1047576, + maxTokens: 32768, + cost: { + input: 2, + output: 8, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4.1-mini', + name: 'GPT-4.1 mini', + config: { + api: 'azure-openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1047576, + maxTokens: 32768, + cost: { + input: 0.4, + output: 1.6, + cacheRead: 0.1, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4.1-nano', + name: 'GPT-4.1 nano', + config: { + api: 'azure-openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1047576, + maxTokens: 32768, + cost: { + input: 0.1, + output: 0.4, + cacheRead: 0.025, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4o', + name: 'GPT-4o', + config: { + api: 'azure-openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 2.5, + output: 10, + cacheRead: 1.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4o-2024-05-13', + name: 'GPT-4o (2024-05-13)', + config: { + api: 'azure-openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 5, + output: 15, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4o-2024-08-06', + name: 'GPT-4o (2024-08-06)', + config: { + api: 'azure-openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 2.5, + output: 10, + cacheRead: 1.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4o-2024-11-20', + name: 'GPT-4o (2024-11-20)', + config: { + api: 'azure-openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 2.5, + output: 10, + cacheRead: 1.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4o-mini', + name: 'GPT-4o mini', + config: { + api: 'azure-openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0.075, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5', + name: 'GPT-5', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5-chat-latest', + name: 'GPT-5 Chat Latest', + config: { + api: 'azure-openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5-codex', + name: 'GPT-5-Codex', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5-mini', + name: 'GPT-5 Mini', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.25, + output: 2, + cacheRead: 0.025, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5-nano', + name: 'GPT-5 Nano', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.05, + output: 0.4, + cacheRead: 0.005, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5-pro', + name: 'GPT-5 Pro', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 272000, + cost: { + input: 15, + output: 120, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1', + name: 'GPT-5.1', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1-chat-latest', + name: 'GPT-5.1 Chat', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1-codex', + name: 'GPT-5.1 Codex', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1-codex-max', + name: 'GPT-5.1 Codex Max', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1-codex-mini', + name: 'GPT-5.1 Codex mini', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.25, + output: 2, + cacheRead: 0.025, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.2', + name: 'GPT-5.2', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.2-chat-latest', + name: 'GPT-5.2 Chat', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.2-codex', + name: 'GPT-5.2 Codex', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.2-pro', + name: 'GPT-5.2 Pro', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 21, + output: 168, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.3-chat-latest', + name: 'GPT-5.3 Chat (latest)', + config: { + api: 'azure-openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.3-codex', + name: 'GPT-5.3 Codex', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.3-codex-spark', + name: 'GPT-5.3 Codex Spark', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 32000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4', + name: 'GPT-5.4', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 272000, + maxTokens: 128000, + cost: { + input: 2.5, + output: 15, + cacheRead: 0.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4-mini', + name: 'GPT-5.4 mini', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.75, + output: 4.5, + cacheRead: 0.075, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4-nano', + name: 'GPT-5.4 nano', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.2, + output: 1.25, + cacheRead: 0.02, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4-pro', + name: 'GPT-5.4 Pro', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 30, + output: 180, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.5', + name: 'GPT-5.5', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 272000, + maxTokens: 128000, + cost: { + input: 5, + output: 30, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.5-pro', + name: 'GPT-5.5 Pro', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 30, + output: 180, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o1', + name: 'o1', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 15, + output: 60, + cacheRead: 7.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o1-pro', + name: 'o1-pro', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 150, + output: 600, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o3', + name: 'o3', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 2, + output: 8, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o3-deep-research', + name: 'o3-deep-research', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 10, + output: 40, + cacheRead: 2.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o3-mini', + name: 'o3-mini', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 1.1, + output: 4.4, + cacheRead: 0.55, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o3-pro', + name: 'o3-pro', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 20, + output: 80, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o4-mini', + name: 'o4-mini', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 1.1, + output: 4.4, + cacheRead: 0.275, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o4-mini-deep-research', + name: 'o4-mini-deep-research', + config: { + api: 'azure-openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 2, + output: 8, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + ], + }, + cerebras: { + name: 'cerebras', + config: { + api: 'openai-completions', + baseUrl: 'https://api.cerebras.ai/v1', + apiKey: 'CEREBRAS_API_KEY', + }, + models: [ + { + modelId: 'gpt-oss-120b', + name: 'GPT OSS 120B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 32768, + cost: { + input: 0.25, + output: 0.69, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'llama3.1-8b', + name: 'Llama 3.1 8B', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 32000, + maxTokens: 8000, + cost: { + input: 0.1, + output: 0.1, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai-glm-4.7', + name: 'Z.AI GLM-4.7', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 40000, + cost: { + input: 2.25, + output: 2.75, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + ], + }, + 'cloudflare-ai-gateway': { + name: 'cloudflare-ai-gateway', + config: { + api: 'anthropic-messages', + baseUrl: + 'https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic', + apiKey: 'CLOUDFLARE_API_KEY', + }, + models: [ + { + modelId: 'claude-3-5-haiku', + name: 'Claude Haiku 3.5 (latest)', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 8192, + cost: { + input: 0.8, + output: 4, + cacheRead: 0.08, + cacheWrite: 1, + }, + }, + }, + { + modelId: 'claude-3-haiku', + name: 'Claude Haiku 3', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 4096, + cost: { + input: 0.25, + output: 1.25, + cacheRead: 0.03, + cacheWrite: 0.3, + }, + }, + }, + { + modelId: 'claude-3-opus', + name: 'Claude Opus 3', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 4096, + cost: { + input: 15, + output: 75, + cacheRead: 1.5, + cacheWrite: 18.75, + }, + }, + }, + { + modelId: 'claude-3-sonnet', + name: 'Claude Sonnet 3', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 4096, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 0.3, + }, + }, + }, + { + modelId: 'claude-3.5-haiku', + name: 'Claude Haiku 3.5 (latest)', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 8192, + cost: { + input: 0.8, + output: 4, + cacheRead: 0.08, + cacheWrite: 1, + }, + }, + }, + { + modelId: 'claude-3.5-sonnet', + name: 'Claude Sonnet 3.5 v2', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 8192, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'claude-haiku-4-5', + name: 'Claude Haiku 4.5 (latest)', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 1, + output: 5, + cacheRead: 0.1, + cacheWrite: 1.25, + }, + }, + }, + { + modelId: 'claude-opus-4', + name: 'Claude Opus 4 (latest)', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 15, + output: 75, + cacheRead: 1.5, + cacheWrite: 18.75, + }, + }, + }, + { + modelId: 'claude-opus-4-1', + name: 'Claude Opus 4.1 (latest)', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 15, + output: 75, + cacheRead: 1.5, + cacheWrite: 18.75, + }, + }, + }, + { + modelId: 'claude-opus-4-5', + name: 'Claude Opus 4.5 (latest)', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'claude-opus-4-6', + name: 'Claude Opus 4.6 (latest)', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'claude-opus-4-7', + name: 'Claude Opus 4.7', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'claude-opus-4-8', + name: 'Claude Opus 4.8', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'claude-sonnet-4', + name: 'Claude Sonnet 4 (latest)', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'claude-sonnet-4-5', + name: 'Claude Sonnet 4.5 (latest)', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'claude-sonnet-4-6', + name: 'Claude Sonnet 4.6', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'gpt-4', + name: 'GPT-4', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text'], + contextWindow: 8192, + maxTokens: 8192, + cost: { + input: 30, + output: 60, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4-turbo', + name: 'GPT-4 Turbo', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 10, + output: 30, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4o', + name: 'GPT-4o', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 2.5, + output: 10, + cacheRead: 1.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4o-mini', + name: 'GPT-4o mini', + config: { + api: 'openai-responses', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0.08, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1', + name: 'GPT-5.1', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.13, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1-codex', + name: 'GPT-5.1 Codex', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.2', + name: 'GPT-5.2', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.2-codex', + name: 'GPT-5.2 Codex', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.3-codex', + name: 'GPT-5.3 Codex', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4', + name: 'GPT-5.4', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 2.5, + output: 15, + cacheRead: 0.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.5', + name: 'GPT-5.5', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 5, + output: 30, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o1', + name: 'o1', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 15, + output: 60, + cacheRead: 7.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o3', + name: 'o3', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 2, + output: 8, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o3-mini', + name: 'o3-mini', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 1.1, + output: 4.4, + cacheRead: 0.55, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o3-pro', + name: 'o3-pro', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 20, + output: 80, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'o4-mini', + name: 'o4-mini', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 1.1, + output: 4.4, + cacheRead: 0.28, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'workers-ai/@cf/moonshotai/kimi-k2.5', + name: 'Kimi K2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 0.6, + output: 3, + cacheRead: 0.1, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'workers-ai/@cf/moonshotai/kimi-k2.6', + name: 'Kimi K2.6', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 0.95, + output: 4, + cacheRead: 0.16, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'workers-ai/@cf/nvidia/nemotron-3-120b-a12b', + name: 'Nemotron 3 Super 120B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 0.5, + output: 1.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'workers-ai/@cf/zai-org/glm-4.7-flash', + name: 'GLM-4.7-Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 0.06, + output: 0.4, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + ], + }, + 'cloudflare-workers-ai': { + name: 'cloudflare-workers-ai', + config: { + api: 'openai-completions', + baseUrl: 'https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1', + apiKey: 'CLOUDFLARE_API_KEY', + }, + models: [ + { + modelId: '@cf/google/gemma-4-26b-a4b-it', + name: 'Gemma 4 26B A4B IT', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 16384, + cost: { + input: 0.1, + output: 0.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: '@cf/ibm-granite/granite-4.0-h-micro', + name: 'Granite 4.0 H Micro', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131000, + maxTokens: 131000, + cost: { + input: 0.017, + output: 0.112, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: '@cf/meta/llama-3.3-70b-instruct-fp8-fast', + name: 'Llama 3.3 70B Instruct fp8 Fast', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 24000, + maxTokens: 24000, + cost: { + input: 0.293, + output: 2.253, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: '@cf/meta/llama-4-scout-17b-16e-instruct', + name: 'Llama 4 Scout 17B 16E Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 131000, + maxTokens: 16384, + cost: { + input: 0.27, + output: 0.85, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: '@cf/mistralai/mistral-small-3.1-24b-instruct', + name: 'Mistral Small 3.1 24B Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 128000, + cost: { + input: 0.351, + output: 0.555, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: '@cf/moonshotai/kimi-k2.6', + name: 'Kimi K2.6', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 256000, + cost: { + input: 0.95, + output: 4, + cacheRead: 0.16, + cacheWrite: 0, + }, + }, + }, + { + modelId: '@cf/nvidia/nemotron-3-120b-a12b', + name: 'Nemotron 3 Super 120B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 0.5, + output: 1.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: '@cf/openai/gpt-oss-120b', + name: 'GPT OSS 120B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0.35, + output: 0.75, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: '@cf/openai/gpt-oss-20b', + name: 'GPT OSS 20B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0.2, + output: 0.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: '@cf/qwen/qwen3-30b-a3b-fp8', + name: 'Qwen3 30B A3b fp8', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 32768, + maxTokens: 32768, + cost: { + input: 0.0509, + output: 0.335, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: '@cf/zai-org/glm-4.7-flash', + name: 'GLM-4.7-Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 0.0605, + output: 0.4, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + ], + }, + fireworks: { + name: 'fireworks', + config: { + api: 'anthropic-messages', + baseUrl: 'https://api.fireworks.ai/inference', + apiKey: 'FIREWORKS_API_KEY', + }, + models: [ + { + modelId: 'accounts/fireworks/models/deepseek-v4-flash', + name: 'DeepSeek V4 Flash', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 384000, + cost: { + input: 0.14, + output: 0.28, + cacheRead: 0.03, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'accounts/fireworks/models/deepseek-v4-pro', + name: 'DeepSeek V4 Pro', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 384000, + cost: { + input: 1.74, + output: 3.48, + cacheRead: 0.145, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'accounts/fireworks/models/glm-5p1', + name: 'GLM 5.1', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 202800, + maxTokens: 131072, + cost: { + input: 1.4, + output: 4.4, + cacheRead: 0.26, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'accounts/fireworks/models/gpt-oss-120b', + name: 'GPT OSS 120B', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 32768, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0.015, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'accounts/fireworks/models/gpt-oss-20b', + name: 'GPT OSS 20B', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 32768, + cost: { + input: 0.07, + output: 0.3, + cacheRead: 0.035, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'accounts/fireworks/models/kimi-k2p5', + name: 'Kimi K2.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 0.6, + output: 3, + cacheRead: 0.1, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'accounts/fireworks/models/kimi-k2p6', + name: 'Kimi K2.6', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262000, + maxTokens: 262000, + cost: { + input: 0.95, + output: 4, + cacheRead: 0.16, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'accounts/fireworks/models/minimax-m2p5', + name: 'MiniMax-M2.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 196608, + maxTokens: 196608, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.03, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'accounts/fireworks/models/minimax-m2p7', + name: 'MiniMax-M2.7', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 196608, + maxTokens: 196608, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.06, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'accounts/fireworks/models/qwen3p6-plus', + name: 'Qwen 3.6 Plus', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 8192, + cost: { + input: 0.5, + output: 3, + cacheRead: 0.1, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'accounts/fireworks/routers/glm-5p1-fast', + name: 'GLM 5.1 Fast', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 202800, + maxTokens: 131072, + cost: { + input: 2.8, + output: 8.8, + cacheRead: 0.52, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'accounts/fireworks/routers/kimi-k2p6-turbo', + name: 'Kimi K2.6 Turbo', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262000, + maxTokens: 262000, + cost: { + input: 2, + output: 8, + cacheRead: 0.3, + cacheWrite: 0, + }, + }, + }, + ], + }, + 'github-copilot': { + name: 'github-copilot', + config: { + api: 'anthropic-messages', + baseUrl: 'https://api.individual.githubcopilot.com', + apiKey: 'COPILOT_GITHUB_TOKEN', + }, + models: [ + { + modelId: 'claude-haiku-4.5', + name: 'Claude Haiku 4.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'claude-opus-4.5', + name: 'Claude Opus 4.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'claude-opus-4.6', + name: 'Claude Opus 4.6', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 32000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'claude-opus-4.7', + name: 'Claude Opus 4.7', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'claude-opus-4.8', + name: 'Claude Opus 4.8', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'claude-sonnet-4.5', + name: 'Claude Sonnet 4.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'claude-sonnet-4.6', + name: 'Claude Sonnet 4.6', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 32000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-2.5-pro', + name: 'Gemini 2.5 Pro', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 64000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3-flash-preview', + name: 'Gemini 3 Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 64000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3.1-pro-preview', + name: 'Gemini 3.1 Pro Preview', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3.5-flash', + name: 'Gemini 3.5 Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4.1', + name: 'GPT-4.1', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-4o', + name: 'GPT-4o', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5-mini', + name: 'GPT-5-mini', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 264000, + maxTokens: 64000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.2', + name: 'GPT-5.2', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.2-codex', + name: 'GPT-5.2-Codex', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.3-codex', + name: 'GPT-5.3-Codex', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4', + name: 'GPT-5.4', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4-mini', + name: 'GPT-5.4 Mini', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.5', + name: 'GPT-5.5', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'grok-code-fast-1', + name: 'Grok Code Fast 1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 64000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + ], + }, + 'google-vertex': { + name: 'google-vertex', + config: { + api: 'google-vertex', + baseUrl: 'https://{location}-aiplatform.googleapis.com', + apiKey: 'GOOGLE_CLOUD_API_KEY', + }, + models: [ + { + modelId: 'gemini-1.5-flash', + name: 'Gemini 1.5 Flash (Vertex)', + config: { + api: 'google-vertex', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 8192, + cost: { + input: 0.075, + output: 0.3, + cacheRead: 0.01875, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-1.5-flash-8b', + name: 'Gemini 1.5 Flash-8B (Vertex)', + config: { + api: 'google-vertex', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 8192, + cost: { + input: 0.0375, + output: 0.15, + cacheRead: 0.01, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-1.5-pro', + name: 'Gemini 1.5 Pro (Vertex)', + config: { + api: 'google-vertex', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 8192, + cost: { + input: 1.25, + output: 5, + cacheRead: 0.3125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-2.0-flash', + name: 'Gemini 2.0 Flash (Vertex)', + config: { + api: 'google-vertex', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 8192, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0.0375, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-2.0-flash-lite', + name: 'Gemini 2.0 Flash Lite (Vertex)', + config: { + api: 'google-vertex', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.075, + output: 0.3, + cacheRead: 0.01875, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-2.5-flash', + name: 'Gemini 2.5 Flash (Vertex)', + config: { + api: 'google-vertex', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.3, + output: 2.5, + cacheRead: 0.03, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-2.5-flash-lite', + name: 'Gemini 2.5 Flash Lite (Vertex)', + config: { + api: 'google-vertex', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.1, + output: 0.4, + cacheRead: 0.01, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-2.5-flash-lite-preview-09-2025', + name: 'Gemini 2.5 Flash Lite Preview 09-25 (Vertex)', + config: { + api: 'google-vertex', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.1, + output: 0.4, + cacheRead: 0.01, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-2.5-pro', + name: 'Gemini 2.5 Pro (Vertex)', + config: { + api: 'google-vertex', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3-flash-preview', + name: 'Gemini 3 Flash Preview (Vertex)', + config: { + api: 'google-vertex', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.5, + output: 3, + cacheRead: 0.05, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3-pro-preview', + name: 'Gemini 3 Pro Preview (Vertex)', + config: { + api: 'google-vertex', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 2, + output: 12, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3.1-pro-preview', + name: 'Gemini 3.1 Pro Preview (Vertex)', + config: { + api: 'google-vertex', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 2, + output: 12, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3.1-pro-preview-customtools', + name: 'Gemini 3.1 Pro Preview Custom Tools (Vertex)', + config: { + api: 'google-vertex', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 2, + output: 12, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + ], + }, + huggingface: { + name: 'huggingface', + config: { + api: 'openai-completions', + baseUrl: 'https://router.huggingface.co/v1', + apiKey: 'HF_TOKEN', + }, + models: [ + { + modelId: 'MiniMaxAI/MiniMax-M2.1', + name: 'MiniMax-M2.1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'MiniMaxAI/MiniMax-M2.5', + name: 'MiniMax-M2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.03, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'MiniMaxAI/MiniMax-M2.7', + name: 'MiniMax-M2.7', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.06, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'Qwen/Qwen3-235B-A22B-Thinking-2507', + name: 'Qwen3-235B-A22B-Thinking-2507', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 131072, + cost: { + input: 0.3, + output: 3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'Qwen/Qwen3-Coder-480B-A35B-Instruct', + name: 'Qwen3-Coder-480B-A35B-Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 66536, + cost: { + input: 2, + output: 2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'Qwen/Qwen3-Coder-Next', + name: 'Qwen3-Coder-Next', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 65536, + cost: { + input: 0.2, + output: 1.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'Qwen/Qwen3-Next-80B-A3B-Instruct', + name: 'Qwen3-Next-80B-A3B-Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 66536, + cost: { + input: 0.25, + output: 1, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'Qwen/Qwen3-Next-80B-A3B-Thinking', + name: 'Qwen3-Next-80B-A3B-Thinking', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 131072, + cost: { + input: 0.3, + output: 2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'Qwen/Qwen3.5-397B-A17B', + name: 'Qwen3.5-397B-A17B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0.6, + output: 3.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'XiaomiMiMo/MiMo-V2-Flash', + name: 'MiMo-V2-Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 4096, + cost: { + input: 0.1, + output: 0.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek-ai/DeepSeek-R1-0528', + name: 'DeepSeek-R1-0528', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 163840, + maxTokens: 163840, + cost: { + input: 3, + output: 5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek-ai/DeepSeek-V3.2', + name: 'DeepSeek-V3.2', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 163840, + maxTokens: 65536, + cost: { + input: 0.28, + output: 0.4, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek-ai/DeepSeek-V4-Pro', + name: 'DeepSeek V4 Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1048576, + maxTokens: 393216, + cost: { + input: 0.435, + output: 0.87, + cacheRead: 0.003625, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/Kimi-K2-Instruct', + name: 'Kimi-K2-Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 1, + output: 3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/Kimi-K2-Instruct-0905', + name: 'Kimi-K2-Instruct-0905', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 16384, + cost: { + input: 1, + output: 3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/Kimi-K2-Thinking', + name: 'Kimi-K2-Thinking', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.6, + output: 2.5, + cacheRead: 0.15, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/Kimi-K2.5', + name: 'Kimi-K2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.6, + output: 3, + cacheRead: 0.1, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/Kimi-K2.6', + name: 'Kimi-K2.6', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.95, + output: 4, + cacheRead: 0.16, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai-org/GLM-4.7', + name: 'GLM-4.7', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.6, + output: 2.2, + cacheRead: 0.11, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai-org/GLM-4.7-Flash', + name: 'GLM-4.7-Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 200000, + maxTokens: 128000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai-org/GLM-5', + name: 'GLM-5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 202752, + maxTokens: 131072, + cost: { + input: 1, + output: 3.2, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai-org/GLM-5.1', + name: 'GLM-5.1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 202752, + maxTokens: 131072, + cost: { + input: 1, + output: 3.2, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + ], + }, + 'kimi-coding': { + name: 'kimi-coding', + config: { + api: 'anthropic-messages', + baseUrl: 'https://api.kimi.com/coding', + apiKey: 'KIMI_API_KEY', + }, + models: [ + { + modelId: 'kimi-for-coding', + name: 'Kimi For Coding', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2-thinking', + name: 'Kimi K2 Thinking', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + ], + }, + minimax: { + name: 'minimax', + config: { + api: 'anthropic-messages', + baseUrl: 'https://api.minimax.io/anthropic', + apiKey: 'MINIMAX_API_KEY', + }, + models: [ + { + modelId: 'MiniMax-M2.7', + name: 'MiniMax-M2.7', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.06, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: 'MiniMax-M2.7-highspeed', + name: 'MiniMax-M2.7-highspeed', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.6, + output: 2.4, + cacheRead: 0.06, + cacheWrite: 0.375, + }, + }, + }, + ], + }, + 'minimax-cn': { + name: 'minimax-cn', + config: { + api: 'anthropic-messages', + baseUrl: 'https://api.minimaxi.com/anthropic', + apiKey: 'MINIMAX_CN_API_KEY', + }, + models: [ + { + modelId: 'MiniMax-M2.7', + name: 'MiniMax-M2.7', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.06, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: 'MiniMax-M2.7-highspeed', + name: 'MiniMax-M2.7-highspeed', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.6, + output: 2.4, + cacheRead: 0.06, + cacheWrite: 0.375, + }, + }, + }, + ], + }, + moonshotai: { + name: 'moonshotai', + config: { + api: 'openai-completions', + baseUrl: 'https://api.moonshot.ai/v1', + apiKey: 'MOONSHOT_API_KEY', + }, + models: [ + { + modelId: 'kimi-k2-0711-preview', + name: 'Kimi K2 0711', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 0.6, + output: 2.5, + cacheRead: 0.15, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2-0905-preview', + name: 'Kimi K2 0905', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.6, + output: 2.5, + cacheRead: 0.15, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2-thinking', + name: 'Kimi K2 Thinking', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.6, + output: 2.5, + cacheRead: 0.15, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2-thinking-turbo', + name: 'Kimi K2 Thinking Turbo', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 1.15, + output: 8, + cacheRead: 0.15, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2-turbo-preview', + name: 'Kimi K2 Turbo', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 2.4, + output: 10, + cacheRead: 0.6, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2.5', + name: 'Kimi K2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.6, + output: 3, + cacheRead: 0.1, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2.6', + name: 'Kimi K2.6', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.95, + output: 4, + cacheRead: 0.16, + cacheWrite: 0, + }, + }, + }, + ], + }, + 'moonshotai-cn': { + name: 'moonshotai-cn', + config: { + api: 'openai-completions', + baseUrl: 'https://api.moonshot.cn/v1', + apiKey: 'MOONSHOT_API_KEY', + }, + models: [ + { + modelId: 'kimi-k2-0711-preview', + name: 'Kimi K2 0711', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 16384, + cost: { + input: 0.6, + output: 2.5, + cacheRead: 0.15, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2-0905-preview', + name: 'Kimi K2 0905', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.6, + output: 2.5, + cacheRead: 0.15, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2-thinking', + name: 'Kimi K2 Thinking', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.6, + output: 2.5, + cacheRead: 0.15, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2-thinking-turbo', + name: 'Kimi K2 Thinking Turbo', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 1.15, + output: 8, + cacheRead: 0.15, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2-turbo-preview', + name: 'Kimi K2 Turbo', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 2.4, + output: 10, + cacheRead: 0.6, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2.5', + name: 'Kimi K2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.6, + output: 3, + cacheRead: 0.1, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2.6', + name: 'Kimi K2.6', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.95, + output: 4, + cacheRead: 0.16, + cacheWrite: 0, + }, + }, + }, + ], + }, + 'openai-codex': { + name: 'openai-codex', + config: { + api: 'openai-codex-responses', + baseUrl: 'https://chatgpt.com/backend-api', + apiKey: '', + }, + models: [ + { + modelId: 'gpt-5.2', + name: 'GPT-5.2', + config: { + api: 'openai-codex-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 272000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.3-codex', + name: 'GPT-5.3 Codex', + config: { + api: 'openai-codex-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 272000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.3-codex-spark', + name: 'GPT-5.3 Codex Spark', + config: { + api: 'openai-codex-responses', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4', + name: 'GPT-5.4', + config: { + api: 'openai-codex-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 272000, + maxTokens: 128000, + cost: { + input: 2.5, + output: 15, + cacheRead: 0.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4-mini', + name: 'GPT-5.4 mini', + config: { + api: 'openai-codex-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 272000, + maxTokens: 128000, + cost: { + input: 0.75, + output: 4.5, + cacheRead: 0.075, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.5', + name: 'GPT-5.5', + config: { + api: 'openai-codex-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 272000, + maxTokens: 128000, + cost: { + input: 5, + output: 30, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + ], + }, + opencode: { + name: 'opencode', + config: { + api: 'openai-completions', + baseUrl: 'https://opencode.ai/zen/v1', + apiKey: 'OPENCODE_API_KEY', + }, + models: [ + { + modelId: 'big-pickle', + name: 'Big Pickle', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'claude-haiku-4-5', + name: 'Claude Haiku 4.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 1, + output: 5, + cacheRead: 0.1, + cacheWrite: 1.25, + }, + }, + }, + { + modelId: 'claude-opus-4-1', + name: 'Claude Opus 4.1', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 15, + output: 75, + cacheRead: 1.5, + cacheWrite: 18.75, + }, + }, + }, + { + modelId: 'claude-opus-4-5', + name: 'Claude Opus 4.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'claude-opus-4-6', + name: 'Claude Opus 4.6', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'claude-opus-4-7', + name: 'Claude Opus 4.7', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'claude-opus-4-8', + name: 'Claude Opus 4.8', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'claude-sonnet-4', + name: 'Claude Sonnet 4', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'claude-sonnet-4-5', + name: 'Claude Sonnet 4.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'claude-sonnet-4-6', + name: 'Claude Sonnet 4.6', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'deepseek-v4-flash', + name: 'DeepSeek V4 Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 384000, + cost: { + input: 0.14, + output: 0.28, + cacheRead: 0.03, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek-v4-flash-free', + name: 'DeepSeek V4 Flash Free', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 200000, + maxTokens: 128000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3-flash', + name: 'Gemini 3 Flash', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.5, + output: 3, + cacheRead: 0.05, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3.1-pro', + name: 'Gemini 3.1 Pro Preview', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 2, + output: 12, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gemini-3.5-flash', + name: 'Gemini 3.5 Flash', + config: { + api: 'google-generative-ai', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 1.5, + output: 9, + cacheRead: 0.15, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'glm-5', + name: 'GLM-5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 1, + output: 3.2, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'glm-5.1', + name: 'GLM-5.1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 1.4, + output: 4.4, + cacheRead: 0.26, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5', + name: 'GPT-5', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.07, + output: 8.5, + cacheRead: 0.107, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5-codex', + name: 'GPT-5 Codex', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.07, + output: 8.5, + cacheRead: 0.107, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5-nano', + name: 'GPT-5 Nano', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.05, + output: 0.4, + cacheRead: 0.005, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1', + name: 'GPT-5.1', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.07, + output: 8.5, + cacheRead: 0.107, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1-codex', + name: 'GPT-5.1 Codex', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.07, + output: 8.5, + cacheRead: 0.107, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1-codex-max', + name: 'GPT-5.1 Codex Max', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.1-codex-mini', + name: 'GPT-5.1 Codex Mini', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.25, + output: 2, + cacheRead: 0.025, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.2', + name: 'GPT-5.2', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.2-codex', + name: 'GPT-5.2 Codex', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.3-codex', + name: 'GPT-5.3 Codex', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4', + name: 'GPT-5.4', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 272000, + maxTokens: 128000, + cost: { + input: 2.5, + output: 15, + cacheRead: 0.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4-mini', + name: 'GPT-5.4 Mini', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.75, + output: 4.5, + cacheRead: 0.075, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4-nano', + name: 'GPT-5.4 Nano', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.2, + output: 1.25, + cacheRead: 0.02, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.4-pro', + name: 'GPT-5.4 Pro', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 30, + output: 180, + cacheRead: 30, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.5', + name: 'GPT-5.5', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 5, + output: 30, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'gpt-5.5-pro', + name: 'GPT-5.5 Pro', + config: { + api: 'openai-responses', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 30, + output: 180, + cacheRead: 30, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'grok-build-0.1', + name: 'Grok Build 0.1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 1, + output: 2, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2.5', + name: 'Kimi K2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 65536, + cost: { + input: 0.6, + output: 3, + cacheRead: 0.08, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2.6', + name: 'Kimi K2.6', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 65536, + cost: { + input: 0.95, + output: 4, + cacheRead: 0.16, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2.5-free', + name: 'MiMo V2.5 Free', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'minimax-m2.5', + name: 'MiniMax M2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.06, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'minimax-m2.7', + name: 'MiniMax M2.7', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.06, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nemotron-3-super-free', + name: 'Nemotron 3 Super Free', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 128000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen3.5-plus', + name: 'Qwen3.5 Plus', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 65536, + cost: { + input: 0.2, + output: 1.2, + cacheRead: 0.02, + cacheWrite: 0.25, + }, + }, + }, + { + modelId: 'qwen3.6-plus', + name: 'Qwen3.6 Plus', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 65536, + cost: { + input: 0.5, + output: 3, + cacheRead: 0.05, + cacheWrite: 0.625, + }, + }, + }, + ], + }, + 'opencode-go': { + name: 'opencode-go', + config: { + api: 'openai-completions', + baseUrl: 'https://opencode.ai/zen/go/v1', + apiKey: 'OPENCODE_API_KEY', + }, + models: [ + { + modelId: 'deepseek-v4-flash', + name: 'DeepSeek V4 Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 384000, + cost: { + input: 0.14, + output: 0.28, + cacheRead: 0.0028, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek-v4-pro', + name: 'DeepSeek V4 Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 384000, + cost: { + input: 1.74, + output: 3.48, + cacheRead: 0.0145, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'glm-5', + name: 'GLM-5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 202752, + maxTokens: 32768, + cost: { + input: 1, + output: 3.2, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'glm-5.1', + name: 'GLM-5.1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 202752, + maxTokens: 32768, + cost: { + input: 1.4, + output: 4.4, + cacheRead: 0.26, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2.5', + name: 'Kimi K2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 65536, + cost: { + input: 0.6, + output: 3, + cacheRead: 0.1, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kimi-k2.6', + name: 'Kimi K2.6', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 65536, + cost: { + input: 0.95, + output: 4, + cacheRead: 0.16, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2.5', + name: 'MiMo V2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 0.14, + output: 0.28, + cacheRead: 0.0028, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2.5-pro', + name: 'MiMo V2.5 Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1048576, + maxTokens: 128000, + cost: { + input: 1.74, + output: 3.48, + cacheRead: 0.0145, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'minimax-m2.5', + name: 'MiniMax M2.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 65536, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.03, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'minimax-m2.7', + name: 'MiniMax M2.7', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.06, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'qwen3.6-plus', + name: 'Qwen3.6 Plus', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 65536, + cost: { + input: 0.5, + output: 3, + cacheRead: 0.05, + cacheWrite: 0.625, + }, + }, + }, + { + modelId: 'qwen3.7-max', + name: 'Qwen3.7 Max', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 65536, + cost: { + input: 2.5, + output: 7.5, + cacheRead: 0.5, + cacheWrite: 3.125, + }, + }, + }, + ], + }, + together: { + name: 'together', + config: { + api: 'openai-completions', + baseUrl: 'https://api.together.ai/v1', + apiKey: 'TOGETHER_API_KEY', + }, + models: [ + { + modelId: 'MiniMaxAI/MiniMax-M2.5', + name: 'MiniMax-M2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.06, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'MiniMaxAI/MiniMax-M2.7', + name: 'MiniMax-M2.7', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 202752, + maxTokens: 131072, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.06, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'Qwen/Qwen3-235B-A22B-Instruct-2507-tput', + name: 'Qwen3 235B A22B Instruct 2507 FP8', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.2, + output: 0.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8', + name: 'Qwen3 Coder 480B A35B Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 2, + output: 2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'Qwen/Qwen3-Coder-Next-FP8', + name: 'Qwen3 Coder Next FP8', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.5, + output: 1.2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'Qwen/Qwen3.5-397B-A17B', + name: 'Qwen3.5 397B A17B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 130000, + cost: { + input: 0.6, + output: 3.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'Qwen/Qwen3.6-Plus', + name: 'Qwen3.6 Plus', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 500000, + cost: { + input: 0.5, + output: 3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'Qwen/Qwen3.7-Max', + name: 'Qwen3.7 Max', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 500000, + cost: { + input: 2.5, + output: 7.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek-ai/DeepSeek-V3', + name: 'DeepSeek V3', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 1.25, + output: 1.25, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek-ai/DeepSeek-V3-1', + name: 'DeepSeek V3.1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 0.6, + output: 1.7, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek-ai/DeepSeek-V4-Pro', + name: 'DeepSeek V4 Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 512000, + maxTokens: 384000, + cost: { + input: 2.1, + output: 4.4, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'essentialai/Rnj-1-Instruct', + name: 'Rnj-1 Instruct', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 32768, + maxTokens: 32768, + cost: { + input: 0.15, + output: 0.15, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemma-4-31B-it', + name: 'Gemma 4 31B Instruct', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 131072, + cost: { + input: 0.2, + output: 0.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta-llama/Llama-3.3-70B-Instruct-Turbo', + name: 'Llama 3.3 70B', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 0.88, + output: 0.88, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/Kimi-K2.5', + name: 'Kimi K2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 262144, + cost: { + input: 0.5, + output: 2.8, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/Kimi-K2.6', + name: 'Kimi K2.6', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 131000, + cost: { + input: 1.2, + output: 4.5, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-oss-120b', + name: 'GPT OSS 120B', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai-org/GLM-5.1', + name: 'GLM-5.1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 202752, + maxTokens: 131072, + cost: { + input: 1.4, + output: 4.4, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + ], + }, + 'vercel-ai-gateway': { + name: 'vercel-ai-gateway', + config: { + api: 'anthropic-messages', + baseUrl: 'https://ai-gateway.vercel.sh', + apiKey: 'AI_GATEWAY_API_KEY', + }, + models: [ + { + modelId: 'alibaba/qwen-3-14b', + name: 'Qwen3-14B', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 40960, + maxTokens: 16384, + cost: { + input: 0.12, + output: 0.24, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'alibaba/qwen-3-235b', + name: 'Qwen3 235B A22B', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 16384, + cost: { + input: 0.22, + output: 0.88, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'alibaba/qwen-3-30b', + name: 'Qwen3-30B-A3B', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 40960, + maxTokens: 16384, + cost: { + input: 0.08, + output: 0.29, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'alibaba/qwen-3-32b', + name: 'Qwen 3 32B', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 8192, + cost: { + input: 0.16, + output: 0.64, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'alibaba/qwen-3.6-max-preview', + name: 'Qwen 3.6 Max Preview', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 240000, + maxTokens: 64000, + cost: { + input: 1.3, + output: 7.8, + cacheRead: 0.26, + cacheWrite: 1.625, + }, + }, + }, + { + modelId: 'alibaba/qwen3-235b-a22b-thinking', + name: 'Qwen3 VL 235B A22B Thinking', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 131072, + maxTokens: 32768, + cost: { + input: 0.39999999999999997, + output: 4, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'alibaba/qwen3-coder', + name: 'Qwen3 Coder 480B A35B Instruct', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 65536, + cost: { + input: 1.5, + output: 7.5, + cacheRead: 0.3, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'alibaba/qwen3-coder-30b-a3b', + name: 'Qwen 3 Coder 30B A3B Instruct', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 8192, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'alibaba/qwen3-coder-next', + name: 'Qwen3 Coder Next', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 0.5, + output: 1.2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'alibaba/qwen3-coder-plus', + name: 'Qwen3 Coder Plus', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 1000000, + maxTokens: 65536, + cost: { + input: 1, + output: 5, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'alibaba/qwen3-max', + name: 'Qwen3 Max', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 1.2, + output: 6, + cacheRead: 0.24, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'alibaba/qwen3-max-preview', + name: 'Qwen3 Max Preview', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 262144, + maxTokens: 32768, + cost: { + input: 1.2, + output: 6, + cacheRead: 0.24, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'alibaba/qwen3-max-thinking', + name: 'Qwen 3 Max Thinking', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 256000, + maxTokens: 65536, + cost: { + input: 1.2, + output: 6, + cacheRead: 0.24, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'alibaba/qwen3-vl-thinking', + name: 'Qwen3 VL 235B A22B Thinking', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 131072, + maxTokens: 32768, + cost: { + input: 0.39999999999999997, + output: 4, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'alibaba/qwen3.5-flash', + name: 'Qwen 3.5 Flash', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 0.09999999999999999, + output: 0.39999999999999997, + cacheRead: 0.001, + cacheWrite: 0.125, + }, + }, + }, + { + modelId: 'alibaba/qwen3.5-plus', + name: 'Qwen 3.5 Plus', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 0.39999999999999997, + output: 2.4, + cacheRead: 0.04, + cacheWrite: 0.5, + }, + }, + }, + { + modelId: 'alibaba/qwen3.6-27b', + name: 'Qwen 3.6 27B', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 0.6, + output: 3.5999999999999996, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'alibaba/qwen3.6-plus', + name: 'Qwen 3.6 Plus', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 0.5, + output: 3, + cacheRead: 0.09999999999999999, + cacheWrite: 0.625, + }, + }, + }, + { + modelId: 'alibaba/qwen3.7-max', + name: 'Qwen 3.7 Max', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 991000, + maxTokens: 64000, + cost: { + input: 1.25, + output: 3.75, + cacheRead: 0.25, + cacheWrite: 1.5625, + }, + }, + }, + { + modelId: 'anthropic/claude-3-haiku', + name: 'Claude 3 Haiku', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 4096, + cost: { + input: 0.25, + output: 1.25, + cacheRead: 0.03, + cacheWrite: 0.3, + }, + }, + }, + { + modelId: 'anthropic/claude-3.5-haiku', + name: 'Claude 3.5 Haiku', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 8192, + cost: { + input: 0.7999999999999999, + output: 4, + cacheRead: 0.08, + cacheWrite: 1, + }, + }, + }, + { + modelId: 'anthropic/claude-haiku-4.5', + name: 'Claude Haiku 4.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 1, + output: 5, + cacheRead: 0.09999999999999999, + cacheWrite: 1.25, + }, + }, + }, + { + modelId: 'anthropic/claude-opus-4', + name: 'Claude Opus 4', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 15, + output: 75, + cacheRead: 1.5, + cacheWrite: 18.75, + }, + }, + }, + { + modelId: 'anthropic/claude-opus-4.1', + name: 'Claude Opus 4.1', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 32000, + cost: { + input: 15, + output: 75, + cacheRead: 1.5, + cacheWrite: 18.75, + }, + }, + }, + { + modelId: 'anthropic/claude-opus-4.5', + name: 'Claude Opus 4.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 64000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'anthropic/claude-opus-4.6', + name: 'Claude Opus 4.6', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'anthropic/claude-opus-4.7', + name: 'Claude Opus 4.7', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'anthropic/claude-opus-4.8', + name: 'Claude Opus 4.8', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 25, + cacheRead: 0.5, + cacheWrite: 6.25, + }, + }, + }, + { + modelId: 'anthropic/claude-sonnet-4', + name: 'Claude Sonnet 4', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'anthropic/claude-sonnet-4.5', + name: 'Claude Sonnet 4.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'anthropic/claude-sonnet-4.6', + name: 'Claude Sonnet 4.6', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 3, + output: 15, + cacheRead: 0.3, + cacheWrite: 3.75, + }, + }, + }, + { + modelId: 'arcee-ai/trinity-large-preview', + name: 'Trinity Large Preview', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 131000, + maxTokens: 131000, + cost: { + input: 0.25, + output: 1, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'arcee-ai/trinity-large-thinking', + name: 'Trinity Large Thinking', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 262100, + maxTokens: 80000, + cost: { + input: 0.25, + output: 0.8999999999999999, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'bytedance/seed-1.6', + name: 'Seed 1.6', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 256000, + maxTokens: 32000, + cost: { + input: 0.25, + output: 2, + cacheRead: 0.049999999999999996, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'cohere/command-a', + name: 'Command A', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 256000, + maxTokens: 8000, + cost: { + input: 2.5, + output: 10, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-r1', + name: 'DeepSeek-R1', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 8192, + cost: { + input: 1.35, + output: 5.4, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-v3', + name: 'DeepSeek V3 0324', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 163840, + maxTokens: 163840, + cost: { + input: 0.27, + output: 1.12, + cacheRead: 0.135, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-v3.1', + name: 'DeepSeek V3.1', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 163840, + maxTokens: 8192, + cost: { + input: 0.56, + output: 1.68, + cacheRead: 0.28, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-v3.1-terminus', + name: 'DeepSeek V3.1 Terminus', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 65536, + cost: { + input: 0.27, + output: 1, + cacheRead: 0.135, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-v3.2', + name: 'DeepSeek V3.2', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 8000, + cost: { + input: 0.28, + output: 0.42, + cacheRead: 0.028, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-v3.2-thinking', + name: 'DeepSeek V3.2 Thinking', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 8000, + cost: { + input: 0.62, + output: 1.85, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-v4-flash', + name: 'DeepSeek V4 Flash', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 384000, + cost: { + input: 0.14, + output: 0.28, + cacheRead: 0.0028, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'deepseek/deepseek-v4-pro', + name: 'DeepSeek V4 Pro', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 384000, + cost: { + input: 0.435, + output: 0.87, + cacheRead: 0.0036, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemini-2.0-flash', + name: 'Gemini 2.0 Flash', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 8192, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0.024999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemini-2.0-flash-lite', + name: 'Gemini 2.0 Flash Lite', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 8192, + cost: { + input: 0.075, + output: 0.3, + cacheRead: 0.02, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemini-2.5-flash', + name: 'Gemini 2.5 Flash', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 65536, + cost: { + input: 0.3, + output: 2.5, + cacheRead: 0.03, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemini-2.5-flash-lite', + name: 'Gemini 2.5 Flash Lite', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 0.09999999999999999, + output: 0.39999999999999997, + cacheRead: 0.01, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemini-2.5-pro', + name: 'Gemini 2.5 Pro', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 65536, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemini-3-flash', + name: 'Gemini 3 Flash', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 65000, + cost: { + input: 0.5, + output: 3, + cacheRead: 0.049999999999999996, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemini-3-pro-preview', + name: 'Gemini 3 Pro Preview', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 2, + output: 12, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemini-3.1-flash-lite', + name: 'Gemini 3.1 Flash Lite', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 65000, + cost: { + input: 0.25, + output: 1.5, + cacheRead: 0.03, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemini-3.1-flash-lite-preview', + name: 'Gemini 3.1 Flash Lite Preview', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 65000, + cost: { + input: 0.25, + output: 1.5, + cacheRead: 0.03, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemini-3.1-pro-preview', + name: 'Gemini 3.1 Pro Preview', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 2, + output: 12, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemini-3.5-flash', + name: 'Gemini 3.5 Flash', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 64000, + cost: { + input: 1.5, + output: 9, + cacheRead: 0.15, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemma-4-26b-a4b-it', + name: 'Gemma 4 26B A4B IT', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 131072, + cost: { + input: 0.13, + output: 0.39999999999999997, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'google/gemma-4-31b-it', + name: 'Gemma 4 31B IT', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 131072, + cost: { + input: 0.14, + output: 0.39999999999999997, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'inception/mercury-2', + name: 'Mercury 2', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 128000, + cost: { + input: 0.25, + output: 0.75, + cacheRead: 0.024999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'inception/mercury-coder-small', + name: 'Mercury Coder Small Beta', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 32000, + maxTokens: 16384, + cost: { + input: 0.25, + output: 1, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'kwaipilot/kat-coder-pro-v2', + name: 'Kat Coder Pro V2', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.06, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meituan/longcat-flash-chat', + name: 'LongCat Flash Chat', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 100000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta/llama-3.1-70b', + name: 'Llama 3.1 70B Instruct', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 8192, + cost: { + input: 0.72, + output: 0.72, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta/llama-3.1-8b', + name: 'Llama 3.1 8B Instruct', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 8192, + cost: { + input: 0.22, + output: 0.22, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta/llama-3.2-11b', + name: 'Llama 3.2 11B Vision Instruct', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 8192, + cost: { + input: 0.16, + output: 0.16, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta/llama-3.2-90b', + name: 'Llama 3.2 90B Vision Instruct', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 8192, + cost: { + input: 0.72, + output: 0.72, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta/llama-3.3-70b', + name: 'Llama 3.3 70B Instruct', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 8192, + cost: { + input: 0.72, + output: 0.72, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta/llama-4-maverick', + name: 'Llama 4 Maverick 17B Instruct', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 8192, + cost: { + input: 0.24, + output: 0.9700000000000001, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'meta/llama-4-scout', + name: 'Llama 4 Scout 17B Instruct', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 8192, + cost: { + input: 0.16999999999999998, + output: 0.66, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'minimax/minimax-m2', + name: 'MiniMax M2', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 205000, + maxTokens: 205000, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.03, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: 'minimax/minimax-m2.1', + name: 'MiniMax M2.1', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.03, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: 'minimax/minimax-m2.1-lightning', + name: 'MiniMax M2.1 Lightning', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0.3, + output: 2.4, + cacheRead: 0.03, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: 'minimax/minimax-m2.5', + name: 'MiniMax M2.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131000, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.03, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: 'minimax/minimax-m2.5-highspeed', + name: 'MiniMax M2.5 High Speed', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131000, + cost: { + input: 0.6, + output: 2.4, + cacheRead: 0.03, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: 'minimax/minimax-m2.7', + name: 'MiniMax M2.7', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 204800, + maxTokens: 131000, + cost: { + input: 0.3, + output: 1.2, + cacheRead: 0.06, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: 'minimax/minimax-m2.7-highspeed', + name: 'MiniMax M2.7 High Speed', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 204800, + maxTokens: 131100, + cost: { + input: 0.6, + output: 2.4, + cacheRead: 0.06, + cacheWrite: 0.375, + }, + }, + }, + { + modelId: 'mistral/codestral', + name: 'Mistral Codestral', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4000, + cost: { + input: 0.3, + output: 0.8999999999999999, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral/devstral-2', + name: 'Devstral 2', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 0.39999999999999997, + output: 2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral/devstral-small', + name: 'Devstral Small 1.1', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 64000, + cost: { + input: 0.09999999999999999, + output: 0.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral/devstral-small-2', + name: 'Devstral Small 2', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 0.09999999999999999, + output: 0.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral/ministral-3b', + name: 'Ministral 3B', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4000, + cost: { + input: 0.09999999999999999, + output: 0.09999999999999999, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral/ministral-8b', + name: 'Ministral 8B', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 128000, + maxTokens: 4000, + cost: { + input: 0.15, + output: 0.15, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral/mistral-medium', + name: 'Mistral Medium 3.1', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 64000, + cost: { + input: 0.39999999999999997, + output: 2, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral/mistral-medium-3.5', + name: 'Mistral Medium Latest', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 1.5, + output: 7.5, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral/mistral-small', + name: 'Mistral Small', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 32000, + maxTokens: 4000, + cost: { + input: 0.09999999999999999, + output: 0.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral/pixtral-12b', + name: 'Pixtral 12B 2409', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 4000, + cost: { + input: 0.15, + output: 0.15, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mistral/pixtral-large', + name: 'Pixtral Large', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 4000, + cost: { + input: 2, + output: 6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/kimi-k2', + name: 'Kimi K2 Instruct', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 0.5700000000000001, + output: 2.3, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/kimi-k2-thinking', + name: 'Kimi K2 Thinking', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 262114, + maxTokens: 262114, + cost: { + input: 0.6, + output: 2.5, + cacheRead: 0.15, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/kimi-k2-thinking-turbo', + name: 'Kimi K2 Thinking Turbo', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 262114, + maxTokens: 262114, + cost: { + input: 1.15, + output: 8, + cacheRead: 0.15, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/kimi-k2-turbo', + name: 'Kimi K2 Turbo', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text'], + contextWindow: 256000, + maxTokens: 16384, + cost: { + input: 1.15, + output: 8, + cacheRead: 0.15, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/kimi-k2.5', + name: 'Kimi K2.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262114, + maxTokens: 262114, + cost: { + input: 0.6, + output: 3, + cacheRead: 0.09999999999999999, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'moonshotai/kimi-k2.6', + name: 'Kimi K2.6', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262000, + maxTokens: 262000, + cost: { + input: 0.95, + output: 4, + cacheRead: 0.16, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nvidia/nemotron-nano-12b-v2-vl', + name: 'Nvidia Nemotron Nano 12B V2 VL', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 0.19999999999999998, + output: 0.6, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'nvidia/nemotron-nano-9b-v2', + name: 'Nvidia Nemotron Nano 9B V2', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 131072, + cost: { + input: 0.06, + output: 0.22999999999999998, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4-turbo', + name: 'GPT-4 Turbo', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 4096, + cost: { + input: 10, + output: 30, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4.1', + name: 'GPT-4.1', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1047576, + maxTokens: 32768, + cost: { + input: 2, + output: 8, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4.1-mini', + name: 'GPT-4.1 mini', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1047576, + maxTokens: 32768, + cost: { + input: 0.39999999999999997, + output: 1.5999999999999999, + cacheRead: 0.09999999999999999, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4.1-nano', + name: 'GPT-4.1 nano', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1047576, + maxTokens: 32768, + cost: { + input: 0.09999999999999999, + output: 0.39999999999999997, + cacheRead: 0.024999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4o', + name: 'GPT-4o', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 2.5, + output: 10, + cacheRead: 1.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-4o-mini', + name: 'GPT-4o mini', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 0.15, + output: 0.6, + cacheRead: 0.075, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5', + name: 'GPT-5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5-chat', + name: 'GPT 5 Chat', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5-codex', + name: 'GPT-5-Codex', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5-mini', + name: 'GPT-5 mini', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.25, + output: 2, + cacheRead: 0.024999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5-nano', + name: 'GPT-5 nano', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.049999999999999996, + output: 0.39999999999999997, + cacheRead: 0.005, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5-pro', + name: 'GPT-5 pro', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 272000, + cost: { + input: 15, + output: 120, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.1-codex', + name: 'GPT-5.1-Codex', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.1-codex-max', + name: 'GPT 5.1 Codex Max', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.1-codex-mini', + name: 'GPT 5.1 Codex Mini', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.25, + output: 2, + cacheRead: 0.024999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.1-instant', + name: 'GPT-5.1 Instant', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.1-thinking', + name: 'GPT 5.1 Thinking', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.25, + output: 10, + cacheRead: 0.125, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.2', + name: 'GPT 5.2', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.2-chat', + name: 'GPT 5.2 Chat', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.2-codex', + name: 'GPT 5.2 Codex', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.2-pro', + name: 'GPT 5.2 ', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 21, + output: 168, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.3-chat', + name: 'GPT-5.3 Chat', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 16384, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.3-codex', + name: 'GPT 5.3 Codex', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 1.75, + output: 14, + cacheRead: 0.175, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.4', + name: 'GPT 5.4', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 2.5, + output: 15, + cacheRead: 0.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.4-mini', + name: 'GPT 5.4 Mini', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.75, + output: 4.5, + cacheRead: 0.075, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.4-nano', + name: 'GPT 5.4 Nano', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 400000, + maxTokens: 128000, + cost: { + input: 0.19999999999999998, + output: 1.25, + cacheRead: 0.02, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.4-pro', + name: 'GPT 5.4 Pro', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 128000, + cost: { + input: 30, + output: 180, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.5', + name: 'GPT 5.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 5, + output: 30, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-5.5-pro', + name: 'GPT 5.5 Pro', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 30, + output: 180, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-oss-20b', + name: 'GPT OSS 20B', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 8192, + cost: { + input: 0.049999999999999996, + output: 0.19999999999999998, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/gpt-oss-safeguard-20b', + name: 'GPT OSS Safeguard 20B', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 65536, + cost: { + input: 0.075, + output: 0.3, + cacheRead: 0.037, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/o1', + name: 'o1', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 15, + output: 60, + cacheRead: 7.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/o3', + name: 'o3', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 2, + output: 8, + cacheRead: 0.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/o3-deep-research', + name: 'o3-deep-research', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 10, + output: 40, + cacheRead: 2.5, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/o3-mini', + name: 'o3-mini', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 1.1, + output: 4.4, + cacheRead: 0.55, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/o3-pro', + name: 'o3 Pro', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 20, + output: 80, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'openai/o4-mini', + name: 'o4-mini', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 100000, + cost: { + input: 1.1, + output: 4.4, + cacheRead: 0.275, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'perplexity/sonar', + name: 'Sonar', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 127000, + maxTokens: 8000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'perplexity/sonar-pro', + name: 'Sonar Pro', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 8000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'stepfun/step-3.7-flash', + name: 'Step 3.7 Flash', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 0.19999999999999998, + output: 1.15, + cacheRead: 0.04, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xai/grok-4.1-fast-non-reasoning', + name: 'Grok 4.1 Fast Non-Reasoning', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 1000000, + cost: { + input: 0.19999999999999998, + output: 0.5, + cacheRead: 0.049999999999999996, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xai/grok-4.1-fast-reasoning', + name: 'Grok 4.1 Fast Reasoning', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 1000000, + cost: { + input: 0.19999999999999998, + output: 0.5, + cacheRead: 0.049999999999999996, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xai/grok-4.20-multi-agent', + name: 'Grok 4.20 Multi-Agent', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 2000000, + maxTokens: 2000000, + cost: { + input: 1.25, + output: 2.5, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xai/grok-4.20-multi-agent-beta', + name: 'Grok 4.20 Multi Agent Beta', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 2000000, + maxTokens: 2000000, + cost: { + input: 1.25, + output: 2.5, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xai/grok-4.20-non-reasoning', + name: 'Grok 4.20 Non-Reasoning', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 2000000, + maxTokens: 2000000, + cost: { + input: 1.25, + output: 2.5, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xai/grok-4.20-non-reasoning-beta', + name: 'Grok 4.20 Beta Non-Reasoning', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 2000000, + maxTokens: 2000000, + cost: { + input: 1.25, + output: 2.5, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xai/grok-4.20-reasoning', + name: 'Grok 4.20 Reasoning', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 2000000, + maxTokens: 2000000, + cost: { + input: 1.25, + output: 2.5, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xai/grok-4.20-reasoning-beta', + name: 'Grok 4.20 Beta Reasoning', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 2000000, + maxTokens: 2000000, + cost: { + input: 1.25, + output: 2.5, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xai/grok-4.3', + name: 'Grok 4.3', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 1000000, + cost: { + input: 1.25, + output: 2.5, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xai/grok-build-0.1', + name: 'Grok Build 0.1', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 1, + output: 2, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xiaomi/mimo-v2-flash', + name: 'MiMo V2 Flash', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 32000, + cost: { + input: 0.09999999999999999, + output: 0.3, + cacheRead: 0.01, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xiaomi/mimo-v2-pro', + name: 'MiMo V2 Pro', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 1000000, + maxTokens: 128000, + cost: { + input: 1, + output: 3, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xiaomi/mimo-v2.5', + name: 'MiMo M2.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 131100, + cost: { + input: 0.14, + output: 0.28, + cacheRead: 0.0028, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'xiaomi/mimo-v2.5-pro', + name: 'MiMo V2.5 Pro', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1050000, + maxTokens: 131000, + cost: { + input: 0.435, + output: 0.87, + cacheRead: 0.0036, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai/glm-4.5', + name: 'GLM-4.5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 96000, + cost: { + input: 0.6, + output: 2.2, + cacheRead: 0.11, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai/glm-4.5-air', + name: 'GLM 4.5 Air', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 128000, + maxTokens: 96000, + cost: { + input: 0.19999999999999998, + output: 1.1, + cacheRead: 0.03, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai/glm-4.5v', + name: 'GLM 4.5V', + config: { + api: 'anthropic-messages', + reasoning: false, + input: ['text', 'image'], + contextWindow: 66000, + maxTokens: 16000, + cost: { + input: 0.6, + output: 1.7999999999999998, + cacheRead: 0.11, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai/glm-4.6', + name: 'GLM 4.6', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 200000, + maxTokens: 96000, + cost: { + input: 0.6, + output: 2.2, + cacheRead: 0.11, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai/glm-4.6v', + name: 'GLM-4.6V', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 24000, + cost: { + input: 0.3, + output: 0.8999999999999999, + cacheRead: 0.049999999999999996, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai/glm-4.6v-flash', + name: 'GLM-4.6V-Flash', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 128000, + maxTokens: 24000, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai/glm-4.7', + name: 'GLM 4.7', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 131000, + maxTokens: 40000, + cost: { + input: 2.25, + output: 2.75, + cacheRead: 2.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai/glm-4.7-flash', + name: 'GLM 4.7 Flash', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 200000, + maxTokens: 131000, + cost: { + input: 0.07, + output: 0.39999999999999997, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai/glm-4.7-flashx', + name: 'GLM 4.7 FlashX', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 200000, + maxTokens: 128000, + cost: { + input: 0.06, + output: 0.39999999999999997, + cacheRead: 0.01, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai/glm-5', + name: 'GLM 5', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 202800, + maxTokens: 131100, + cost: { + input: 1, + output: 3.1999999999999997, + cacheRead: 0.19999999999999998, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai/glm-5-turbo', + name: 'GLM 5 Turbo', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 202800, + maxTokens: 131100, + cost: { + input: 1.2, + output: 4, + cacheRead: 0.24, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai/glm-5.1', + name: 'GLM 5.1', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text'], + contextWindow: 202800, + maxTokens: 64000, + cost: { + input: 1.4, + output: 4.4, + cacheRead: 0.26, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'zai/glm-5v-turbo', + name: 'GLM 5V Turbo', + config: { + api: 'anthropic-messages', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 128000, + cost: { + input: 1.2, + output: 4, + cacheRead: 0.24, + cacheWrite: 0, + }, + }, + }, + ], + }, + xai: { + name: 'xai', + config: { + api: 'openai-completions', + baseUrl: 'https://api.x.ai/v1', + apiKey: 'XAI_API_KEY', + }, + models: [ + { + modelId: 'grok-3', + name: 'Grok 3', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 8192, + cost: { + input: 3, + output: 15, + cacheRead: 0.75, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'grok-3-fast', + name: 'Grok 3 Fast', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 131072, + maxTokens: 8192, + cost: { + input: 5, + output: 25, + cacheRead: 1.25, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'grok-4.20-0309-non-reasoning', + name: 'Grok 4.20 (Non-Reasoning)', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text', 'image'], + contextWindow: 2000000, + maxTokens: 30000, + cost: { + input: 1.25, + output: 2.5, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'grok-4.20-0309-reasoning', + name: 'Grok 4.20 (Reasoning)', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 2000000, + maxTokens: 30000, + cost: { + input: 1.25, + output: 2.5, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'grok-4.3', + name: 'Grok 4.3', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1000000, + maxTokens: 30000, + cost: { + input: 1.25, + output: 2.5, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'grok-build-0.1', + name: 'Grok Build 0.1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 256000, + maxTokens: 256000, + cost: { + input: 1, + output: 2, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'grok-code-fast-1', + name: 'Grok Code Fast 1', + config: { + api: 'openai-completions', + reasoning: false, + input: ['text'], + contextWindow: 32768, + maxTokens: 8192, + cost: { + input: 0.2, + output: 1.5, + cacheRead: 0.02, + cacheWrite: 0, + }, + }, + }, + ], + }, + xiaomi: { + name: 'xiaomi', + config: { + api: 'openai-completions', + baseUrl: 'https://api.xiaomimimo.com/v1', + apiKey: 'XIAOMI_API_KEY', + }, + models: [ + { + modelId: 'mimo-v2-flash', + name: 'MiMo-V2-Flash', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 262144, + maxTokens: 65536, + cost: { + input: 0.1, + output: 0.3, + cacheRead: 0.01, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2-omni', + name: 'MiMo-V2-Omni', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 131072, + cost: { + input: 0.4, + output: 2, + cacheRead: 0.08, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2-pro', + name: 'MiMo-V2-Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1048576, + maxTokens: 131072, + cost: { + input: 1, + output: 3, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2.5', + name: 'MiMo-V2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 131072, + cost: { + input: 0.4, + output: 2, + cacheRead: 0.08, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2.5-pro', + name: 'MiMo-V2.5-Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1048576, + maxTokens: 131072, + cost: { + input: 1, + output: 3, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + ], + }, + 'xiaomi-token-plan-ams': { + name: 'xiaomi-token-plan-ams', + config: { + api: 'openai-completions', + baseUrl: 'https://token-plan-ams.xiaomimimo.com/v1', + apiKey: 'XIAOMI_TOKEN_PLAN_AMS_API_KEY', + }, + models: [ + { + modelId: 'mimo-v2-omni', + name: 'MiMo-V2-Omni', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 131072, + cost: { + input: 0.4, + output: 2, + cacheRead: 0.08, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2-pro', + name: 'MiMo-V2-Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1048576, + maxTokens: 131072, + cost: { + input: 1, + output: 3, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2.5', + name: 'MiMo-V2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 131072, + cost: { + input: 0.4, + output: 2, + cacheRead: 0.08, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2.5-pro', + name: 'MiMo-V2.5-Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1048576, + maxTokens: 131072, + cost: { + input: 1, + output: 3, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + ], + }, + 'xiaomi-token-plan-cn': { + name: 'xiaomi-token-plan-cn', + config: { + api: 'openai-completions', + baseUrl: 'https://token-plan-cn.xiaomimimo.com/v1', + apiKey: 'XIAOMI_TOKEN_PLAN_CN_API_KEY', + }, + models: [ + { + modelId: 'mimo-v2-omni', + name: 'MiMo-V2-Omni', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 131072, + cost: { + input: 0.4, + output: 2, + cacheRead: 0.08, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2-pro', + name: 'MiMo-V2-Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1048576, + maxTokens: 131072, + cost: { + input: 1, + output: 3, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2.5', + name: 'MiMo-V2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 131072, + cost: { + input: 0.4, + output: 2, + cacheRead: 0.08, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2.5-pro', + name: 'MiMo-V2.5-Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1048576, + maxTokens: 131072, + cost: { + input: 1, + output: 3, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + ], + }, + 'xiaomi-token-plan-sgp': { + name: 'xiaomi-token-plan-sgp', + config: { + api: 'openai-completions', + baseUrl: 'https://token-plan-sgp.xiaomimimo.com/v1', + apiKey: 'XIAOMI_TOKEN_PLAN_SGP_API_KEY', + }, + models: [ + { + modelId: 'mimo-v2-omni', + name: 'MiMo-V2-Omni', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 262144, + maxTokens: 131072, + cost: { + input: 0.4, + output: 2, + cacheRead: 0.08, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2-pro', + name: 'MiMo-V2-Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1048576, + maxTokens: 131072, + cost: { + input: 1, + output: 3, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2.5', + name: 'MiMo-V2.5', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 1048576, + maxTokens: 131072, + cost: { + input: 0.4, + output: 2, + cacheRead: 0.08, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'mimo-v2.5-pro', + name: 'MiMo-V2.5-Pro', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 1048576, + maxTokens: 131072, + cost: { + input: 1, + output: 3, + cacheRead: 0.2, + cacheWrite: 0, + }, + }, + }, + ], + }, + zai: { + name: 'zai', + config: { + api: 'openai-completions', + baseUrl: 'https://api.z.ai/api/coding/paas/v4', + apiKey: 'ZAI_API_KEY', + }, + models: [ + { + modelId: 'glm-4.5-air', + name: 'GLM-4.5-Air', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 131072, + maxTokens: 98304, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'glm-4.7', + name: 'GLM-4.7', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 204800, + maxTokens: 131072, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'glm-5-turbo', + name: 'GLM-5-Turbo', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 200000, + maxTokens: 131072, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'glm-5.1', + name: 'GLM-5.1', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text'], + contextWindow: 200000, + maxTokens: 131072, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + { + modelId: 'glm-5v-turbo', + name: 'GLM-5V-Turbo', + config: { + api: 'openai-completions', + reasoning: true, + input: ['text', 'image'], + contextWindow: 200000, + maxTokens: 131072, + cost: { + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + }, + }, + }, + ], + }, +} as unknown as Record diff --git a/src/logger.ts b/packages/core/src/logger.ts similarity index 100% rename from src/logger.ts rename to packages/core/src/logger.ts diff --git a/packages/core/src/provider/provider.test.ts b/packages/core/src/provider/provider.test.ts index 7764e9f0..5e043e0c 100644 --- a/packages/core/src/provider/provider.test.ts +++ b/packages/core/src/provider/provider.test.ts @@ -3,7 +3,7 @@ import { teamService } from '@shumai/core/src/team/team' import { providerService } from './provider' import { describe, expect, it } from 'vitest' import { ProviderConfigSerializable, providerModelSchema } from '@shumai/dtos' -import { builtinProviders } from '@/generated/providers.generated' +import { builtinProviders } from '@shumai/core/src/generated/providers.generated' import { z } from 'zod' type ProviderModel = z.infer diff --git a/packages/core/src/provider/provider.ts b/packages/core/src/provider/provider.ts index b8baaa6e..3c1c255f 100644 --- a/packages/core/src/provider/provider.ts +++ b/packages/core/src/provider/provider.ts @@ -1,6 +1,6 @@ import { prisma } from '@shumai/db' import { ProviderConfigSerializable, providerModelSchema } from '@shumai/dtos' -import { builtinProviders } from '@/generated/providers.generated' +import { builtinProviders } from '@shumai/core/src/generated/providers.generated' import { z } from 'zod' type ProviderModel = z.infer diff --git a/packages/core/src/search/search.ts b/packages/core/src/search/search.ts index f53bf48f..374a9799 100644 --- a/packages/core/src/search/search.ts +++ b/packages/core/src/search/search.ts @@ -4,7 +4,7 @@ import { AssetService, assetService } from '@shumai/core/src/asset/asset' import { AssetInfo } from '@shumai/dtos' import { SearchRequest } from '@shumai/dtos' import { PaginatedData, decodeCursor, encodeCursor, PageInfo } from '@shumai/core/src/pagination' -import { generateSearchNgrams } from '@/utils/ngram' +import { generateSearchNgrams } from '@shumai/core/src/utils/ngram' import { workflowService } from '@shumai/workflow-core' import { HTTPException } from 'hono/http-exception' import { SqlQueryBuilder } from './sql-query-builder' diff --git a/packages/core/src/skill/skill.ts b/packages/core/src/skill/skill.ts index 6e28b1e0..db97581d 100644 --- a/packages/core/src/skill/skill.ts +++ b/packages/core/src/skill/skill.ts @@ -4,7 +4,7 @@ import { s3Service } from '@shumai/core/src/s3/s3' import AdmZip from 'adm-zip' import * as crypto from 'crypto' import { ulid } from 'ulid' -import { parseFrontmatter } from '@/utils/frontmatter' +import { parseFrontmatter } from '@shumai/core/src/utils/frontmatter' interface SkillFrontmatter extends Record { name?: string diff --git a/src/utils/frontmatter.test.ts b/packages/core/src/utils/frontmatter.test.ts similarity index 100% rename from src/utils/frontmatter.test.ts rename to packages/core/src/utils/frontmatter.test.ts diff --git a/src/utils/frontmatter.ts b/packages/core/src/utils/frontmatter.ts similarity index 100% rename from src/utils/frontmatter.ts rename to packages/core/src/utils/frontmatter.ts diff --git a/src/utils/mime.test.ts b/packages/core/src/utils/mime.test.ts similarity index 100% rename from src/utils/mime.test.ts rename to packages/core/src/utils/mime.test.ts diff --git a/src/utils/mime.ts b/packages/core/src/utils/mime.ts similarity index 100% rename from src/utils/mime.ts rename to packages/core/src/utils/mime.ts diff --git a/src/utils/ngram.test.ts b/packages/core/src/utils/ngram.test.ts similarity index 100% rename from src/utils/ngram.test.ts rename to packages/core/src/utils/ngram.test.ts diff --git a/src/utils/ngram.ts b/packages/core/src/utils/ngram.ts similarity index 100% rename from src/utils/ngram.ts rename to packages/core/src/utils/ngram.ts diff --git a/src/test-global-setup.ts b/packages/db/src/test-global-setup.ts similarity index 100% rename from src/test-global-setup.ts rename to packages/db/src/test-global-setup.ts diff --git a/src/ui/.prettierignore b/packages/webui/.prettierignore similarity index 100% rename from src/ui/.prettierignore rename to packages/webui/.prettierignore diff --git a/src/ui/api/client.ts b/packages/webui/api/client.ts similarity index 94% rename from src/ui/api/client.ts rename to packages/webui/api/client.ts index b595f46d..21803e9a 100644 --- a/src/ui/api/client.ts +++ b/packages/webui/api/client.ts @@ -1,5 +1,5 @@ import { hc } from 'hono/client' -import type { AppType } from '@/index' +import type { AppType } from '@shumai/api' import { useAuthStore } from '@/ui/stores/auth' const customFetch = async (input: RequestInfo | URL, init?: RequestInit) => { diff --git a/src/ui/components/breadcrumb-nav.tsx b/packages/webui/components/breadcrumb-nav.tsx similarity index 100% rename from src/ui/components/breadcrumb-nav.tsx rename to packages/webui/components/breadcrumb-nav.tsx diff --git a/src/ui/components/chat/message-card.tsx b/packages/webui/components/chat/message-card.tsx similarity index 100% rename from src/ui/components/chat/message-card.tsx rename to packages/webui/components/chat/message-card.tsx diff --git a/src/ui/components/chat/message-input.tsx b/packages/webui/components/chat/message-input.tsx similarity index 100% rename from src/ui/components/chat/message-input.tsx rename to packages/webui/components/chat/message-input.tsx diff --git a/src/ui/components/datetime-picker.tsx b/packages/webui/components/datetime-picker.tsx similarity index 100% rename from src/ui/components/datetime-picker.tsx rename to packages/webui/components/datetime-picker.tsx diff --git a/src/ui/components/dnd-modifiers.ts b/packages/webui/components/dnd-modifiers.ts similarity index 100% rename from src/ui/components/dnd-modifiers.ts rename to packages/webui/components/dnd-modifiers.ts diff --git a/src/ui/components/dnd-types.ts b/packages/webui/components/dnd-types.ts similarity index 100% rename from src/ui/components/dnd-types.ts rename to packages/webui/components/dnd-types.ts diff --git a/src/ui/components/drawing-canvas.tsx b/packages/webui/components/drawing-canvas.tsx similarity index 100% rename from src/ui/components/drawing-canvas.tsx rename to packages/webui/components/drawing-canvas.tsx diff --git a/src/ui/components/dual-sidebar.tsx b/packages/webui/components/dual-sidebar.tsx similarity index 100% rename from src/ui/components/dual-sidebar.tsx rename to packages/webui/components/dual-sidebar.tsx diff --git a/src/ui/components/field-renderer.tsx b/packages/webui/components/field-renderer.tsx similarity index 100% rename from src/ui/components/field-renderer.tsx rename to packages/webui/components/field-renderer.tsx diff --git a/src/ui/components/fields-manager.tsx b/packages/webui/components/fields-manager.tsx similarity index 100% rename from src/ui/components/fields-manager.tsx rename to packages/webui/components/fields-manager.tsx diff --git a/src/ui/components/fields/date-field.tsx b/packages/webui/components/fields/date-field.tsx similarity index 100% rename from src/ui/components/fields/date-field.tsx rename to packages/webui/components/fields/date-field.tsx diff --git a/src/ui/components/fields/field-types.ts b/packages/webui/components/fields/field-types.ts similarity index 100% rename from src/ui/components/fields/field-types.ts rename to packages/webui/components/fields/field-types.ts diff --git a/src/ui/components/fields/long-text-field.tsx b/packages/webui/components/fields/long-text-field.tsx similarity index 100% rename from src/ui/components/fields/long-text-field.tsx rename to packages/webui/components/fields/long-text-field.tsx diff --git a/src/ui/components/fields/number-field.tsx b/packages/webui/components/fields/number-field.tsx similarity index 100% rename from src/ui/components/fields/number-field.tsx rename to packages/webui/components/fields/number-field.tsx diff --git a/src/ui/components/fields/rating-field.tsx b/packages/webui/components/fields/rating-field.tsx similarity index 100% rename from src/ui/components/fields/rating-field.tsx rename to packages/webui/components/fields/rating-field.tsx diff --git a/src/ui/components/fields/select-field.tsx b/packages/webui/components/fields/select-field.tsx similarity index 100% rename from src/ui/components/fields/select-field.tsx rename to packages/webui/components/fields/select-field.tsx diff --git a/src/ui/components/fields/select-multi-field.tsx b/packages/webui/components/fields/select-multi-field.tsx similarity index 100% rename from src/ui/components/fields/select-multi-field.tsx rename to packages/webui/components/fields/select-multi-field.tsx diff --git a/src/ui/components/fields/text-field.tsx b/packages/webui/components/fields/text-field.tsx similarity index 100% rename from src/ui/components/fields/text-field.tsx rename to packages/webui/components/fields/text-field.tsx diff --git a/src/ui/components/fields/toggle-field.tsx b/packages/webui/components/fields/toggle-field.tsx similarity index 100% rename from src/ui/components/fields/toggle-field.tsx rename to packages/webui/components/fields/toggle-field.tsx diff --git a/src/ui/components/file-browser/context-menu.tsx b/packages/webui/components/file-browser/context-menu.tsx similarity index 100% rename from src/ui/components/file-browser/context-menu.tsx rename to packages/webui/components/file-browser/context-menu.tsx diff --git a/src/ui/components/file-browser/file-browser.tsx b/packages/webui/components/file-browser/file-browser.tsx similarity index 100% rename from src/ui/components/file-browser/file-browser.tsx rename to packages/webui/components/file-browser/file-browser.tsx diff --git a/src/ui/components/file-browser/file-card.tsx b/packages/webui/components/file-browser/file-card.tsx similarity index 100% rename from src/ui/components/file-browser/file-card.tsx rename to packages/webui/components/file-browser/file-card.tsx diff --git a/src/ui/components/file-browser/file-list-item.tsx b/packages/webui/components/file-browser/file-list-item.tsx similarity index 100% rename from src/ui/components/file-browser/file-list-item.tsx rename to packages/webui/components/file-browser/file-list-item.tsx diff --git a/src/ui/components/file-browser/file-preview.tsx b/packages/webui/components/file-browser/file-preview.tsx similarity index 100% rename from src/ui/components/file-browser/file-preview.tsx rename to packages/webui/components/file-browser/file-preview.tsx diff --git a/src/ui/components/file-browser/folder-card.tsx b/packages/webui/components/file-browser/folder-card.tsx similarity index 100% rename from src/ui/components/file-browser/folder-card.tsx rename to packages/webui/components/file-browser/folder-card.tsx diff --git a/src/ui/components/file-browser/grid-view.tsx b/packages/webui/components/file-browser/grid-view.tsx similarity index 100% rename from src/ui/components/file-browser/grid-view.tsx rename to packages/webui/components/file-browser/grid-view.tsx diff --git a/src/ui/components/file-browser/list-view.tsx b/packages/webui/components/file-browser/list-view.tsx similarity index 100% rename from src/ui/components/file-browser/list-view.tsx rename to packages/webui/components/file-browser/list-view.tsx diff --git a/src/ui/components/file-browser/toolbar.tsx b/packages/webui/components/file-browser/toolbar.tsx similarity index 100% rename from src/ui/components/file-browser/toolbar.tsx rename to packages/webui/components/file-browser/toolbar.tsx diff --git a/src/ui/components/file-browser/use-file-actions.ts b/packages/webui/components/file-browser/use-file-actions.ts similarity index 100% rename from src/ui/components/file-browser/use-file-actions.ts rename to packages/webui/components/file-browser/use-file-actions.ts diff --git a/src/ui/components/file-system-manager.tsx b/packages/webui/components/file-system-manager.tsx similarity index 100% rename from src/ui/components/file-system-manager.tsx rename to packages/webui/components/file-system-manager.tsx diff --git a/src/ui/components/file-viewer-left-sidebar.tsx b/packages/webui/components/file-viewer-left-sidebar.tsx similarity index 100% rename from src/ui/components/file-viewer-left-sidebar.tsx rename to packages/webui/components/file-viewer-left-sidebar.tsx diff --git a/src/ui/components/file-viewer-right-sidebar.tsx b/packages/webui/components/file-viewer-right-sidebar.tsx similarity index 100% rename from src/ui/components/file-viewer-right-sidebar.tsx rename to packages/webui/components/file-viewer-right-sidebar.tsx diff --git a/src/ui/components/file-viewer.tsx b/packages/webui/components/file-viewer.tsx similarity index 100% rename from src/ui/components/file-viewer.tsx rename to packages/webui/components/file-viewer.tsx diff --git a/src/ui/components/folder-tree.tsx b/packages/webui/components/folder-tree.tsx similarity index 100% rename from src/ui/components/folder-tree.tsx rename to packages/webui/components/folder-tree.tsx diff --git a/src/ui/components/guest-identity-popup.tsx b/packages/webui/components/guest-identity-popup.tsx similarity index 100% rename from src/ui/components/guest-identity-popup.tsx rename to packages/webui/components/guest-identity-popup.tsx diff --git a/src/ui/components/lexical/plugins/ToolbarPlugin.tsx b/packages/webui/components/lexical/plugins/ToolbarPlugin.tsx similarity index 100% rename from src/ui/components/lexical/plugins/ToolbarPlugin.tsx rename to packages/webui/components/lexical/plugins/ToolbarPlugin.tsx diff --git a/src/ui/components/manage-fields-dialog.tsx b/packages/webui/components/manage-fields-dialog.tsx similarity index 100% rename from src/ui/components/manage-fields-dialog.tsx rename to packages/webui/components/manage-fields-dialog.tsx diff --git a/src/ui/components/markdown-editor.css b/packages/webui/components/markdown-editor.css similarity index 100% rename from src/ui/components/markdown-editor.css rename to packages/webui/components/markdown-editor.css diff --git a/src/ui/components/markdown-editor.tsx b/packages/webui/components/markdown-editor.tsx similarity index 100% rename from src/ui/components/markdown-editor.tsx rename to packages/webui/components/markdown-editor.tsx diff --git a/src/ui/components/members-dialog.tsx b/packages/webui/components/members-dialog.tsx similarity index 100% rename from src/ui/components/members-dialog.tsx rename to packages/webui/components/members-dialog.tsx diff --git a/src/ui/components/move-copy-dialog.tsx b/packages/webui/components/move-copy-dialog.tsx similarity index 100% rename from src/ui/components/move-copy-dialog.tsx rename to packages/webui/components/move-copy-dialog.tsx diff --git a/src/ui/components/notification-card.tsx b/packages/webui/components/notification-card.tsx similarity index 100% rename from src/ui/components/notification-card.tsx rename to packages/webui/components/notification-card.tsx diff --git a/src/ui/components/notification-list.tsx b/packages/webui/components/notification-list.tsx similarity index 100% rename from src/ui/components/notification-list.tsx rename to packages/webui/components/notification-list.tsx diff --git a/src/ui/components/project-dialog.tsx b/packages/webui/components/project-dialog.tsx similarity index 100% rename from src/ui/components/project-dialog.tsx rename to packages/webui/components/project-dialog.tsx diff --git a/src/ui/components/public-share-manager.tsx b/packages/webui/components/public-share-manager.tsx similarity index 100% rename from src/ui/components/public-share-manager.tsx rename to packages/webui/components/public-share-manager.tsx diff --git a/src/ui/components/resize-handle.tsx b/packages/webui/components/resize-handle.tsx similarity index 100% rename from src/ui/components/resize-handle.tsx rename to packages/webui/components/resize-handle.tsx diff --git a/src/ui/components/search/filter-panel.tsx b/packages/webui/components/search/filter-panel.tsx similarity index 100% rename from src/ui/components/search/filter-panel.tsx rename to packages/webui/components/search/filter-panel.tsx diff --git a/src/ui/components/search/search-filter-dialog.tsx b/packages/webui/components/search/search-filter-dialog.tsx similarity index 100% rename from src/ui/components/search/search-filter-dialog.tsx rename to packages/webui/components/search/search-filter-dialog.tsx diff --git a/src/ui/components/search/sort-control.tsx b/packages/webui/components/search/sort-control.tsx similarity index 100% rename from src/ui/components/search/sort-control.tsx rename to packages/webui/components/search/sort-control.tsx diff --git a/src/ui/components/settings/AgentFormDialog.tsx b/packages/webui/components/settings/AgentFormDialog.tsx similarity index 100% rename from src/ui/components/settings/AgentFormDialog.tsx rename to packages/webui/components/settings/AgentFormDialog.tsx diff --git a/src/ui/components/settings/AgentsSettings.tsx b/packages/webui/components/settings/AgentsSettings.tsx similarity index 100% rename from src/ui/components/settings/AgentsSettings.tsx rename to packages/webui/components/settings/AgentsSettings.tsx diff --git a/src/ui/components/settings/FormElements.tsx b/packages/webui/components/settings/FormElements.tsx similarity index 100% rename from src/ui/components/settings/FormElements.tsx rename to packages/webui/components/settings/FormElements.tsx diff --git a/src/ui/components/settings/NotificationSettings.tsx b/packages/webui/components/settings/NotificationSettings.tsx similarity index 100% rename from src/ui/components/settings/NotificationSettings.tsx rename to packages/webui/components/settings/NotificationSettings.tsx diff --git a/src/ui/components/settings/ProvidersSettings.tsx b/packages/webui/components/settings/ProvidersSettings.tsx similarity index 100% rename from src/ui/components/settings/ProvidersSettings.tsx rename to packages/webui/components/settings/ProvidersSettings.tsx diff --git a/src/ui/components/settings/SandboxSettings.tsx b/packages/webui/components/settings/SandboxSettings.tsx similarity index 100% rename from src/ui/components/settings/SandboxSettings.tsx rename to packages/webui/components/settings/SandboxSettings.tsx diff --git a/src/ui/components/settings/SkillsConfigCard.tsx b/packages/webui/components/settings/SkillsConfigCard.tsx similarity index 100% rename from src/ui/components/settings/SkillsConfigCard.tsx rename to packages/webui/components/settings/SkillsConfigCard.tsx diff --git a/src/ui/components/settings/constants.ts b/packages/webui/components/settings/constants.ts similarity index 100% rename from src/ui/components/settings/constants.ts rename to packages/webui/components/settings/constants.ts diff --git a/src/ui/components/settings/types.ts b/packages/webui/components/settings/types.ts similarity index 100% rename from src/ui/components/settings/types.ts rename to packages/webui/components/settings/types.ts diff --git a/src/ui/components/share-manager.tsx b/packages/webui/components/share-manager.tsx similarity index 100% rename from src/ui/components/share-manager.tsx rename to packages/webui/components/share-manager.tsx diff --git a/src/ui/components/share-settings-sidebar.tsx b/packages/webui/components/share-settings-sidebar.tsx similarity index 100% rename from src/ui/components/share-settings-sidebar.tsx rename to packages/webui/components/share-settings-sidebar.tsx diff --git a/src/ui/components/sidebar-file-card.tsx b/packages/webui/components/sidebar-file-card.tsx similarity index 100% rename from src/ui/components/sidebar-file-card.tsx rename to packages/webui/components/sidebar-file-card.tsx diff --git a/src/ui/components/sort-dropdown.tsx b/packages/webui/components/sort-dropdown.tsx similarity index 100% rename from src/ui/components/sort-dropdown.tsx rename to packages/webui/components/sort-dropdown.tsx diff --git a/src/ui/components/sprite-scrubber.tsx b/packages/webui/components/sprite-scrubber.tsx similarity index 100% rename from src/ui/components/sprite-scrubber.tsx rename to packages/webui/components/sprite-scrubber.tsx diff --git a/src/ui/components/team-selector.tsx b/packages/webui/components/team-selector.tsx similarity index 100% rename from src/ui/components/team-selector.tsx rename to packages/webui/components/team-selector.tsx diff --git a/src/ui/components/theme-provider.tsx b/packages/webui/components/theme-provider.tsx similarity index 100% rename from src/ui/components/theme-provider.tsx rename to packages/webui/components/theme-provider.tsx diff --git a/src/ui/components/theme-switcher.tsx b/packages/webui/components/theme-switcher.tsx similarity index 100% rename from src/ui/components/theme-switcher.tsx rename to packages/webui/components/theme-switcher.tsx diff --git a/src/ui/components/top-nav.tsx b/packages/webui/components/top-nav.tsx similarity index 100% rename from src/ui/components/top-nav.tsx rename to packages/webui/components/top-nav.tsx diff --git a/src/ui/components/ui/accordion.tsx b/packages/webui/components/ui/accordion.tsx similarity index 74% rename from src/ui/components/ui/accordion.tsx rename to packages/webui/components/ui/accordion.tsx index baa3d26d..735234a8 100644 --- a/src/ui/components/ui/accordion.tsx +++ b/packages/webui/components/ui/accordion.tsx @@ -1,12 +1,10 @@ -import * as React from "react" -import { ChevronDownIcon } from "lucide-react" -import { Accordion as AccordionPrimitive } from "radix-ui" +import * as React from 'react' +import { ChevronDownIcon } from 'lucide-react' +import { Accordion as AccordionPrimitive } from 'radix-ui' -import { cn } from "@/ui/lib/utils" +import { cn } from '@/ui/lib/utils' -function Accordion({ - ...props -}: React.ComponentProps) { +function Accordion({ ...props }: React.ComponentProps) { return } @@ -17,7 +15,7 @@ function AccordionItem({ return ( ) @@ -33,8 +31,8 @@ function AccordionTrigger({ svg]:rotate-180", - className + 'flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180', + className, )} {...props} > @@ -56,7 +54,7 @@ function AccordionContent({ className="overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down" {...props} > -
{children}
+
{children}
) } diff --git a/src/ui/components/ui/alert-dialog.tsx b/packages/webui/components/ui/alert-dialog.tsx similarity index 67% rename from src/ui/components/ui/alert-dialog.tsx rename to packages/webui/components/ui/alert-dialog.tsx index 90d00b0c..ea7fbfe1 100644 --- a/src/ui/components/ui/alert-dialog.tsx +++ b/packages/webui/components/ui/alert-dialog.tsx @@ -1,31 +1,23 @@ -"use client" +'use client' -import * as React from "react" -import { AlertDialog as AlertDialogPrimitive } from "radix-ui" +import * as React from 'react' +import { AlertDialog as AlertDialogPrimitive } from 'radix-ui' -import { cn } from "@/ui/lib/utils" -import { Button } from "@/ui/components/ui/button" +import { cn } from '@/ui/lib/utils' +import { Button } from '@/ui/components/ui/button' -function AlertDialog({ - ...props -}: React.ComponentProps) { +function AlertDialog({ ...props }: React.ComponentProps) { return } function AlertDialogTrigger({ ...props }: React.ComponentProps) { - return ( - - ) + return } -function AlertDialogPortal({ - ...props -}: React.ComponentProps) { - return ( - - ) +function AlertDialogPortal({ ...props }: React.ComponentProps) { + return } function AlertDialogOverlay({ @@ -36,8 +28,8 @@ function AlertDialogOverlay({ @@ -46,10 +38,10 @@ function AlertDialogOverlay({ function AlertDialogContent({ className, - size = "default", + size = 'default', ...props }: React.ComponentProps & { - size?: "default" | "sm" + size?: 'default' | 'sm' }) { return ( @@ -58,8 +50,8 @@ function AlertDialogContent({ data-slot="alert-dialog-content" data-size={size} className={cn( - "group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg", - className + 'group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg', + className, )} {...props} /> @@ -67,32 +59,26 @@ function AlertDialogContent({ ) } -function AlertDialogHeader({ - className, - ...props -}: React.ComponentProps<"div">) { +function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) { return (
) } -function AlertDialogFooter({ - className, - ...props -}: React.ComponentProps<"div">) { +function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) { return (
@@ -107,8 +93,8 @@ function AlertDialogTitle({ @@ -122,22 +108,19 @@ function AlertDialogDescription({ return ( ) } -function AlertDialogMedia({ - className, - ...props -}: React.ComponentProps<"div">) { +function AlertDialogMedia({ className, ...props }: React.ComponentProps<'div'>) { return (
@@ -146,11 +129,11 @@ function AlertDialogMedia({ function AlertDialogAction({ className, - variant = "default", - size = "default", + variant = 'default', + size = 'default', ...props }: React.ComponentProps & - Pick, "variant" | "size">) { + Pick, 'variant' | 'size'>) { return (