write-language 0.1.21 โ†’ 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,256 +1,256 @@
1
- # write-language
2
-
3
- Multi-provider language generation toolkit using Vercel AI SDK. Generate AI responses with 10+ LLM providers including OpenAI, Anthropic, Google, AWS Bedrock, and more.
4
-
5
- ## Features
6
-
7
- - ๐Ÿค– **Multi-Provider Support**: Works with 10+ LLM providers
8
- - OpenAI (GPT-4, GPT-3.5)
9
- - Anthropic (Claude 3.5, Claude 3)
10
- - Google (Gemini, PaLM)
11
- - AWS Bedrock
12
- - Groq
13
- - xAI (Grok)
14
- - Cloudflare Workers AI
15
- - Ollama (local models)
16
- - OpenRouter
17
- - And more!
18
-
19
- - ๐Ÿ“ **Flexible Response Generation**: Stream or non-stream responses
20
- - ๐Ÿ”ง **Model Registry**: Complete catalog of available models by provider
21
- - ๐ŸŽฏ **Provider Factory**: Easy provider initialization
22
- - ๐Ÿ“‹ **Pre-built Prompts**: Ready-to-use agent prompt templates
23
- - ๐Ÿ› ๏ธ **Tool Support**: Function calling and tool use capabilities
24
- - ๐ŸŽจ **Markdown to HTML**: Built-in markdown rendering with syntax highlighting
25
-
26
- ## Installation
27
-
28
- ```bash
29
- npm install write-language
30
- ```
31
-
32
- ## Usage
33
-
34
- ### Basic Response Generation
35
-
36
- ```typescript
37
- import { writeLanguageResponse } from 'write-language';
38
-
39
- const result = await writeLanguageResponse({
40
- provider: 'openai',
41
- model: 'gpt-4-turbo',
42
- prompt: 'Explain quantum computing in simple terms',
43
- apiKey: process.env.OPENAI_API_KEY
44
- });
45
-
46
- console.log(result.text);
47
- ```
48
-
49
- ### Streaming Responses
50
-
51
- ```typescript
52
- const result = await writeLanguageResponse({
53
- provider: 'anthropic',
54
- model: 'claude-3-5-sonnet-20241022',
55
- prompt: 'Write a short story about AI',
56
- apiKey: process.env.ANTHROPIC_API_KEY,
57
- stream: true
58
- });
59
-
60
- for await (const chunk of result.textStream) {
61
- process.stdout.write(chunk);
62
- }
63
- ```
64
-
65
- ### Using the Model Registry
66
-
67
- ```typescript
68
- import {
69
- LANGUAGE_MODELS,
70
- getModelsByProvider,
71
- getModelsByCapability
72
- } from 'write-language';
73
-
74
- // Get all OpenAI models
75
- const openaiModels = getModelsByProvider('openai');
76
-
77
- // Get all multimodal models
78
- const multimodalModels = getModelsByCapability('multimodal');
79
-
80
- // Check specific model info
81
- const gpt4Info = LANGUAGE_MODELS['gpt-4-turbo'];
82
- console.log(gpt4Info);
83
- // {
84
- // name: 'GPT-4 Turbo',
85
- // provider: 'openai',
86
- // contextWindow: 128000,
87
- // capabilities: ['text', 'multimodal', 'function-calling'],
88
- // ...
89
- // }
90
- ```
91
-
92
- ### Custom Provider Setup
93
-
94
- ```typescript
95
- import { createLLMProvider } from 'write-language';
96
-
97
- const provider = createLLMProvider(
98
- 'groq',
99
- process.env.GROQ_API_KEY
100
- );
101
-
102
- const model = provider('llama-3.3-70b-versatile');
103
- ```
104
-
105
- ### Using Agent Prompts
106
-
107
- ```typescript
108
- import { AGENT_PROMPTS } from 'write-language';
109
-
110
- const result = await writeLanguageResponse({
111
- provider: 'openai',
112
- model: 'gpt-4',
113
- prompt: AGENT_PROMPTS.researchAgent.systemPrompt,
114
- messages: [
115
- {
116
- role: 'user',
117
- content: 'Research the latest developments in fusion energy'
118
- }
119
- ],
120
- apiKey: process.env.OPENAI_API_KEY
121
- });
122
- ```
123
-
124
- ### Markdown to HTML Conversion
125
-
126
- ```typescript
127
- import { convertMarkdownToHTMLEscaped } from 'write-language';
128
-
129
- const markdown = '# Hello\n\n```javascript\nconsole.log("world");\n```';
130
- const html = convertMarkdownToHTMLEscaped(markdown);
131
- ```
132
-
133
- ## API Reference
134
-
135
- ### `writeLanguageResponse(options)`
136
-
137
- Generate an AI language response.
138
-
139
- **Options:**
140
- - `provider` (string): LLM provider name
141
- - `model` (string): Model identifier
142
- - `prompt` (string): System prompt or initial prompt
143
- - `apiKey` (string): Provider API key
144
- - `messages` (array, optional): Conversation history
145
- - `stream` (boolean, optional): Enable streaming
146
- - `maxTokens` (number, optional): Maximum tokens to generate
147
- - `temperature` (number, optional): Sampling temperature
148
- - `tools` (array, optional): Available tools for function calling
149
-
150
- **Returns:** `GenerateLanguageResult` with `text`, `textStream`, `finishReason`, etc.
151
-
152
- ### `createLLMProvider(provider, apiKey, options)`
153
-
154
- Create a provider instance.
155
-
156
- **Parameters:**
157
- - `provider`: Provider name
158
- - `apiKey`: API key
159
- - `options`: Additional provider options
160
-
161
- **Returns:** Provider function
162
-
163
- ### Model Registry Functions
164
-
165
- - `getModelsByProvider(provider)`: Get all models for a provider
166
- - `getAllModels()`: Get all available models
167
- - `getModelsByCapability(capability)`: Filter by capability
168
- - `getTextOnlyModels()`: Get text-only models
169
- - `getMultimodalModels()`: Get multimodal models
170
-
171
- Multi-provider AI agent toolkit for generating language responses, searching the web, extracting page content, and managing long-term memory across 10+ LLM providers.
172
-
173
- Built on top of the [Vercel AI SDK](https://sdk.vercel.ai), with a small registry of pre-tuned agent prompts (research, summarization, citation answering, query resolution, knowledge-graph extraction, etc.) and tool wrappers around the [QwkSearch](https://qwksearch.com) API.
174
-
175
- ## Language Intelligence Providers
176
-
177
- | Provider | ๐ŸŒ | Top Model (Others) | ๐Ÿ† Benchmarks | ๐Ÿ“„ Docs | ๐Ÿ”‘ Keys | ๐Ÿ’ฐ Funding |
178
- | ---------------------- | --- | --------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ------------ |
179
- | **Anthropic** | ๐Ÿ‡บ๐Ÿ‡ธ | Claude Mythos / Opus ย (Sonnet, Haiku) | ๐Ÿฅ‡ GPQA Diamond 94.6% ยท ๐Ÿฅ‡ SWE-bench 93.9% ยท ๐Ÿงฌ PhD reasoning | [Docs](https://docs.anthropic.com/en/docs/welcome) | [Keys](https://console.anthropic.com/settings/keys) | ~$60B |
180
- | **OpenAI** | ๐Ÿ‡บ๐Ÿ‡ธ | GPTย / o3 / Codex (o1, o4, o4-mini, gpt-4o) | ๐Ÿฅ‡ AIME 2025 100% ยท ๐Ÿฅ‡ SWE-bench Pro ยท ๐Ÿ“š MMLU-Pro 90% | [Docs](https://platform.openai.com/docs/overview) | [Keys](https://platform.openai.com/api-keys) | ~$180B |
181
- | **Google** | ๐Ÿ‡บ๐Ÿ‡ธ | Gemini Pro (Flash, Flash-Lite, Gemma) | ๐Ÿฅ‡ GPQA 94.1% ยท ๐Ÿฅ‡ LiveCodeBench Elo 2439 ยท ๐ŸŒ #1 in 6/13 Vals | [Docs](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models) | [Keys](https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview#api-keys) | Public |
182
- | **xAI** | ๐Ÿ‡บ๐Ÿ‡ธ | Grok Heavy (Grok-3, Grok Vision) | ๐Ÿฅ‡ AIME 2025 100% ยท ๐Ÿงฎ Math competition ยท โšก X integration | [Docs](https://docs.x.ai/docs#models) | [Keys](https://console.x.ai/) | ~$45B |
183
- | **Meta** | ๐Ÿ‡บ๐Ÿ‡ธ | Llamaย Maverick / Scout (Llama 3.x, CodeLlama) | ๐Ÿฅ‡ DocVQA 94.4% ยท ๐Ÿฅ‡ 10M token context ยท ๐Ÿ“Š ChartQA 90% | [Docs](https://www.llama.com/docs/overview/) | [Keys](https://www.llama.com/llama-downloads/) | Public |
184
- | **NVIDIA** | ๐Ÿ‡บ๐Ÿ‡ธ | Nemotron-Cascadeย  (Llama Nemotron, Kimi) | ๐Ÿฅ‡ LCB v6 87.2% ยท ๐Ÿ… IMO+IOI+ICPC gold ยท ๐Ÿงฎ AIME 98.6% | [Docs](https://docs.api.nvidia.com/nim/reference/llm-apis) | [Keys](https://build.nvidia.com/settings/api-keys) | Public |
185
- | **Perplexity** | ๐Ÿ‡บ๐Ÿ‡ธ | Sonar Reasoning Pro (Sonar Deep Research) | ๐Ÿฅ‡ Search Arena ยท ๐Ÿ” #1 web-grounded QA ยท ๐ŸŒ Real-time retrieval | [Docs](https://docs.perplexity.ai/models/model-cards) | [Keys](https://www.perplexity.ai/account/api/keys) | ~$1B |
186
- | **Groq** | ๐Ÿ‡บ๐Ÿ‡ธ | (Llama, DeepSeek, Gemma, Mistral, Qwen) | โšก #1 inference speed ยท ๐ŸŽ๏ธ Fastest TTFT ยท ๐Ÿ”ง LPU hardware | [Docs](https://console.groq.com/docs/overview) | [Keys](https://console.groq.com/keys) | ~$640M |
187
- | **Mistral** | ๐Ÿ‡ซ๐Ÿ‡ท | Mistral Largeย  (Small 4, Codestral, Devstral) | ๐Ÿฅˆ Arena Elo 1418 ยท ๐ŸŒ Multilingual MMLU 85.5% ยท ๐Ÿš€ Fastest TTFT | [Docs](https://docs.mistral.ai/) | [Keys](https://console.mistral.ai/api-keys/) | ~$3.1B |
188
- | **Together** | ๐Ÿ‡บ๐Ÿ‡ธ | (Llama, Mistral,ย Gemma, Qwen, DeepSeek) | ๐Ÿ—๏ธ Widest open hosting ยท ๐Ÿ’ธ Best open-source pricing ยท ๐Ÿ”ง Fine-tuning | [Docs](https://docs.together.ai/docs/quickstart) | [Keys](https://api.together.xyz/settings/api-keys) | ~$225M |
189
- | **Moonshot** | ๐Ÿ‡จ๐Ÿ‡ณ | Kimiย Reasoning (K2.6, K2) | ๐Ÿฅ‡ AIME open 96.1% ยท ๐Ÿฅ‡ MATH-500 98% ยท ๐Ÿฅ‡ HumanEval 99% | [Docs](https://platform.moonshot.cn/docs) | [Keys](https://platform.moonshot.cn/console/api-keys) | ~$3.9B |
190
- | **Zhipu** | ๐Ÿ‡จ๐Ÿ‡ณ | GLMย Reasoning / GLM-4.7 (GLM-4V, CogView) | ๐Ÿฅ‡ Chatbot Arena Elo 1451 ยท ๐Ÿฅ‡ MMLU 96% ยท ๐Ÿงฎ AIME 95.7% | [Docs](https://bigmodel.cn/dev/api) | [Keys](https://bigmodel.cn/usercenter/apikeys) | ~$1.8B |
191
- | **Alibaba** | ๐Ÿ‡จ๐Ÿ‡ณ | Qwen-Coder / Qwenย  (Qwen-VL, Qwen-Audio) | ๐Ÿฅ‡ Codeforces Elo 2056 ยท ๐Ÿ’ป SWE-bench 69.6% ยท ๐ŸŽ๏ธ LCB 70.7% | [Docs](https://www.alibabacloud.com/help/en/model-studio/developer-reference/use-qwen-by-calling-api) | [Keys](https://bailian.console.aliyun.com/?apiKey=1) | Public |
192
- | **DeepSeek** | ๐Ÿ‡จ๐Ÿ‡ณ | DeepSeekย (DeepSeek-Coder, DeepSeek-VL) | ๐Ÿฅ‡ IMO gold (open) ยท ๐Ÿ“š MMLU-Pro 81.2 ยท ๐Ÿงฎ AIME 87.5% | [Docs](https://api-docs.deepseek.com/) | [Keys](https://platform.deepseek.com/api_keys) | Bootstrapped |
193
- | **Cloudflare** | ๐Ÿ‡บ๐Ÿ‡ธ | (Llama, Mistral,ย Gemma, Qwen, DeepSeek) | ๐ŸŒ Edge inference ยท โšก Serverless CDN scale ยท ๐Ÿ”’ Privacy-first | [Docs](https://developers.cloudflare.com/workers-ai/) | [Keys](https://dash.cloudflare.com/profile/api-tokens) | Public |
194
- | **Ollama** | ๐Ÿ‡บ๐Ÿ‡ธ | (Llama, Mistral, Gemma, Qwen, DeepSeek) | ๐Ÿ–ฅ๏ธ #1 local inference ยท ๐Ÿ”’ Fully offline ยท ๐Ÿ†“ Free self-hosted | [Docs](https://ollama.com/docs) | [Keys](https://ollama.com/settings/keys) | ~$20M |
195
-
196
-
197
- ## Model Rank
198
-
199
-
200
- | Usage | Logo | Flag | Model | Author | Output $/M | Context | Intelligence | Coding | Agentic | Released |
201
- |---|---|---|---|---|---|---|---|---|---|---|
202
- | 1 | ![](https://www.google.com/s2/favicons?domain=deepseek.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | DeepSeek V4 Flash | DeepSeek | $0.18 | 1,048,576 | 40.3 | 56.2 | 31.1 | 2mo ago |
203
- | 2 | ![](https://www.google.com/s2/favicons?domain=xiaomi.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | MiMo-V2.5 | Xiaomi | $0.28 | 1,048,576 | โ€” | โ€” | โ€” | 2mo ago |
204
- | 3* | ![](https://www.google.com/s2/favicons?domain=minimax.io&sz=64) | ![](https://flagcdn.com/w40/cn.png) | MiniMax M3 | MiniMax | $1.20 | 1,048,576 | 44.4 | 58.6 | 35.4 | 1mo ago |
205
- | 4* | ![](https://www.google.com/s2/favicons?domain=z.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | GLM 5.2 | Z.ai | $2.856 | 1,048,576 | 51.1 | 68.8 | 43.1 | 2w ago |
206
- | 5* | ![](https://www.google.com/s2/favicons?domain=tencent.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Hy3 preview | Tencent | $0.21 | 262,144 | โ€” | โ€” | โ€” | 2mo ago |
207
- | 6* | ![](https://www.google.com/s2/favicons?domain=deepseek.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | DeepSeek V4 Pro | DeepSeek | $0.87 | 1,048,576 | 44.3 | 59.4 | 36.4 | 2mo ago |
208
- | 7 | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Opus 4.7 | Anthropic | $25 | 1,000,000 | 53.5 | 73.6 | 44.4 | 2mo ago |
209
- | 8 | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Opus 4.8 | Anthropic | $25 | 1,000,000 | 55.7 | 74.3 | 47.2 | 1mo ago |
210
- | 9* | ![](https://www.google.com/s2/favicons?domain=stepfun.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Step 3.7 Flash | StepFun | $1.15 | 256,000 | 29.7 | 37.3 | 21.5 | 1mo ago |
211
- | 10 | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Sonnet 4.6 | Anthropic | $15 | 1,000,000 | 47.2 | 63.0 | 40.8 | 4mo ago |
212
- | 11* | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | GPT-5.5 | OpenAI | $30 | 1,050,000 | 54.8 | 74.9 | 44.9 | 2mo ago |
213
- | 12* | ![](https://www.google.com/s2/favicons?domain=nvidia.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Nemotron 3 Ultra (free) | NVIDIA | $0 | 1,000,000 | 37.8 | 49.3 | 27.4 | 1mo ago |
214
- | 13 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 3 Flash Preview | Google | $3 | 1,048,576 | โ€” | โ€” | โ€” | 6mo ago |
215
- | 14 | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Sonnet 5 | Anthropic | $10 | 1,000,000 | 53.4 | 71.5 | 46.7 | 6d ago |
216
- | 15* | ![](https://www.google.com/s2/favicons?domain=poolside.ai&sz=64) | ![](https://flagcdn.com/w40/us.png) | Laguna M.1 (free) | Poolside | $0 | 262,144 | โ€” | โ€” | โ€” | 2mo ago |
217
- | 16 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 2.5 Flash Lite | Google | $0.40 | 1,048,576 | โ€” | โ€” | โ€” | 11mo ago |
218
- | 17 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 2.5 Flash | Google | $2.50 | 1,048,576 | โ€” | โ€” | โ€” | 1y ago |
219
- | 18* | ![](https://www.google.com/s2/favicons?domain=xiaomi.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | MiMo-V2.5-Pro | Xiaomi | $0.87 | 1,048,576 | 42.2 | 60.2 | 29.1 | 2mo ago |
220
- | 19 | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | GPT-4o-mini | OpenAI | $0.60 | 128,000 | โ€” | 11.4 | 1.0 | 1y ago |
221
- | 20 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 3.1 Flash Lite | Google | $1.50 | 1,048,576 | โ€” | โ€” | โ€” | 2mo ago |
222
- | 21 | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | gpt-oss-120b | OpenAI | $0.15 | 131,072 | 23.8 | 30.4 | 13.2 | 11mo ago |
223
- | 22 | ![](https://www.google.com/s2/favicons?domain=nvidia.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Nemotron 3 Super (free) | NVIDIA | $0 | 1,000,000 | 25.4 | 37.7 | 8.7 | 3mo ago |
224
- | 23 | ![](https://www.google.com/s2/favicons?domain=deepseek.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | DeepSeek V3.2 | DeepSeek | $0.3432 | 131,072 | โ€” | 43.7 | โ€” | 7mo ago |
225
- | 24* | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 3.5 Flash | Google | $9 | 1,048,576 | 50.2 | 70.1 | 37.4 | 1mo ago |
226
- | 25 | ![](https://www.google.com/s2/favicons?domain=tencent.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Hy3 (free) | Tencent | $0 | 262,144 | โ€” | โ€” | โ€” | 0d ago |
227
- | 26 | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | GPT-5.4 | OpenAI | $15 | 1,050,000 | 51.4 | 71.1 | 41.1 | 4mo ago |
228
- | 27 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemma 4 31B | Google | $0.35 | 262,144 | 29.4 | 43.4 | 14.4 | 3mo ago |
229
- | 28 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemma 4 26B A4B | Google | $0.33 | 262,144 | 25.7 | 39.3 | 11.0 | 3mo ago |
230
- | 29* | ![](https://www.google.com/s2/favicons?domain=moonshot.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Kimi K2.6 | MoonshotAI | $3.41 | 262,144 | 42.8 | 56.0 | 30.3 | 2mo ago |
231
- | 30* | ![](https://www.google.com/s2/favicons?domain=mistral.ai&sz=64) | ![](https://flagcdn.com/w40/fr.png) | Mistral Nemo | Mistral | $0.03 | 131,072 | โ€” | โ€” | โ€” | 1y ago |
232
- | 31* | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Fable 5 | Anthropic | $50 | 1,000,000 | 59.9 | 76.5 | 52.8 | 3w ago |
233
- | 32 | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Opus 4.6 | Anthropic | $25 | 1,000,000 | โ€” | โ€” | โ€” | 5mo ago |
234
- | 33 | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Haiku 4.5 | Anthropic | $5 | 200,000 | 29.6 | 43.9 | 16.4 | 8mo ago |
235
- | 34 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 3.1 Pro Preview | Google | $12 | 1,048,576 | 46.5 | 68.8 | 21.4 | 4mo ago |
236
- | 35 | ![](https://www.google.com/s2/favicons?domain=moonshot.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Kimi K2.7 Code | MoonshotAI | $3.50 | 262,144 | 41.9 | 60.8 | 29.6 | 3w ago |
237
- | 36 | ![](https://www.google.com/s2/favicons?domain=z.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | GLM 5 | Z.ai | $1.92 | 202,752 | โ€” | โ€” | โ€” | 4mo ago |
238
- | 37 | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | GPT-5.4 Mini | OpenAI | $4.50 | 400,000 | 40.0 | 56.1 | 30.2 | 3mo ago |
239
- | 38* | ![](https://www.google.com/s2/favicons?domain=qwen.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Qwen3.7 Max | Qwen | $3.75 | 1,000,000 | 46.0 | 66.0 | 30.6 | 1mo ago |
240
- | 39 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 3.1 Flash Lite Preview | Google | $1.50 | 1,048,576 | 25.0 | 34.7 | 6.2 | 4mo ago |
241
- | 40 | ![](https://www.google.com/s2/favicons?domain=qwen.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Qwen3.7 Plus | Qwen | $1.28 | 1,000,000 | 39.0 | 55.9 | 20.8 | 1mo ago |
242
- | 41* | ![](https://www.google.com/s2/favicons?domain=cohere.com&sz=64) | ![](https://flagcdn.com/w40/ca.png) | North Mini Code (free) | Cohere | $0 | 256,000 | โ€” | 36.5 | โ€” | 2w ago |
243
- | 42 | ![](https://www.google.com/s2/favicons?domain=z.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | GLM 5.1 | Z.ai | $3.036 | 202,752 | 40.2 | 55.8 | 29.9 | 3mo ago |
244
- | 43 | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | GPT-5 Mini | OpenAI | $2 | 400,000 | 25.3 | 15.6 | 19.4 | 11mo ago |
245
- | 44 | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | GPT-5.4 Nano | OpenAI | $1.25 | 400,000 | 38.2 | 56.1 | 27.5 | 3mo ago |
246
- | 45 | ![](https://www.google.com/s2/favicons?domain=minimax.io&sz=64) | ![](https://flagcdn.com/w40/cn.png) | MiniMax M2.7 | MiniMax | $0.72 | 204,800 | 38.1 | 52.6 | 25.6 | 3mo ago |
247
- | 46 | ![](https://www.google.com/s2/favicons?domain=moonshot.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Kimi K2.5 | MoonshotAI | $2.025 | 262,144 | โ€” | โ€” | โ€” | 5mo ago |
248
- | 47* | ![](https://www.google.com/s2/favicons?domain=x.ai&sz=64) | ![](https://flagcdn.com/w40/us.png) | Grok 4.3 | xAI | $2.50 | 1,000,000 | 37.6 | 42.2 | 24.1 | 2mo ago |
249
- | 48 | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Sonnet 4.5 | Anthropic | $15 | 1,000,000 | 36.4 | 52.1 | 24.6 | 9mo ago |
250
- | 49 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 2.5 Pro | Google | $10 | 1,048,576 | 25.8 | 33.3 | 7.1 | 1y ago |
251
- | 50 | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | GPT-4.1 Mini | OpenAI | $1.60 | 1,047,576 | 14.8 | 20.2 | 1.7 | 1y ago |
252
- | 51 | ![](https://www.google.com/s2/favicons?domain=qwen.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Qwen3 235B A22B Instruct 2507 | Qwen | $0.10 | 262,144 | โ€” | โ€” | โ€” | 11mo ago |
253
- | 52 | ![](https://www.google.com/s2/favicons?domain=poolside.ai&sz=64) | ![](https://flagcdn.com/w40/us.png) | Laguna XS 2.1 (free) | Poolside | $0 | 262,144 | โ€” | โ€” | โ€” | 4d ago |
254
- | 53 | ![](https://www.google.com/s2/favicons?domain=qwen.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Qwen3.6 Plus | Qwen | $1.95 | 1,000,000 | 39.6 | 54.5 | 27.6 | 3mo ago |
255
- | 54 | ![](https://www.google.com/s2/favicons?domain=z.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | GLM 4.7 Flash | Z.ai | $0.40 | 202,752 | โ€” | โ€” | โ€” | 5mo ago |
1
+ # write-language
2
+
3
+ Multi-provider language generation toolkit using Vercel AI SDK. Generate AI responses with 10+ LLM providers including OpenAI, Anthropic, Google, AWS Bedrock, and more.
4
+
5
+ ## Features
6
+
7
+ - ๐Ÿค– **Multi-Provider Support**: Works with 10+ LLM providers
8
+ - OpenAI (GPT-4, GPT-3.5)
9
+ - Anthropic (Claude 3.5, Claude 3)
10
+ - Google (Gemini, PaLM)
11
+ - AWS Bedrock
12
+ - Groq
13
+ - xAI (Grok)
14
+ - Cloudflare Workers AI
15
+ - Ollama (local models)
16
+ - OpenRouter
17
+ - And more!
18
+
19
+ - ๐Ÿ“ **Flexible Response Generation**: Stream or non-stream responses
20
+ - ๐Ÿ”ง **Model Registry**: Complete catalog of available models by provider
21
+ - ๐ŸŽฏ **Provider Factory**: Easy provider initialization
22
+ - ๐Ÿ“‹ **Pre-built Prompts**: Ready-to-use agent prompt templates
23
+ - ๐Ÿ› ๏ธ **Tool Support**: Function calling and tool use capabilities
24
+ - ๐ŸŽจ **Markdown to HTML**: Built-in markdown rendering with syntax highlighting
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ npm install write-language
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ ### Basic Response Generation
35
+
36
+ ```typescript
37
+ import { writeLanguageResponse } from 'write-language';
38
+
39
+ const result = await writeLanguageResponse({
40
+ provider: 'openai',
41
+ model: 'gpt-4-turbo',
42
+ prompt: 'Explain quantum computing in simple terms',
43
+ apiKey: process.env.OPENAI_API_KEY
44
+ });
45
+
46
+ console.log(result.text);
47
+ ```
48
+
49
+ ### Streaming Responses
50
+
51
+ ```typescript
52
+ const result = await writeLanguageResponse({
53
+ provider: 'anthropic',
54
+ model: 'claude-3-5-sonnet-20241022',
55
+ prompt: 'Write a short story about AI',
56
+ apiKey: process.env.ANTHROPIC_API_KEY,
57
+ stream: true
58
+ });
59
+
60
+ for await (const chunk of result.textStream) {
61
+ process.stdout.write(chunk);
62
+ }
63
+ ```
64
+
65
+ ### Using the Model Registry
66
+
67
+ ```typescript
68
+ import {
69
+ LANGUAGE_MODELS,
70
+ getModelsByProvider,
71
+ getModelsByCapability
72
+ } from 'write-language';
73
+
74
+ // Get all OpenAI models
75
+ const openaiModels = getModelsByProvider('openai');
76
+
77
+ // Get all multimodal models
78
+ const multimodalModels = getModelsByCapability('multimodal');
79
+
80
+ // Check specific model info
81
+ const gpt4Info = LANGUAGE_MODELS['gpt-4-turbo'];
82
+ console.log(gpt4Info);
83
+ // {
84
+ // name: 'GPT-4 Turbo',
85
+ // provider: 'openai',
86
+ // contextWindow: 128000,
87
+ // capabilities: ['text', 'multimodal', 'function-calling'],
88
+ // ...
89
+ // }
90
+ ```
91
+
92
+ ### Custom Provider Setup
93
+
94
+ ```typescript
95
+ import { createLLMProvider } from 'write-language';
96
+
97
+ const provider = createLLMProvider(
98
+ 'groq',
99
+ process.env.GROQ_API_KEY
100
+ );
101
+
102
+ const model = provider('llama-3.3-70b-versatile');
103
+ ```
104
+
105
+ ### Using Agent Prompts
106
+
107
+ ```typescript
108
+ import { AGENT_PROMPTS } from 'write-language';
109
+
110
+ const result = await writeLanguageResponse({
111
+ provider: 'openai',
112
+ model: 'gpt-4',
113
+ prompt: AGENT_PROMPTS.researchAgent.systemPrompt,
114
+ messages: [
115
+ {
116
+ role: 'user',
117
+ content: 'Research the latest developments in fusion energy'
118
+ }
119
+ ],
120
+ apiKey: process.env.OPENAI_API_KEY
121
+ });
122
+ ```
123
+
124
+ ### Markdown to HTML Conversion
125
+
126
+ ```typescript
127
+ import { convertMarkdownToHTMLEscaped } from 'write-language';
128
+
129
+ const markdown = '# Hello\n\n```javascript\nconsole.log("world");\n```';
130
+ const html = convertMarkdownToHTMLEscaped(markdown);
131
+ ```
132
+
133
+ ## API Reference
134
+
135
+ ### `writeLanguageResponse(options)`
136
+
137
+ Generate an AI language response.
138
+
139
+ **Options:**
140
+ - `provider` (string): LLM provider name
141
+ - `model` (string): Model identifier
142
+ - `prompt` (string): System prompt or initial prompt
143
+ - `apiKey` (string): Provider API key
144
+ - `messages` (array, optional): Conversation history
145
+ - `stream` (boolean, optional): Enable streaming
146
+ - `maxTokens` (number, optional): Maximum tokens to generate
147
+ - `temperature` (number, optional): Sampling temperature
148
+ - `tools` (array, optional): Available tools for function calling
149
+
150
+ **Returns:** `GenerateLanguageResult` with `text`, `textStream`, `finishReason`, etc.
151
+
152
+ ### `createLLMProvider(provider, apiKey, options)`
153
+
154
+ Create a provider instance.
155
+
156
+ **Parameters:**
157
+ - `provider`: Provider name
158
+ - `apiKey`: API key
159
+ - `options`: Additional provider options
160
+
161
+ **Returns:** Provider function
162
+
163
+ ### Model Registry Functions
164
+
165
+ - `getModelsByProvider(provider)`: Get all models for a provider
166
+ - `getAllModels()`: Get all available models
167
+ - `getModelsByCapability(capability)`: Filter by capability
168
+ - `getTextOnlyModels()`: Get text-only models
169
+ - `getMultimodalModels()`: Get multimodal models
170
+
171
+ Multi-provider AI agent toolkit for generating language responses, searching the web, extracting page content, and managing long-term memory across 10+ LLM providers.
172
+
173
+ Built on top of the [Vercel AI SDK](https://sdk.vercel.ai), with a small registry of pre-tuned agent prompts (research, summarization, citation answering, query resolution, knowledge-graph extraction, etc.) and tool wrappers around the [QwkSearch](https://qwksearch.com) API.
174
+
175
+ ## Language Intelligence Providers
176
+
177
+ | Provider | ๐ŸŒ | Top Model (Others) | ๐Ÿ† Benchmarks | ๐Ÿ“„ Docs | ๐Ÿ”‘ Keys | ๐Ÿ’ฐ Funding |
178
+ | ---------------------- | --- | --------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ------------ |
179
+ | **Anthropic** | ๐Ÿ‡บ๐Ÿ‡ธ | Claude Mythos / Opus ย (Sonnet, Haiku) | ๐Ÿฅ‡ GPQA Diamond 94.6% ยท ๐Ÿฅ‡ SWE-bench 93.9% ยท ๐Ÿงฌ PhD reasoning | [Docs](https://docs.anthropic.com/en/docs/welcome) | [Keys](https://console.anthropic.com/settings/keys) | ~$60B |
180
+ | **OpenAI** | ๐Ÿ‡บ๐Ÿ‡ธ | GPTย / o3 / Codex (o1, o4, o4-mini, gpt-4o) | ๐Ÿฅ‡ AIME 2025 100% ยท ๐Ÿฅ‡ SWE-bench Pro ยท ๐Ÿ“š MMLU-Pro 90% | [Docs](https://platform.openai.com/docs/overview) | [Keys](https://platform.openai.com/api-keys) | ~$180B |
181
+ | **Google** | ๐Ÿ‡บ๐Ÿ‡ธ | Gemini Pro (Flash, Flash-Lite, Gemma) | ๐Ÿฅ‡ GPQA 94.1% ยท ๐Ÿฅ‡ LiveCodeBench Elo 2439 ยท ๐ŸŒ #1 in 6/13 Vals | [Docs](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models) | [Keys](https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview#api-keys) | Public |
182
+ | **xAI** | ๐Ÿ‡บ๐Ÿ‡ธ | Grok Heavy (Grok-3, Grok Vision) | ๐Ÿฅ‡ AIME 2025 100% ยท ๐Ÿงฎ Math competition ยท โšก X integration | [Docs](https://docs.x.ai/docs#models) | [Keys](https://console.x.ai/) | ~$45B |
183
+ | **Meta** | ๐Ÿ‡บ๐Ÿ‡ธ | Llamaย Maverick / Scout (Llama 3.x, CodeLlama) | ๐Ÿฅ‡ DocVQA 94.4% ยท ๐Ÿฅ‡ 10M token context ยท ๐Ÿ“Š ChartQA 90% | [Docs](https://www.llama.com/docs/overview/) | [Keys](https://www.llama.com/llama-downloads/) | Public |
184
+ | **NVIDIA** | ๐Ÿ‡บ๐Ÿ‡ธ | Nemotron-Cascadeย  (Llama Nemotron, Kimi) | ๐Ÿฅ‡ LCB v6 87.2% ยท ๐Ÿ… IMO+IOI+ICPC gold ยท ๐Ÿงฎ AIME 98.6% | [Docs](https://docs.api.nvidia.com/nim/reference/llm-apis) | [Keys](https://build.nvidia.com/settings/api-keys) | Public |
185
+ | **Perplexity** | ๐Ÿ‡บ๐Ÿ‡ธ | Sonar Reasoning Pro (Sonar Deep Research) | ๐Ÿฅ‡ Search Arena ยท ๐Ÿ” #1 web-grounded QA ยท ๐ŸŒ Real-time retrieval | [Docs](https://docs.perplexity.ai/models/model-cards) | [Keys](https://www.perplexity.ai/account/api/keys) | ~$1B |
186
+ | **Groq** | ๐Ÿ‡บ๐Ÿ‡ธ | (Llama, DeepSeek, Gemma, Mistral, Qwen) | โšก #1 inference speed ยท ๐ŸŽ๏ธ Fastest TTFT ยท ๐Ÿ”ง LPU hardware | [Docs](https://console.groq.com/docs/overview) | [Keys](https://console.groq.com/keys) | ~$640M |
187
+ | **Mistral** | ๐Ÿ‡ซ๐Ÿ‡ท | Mistral Largeย  (Small 4, Codestral, Devstral) | ๐Ÿฅˆ Arena Elo 1418 ยท ๐ŸŒ Multilingual MMLU 85.5% ยท ๐Ÿš€ Fastest TTFT | [Docs](https://docs.mistral.ai/) | [Keys](https://console.mistral.ai/api-keys/) | ~$3.1B |
188
+ | **Together** | ๐Ÿ‡บ๐Ÿ‡ธ | (Llama, Mistral,ย Gemma, Qwen, DeepSeek) | ๐Ÿ—๏ธ Widest open hosting ยท ๐Ÿ’ธ Best open-source pricing ยท ๐Ÿ”ง Fine-tuning | [Docs](https://docs.together.ai/docs/quickstart) | [Keys](https://api.together.xyz/settings/api-keys) | ~$225M |
189
+ | **Moonshot** | ๐Ÿ‡จ๐Ÿ‡ณ | Kimiย Reasoning (K2.6, K2) | ๐Ÿฅ‡ AIME open 96.1% ยท ๐Ÿฅ‡ MATH-500 98% ยท ๐Ÿฅ‡ HumanEval 99% | [Docs](https://platform.moonshot.cn/docs) | [Keys](https://platform.moonshot.cn/console/api-keys) | ~$3.9B |
190
+ | **Zhipu** | ๐Ÿ‡จ๐Ÿ‡ณ | GLMย Reasoning / GLM-4.7 (GLM-4V, CogView) | ๐Ÿฅ‡ Chatbot Arena Elo 1451 ยท ๐Ÿฅ‡ MMLU 96% ยท ๐Ÿงฎ AIME 95.7% | [Docs](https://bigmodel.cn/dev/api) | [Keys](https://bigmodel.cn/usercenter/apikeys) | ~$1.8B |
191
+ | **Alibaba** | ๐Ÿ‡จ๐Ÿ‡ณ | Qwen-Coder / Qwenย  (Qwen-VL, Qwen-Audio) | ๐Ÿฅ‡ Codeforces Elo 2056 ยท ๐Ÿ’ป SWE-bench 69.6% ยท ๐ŸŽ๏ธ LCB 70.7% | [Docs](https://www.alibabacloud.com/help/en/model-studio/developer-reference/use-qwen-by-calling-api) | [Keys](https://bailian.console.aliyun.com/?apiKey=1) | Public |
192
+ | **DeepSeek** | ๐Ÿ‡จ๐Ÿ‡ณ | DeepSeekย (DeepSeek-Coder, DeepSeek-VL) | ๐Ÿฅ‡ IMO gold (open) ยท ๐Ÿ“š MMLU-Pro 81.2 ยท ๐Ÿงฎ AIME 87.5% | [Docs](https://api-docs.deepseek.com/) | [Keys](https://platform.deepseek.com/api_keys) | Bootstrapped |
193
+ | **Cloudflare** | ๐Ÿ‡บ๐Ÿ‡ธ | (Llama, Mistral,ย Gemma, Qwen, DeepSeek) | ๐ŸŒ Edge inference ยท โšก Serverless CDN scale ยท ๐Ÿ”’ Privacy-first | [Docs](https://developers.cloudflare.com/workers-ai/) | [Keys](https://dash.cloudflare.com/profile/api-tokens) | Public |
194
+ | **Ollama** | ๐Ÿ‡บ๐Ÿ‡ธ | (Llama, Mistral, Gemma, Qwen, DeepSeek) | ๐Ÿ–ฅ๏ธ #1 local inference ยท ๐Ÿ”’ Fully offline ยท ๐Ÿ†“ Free self-hosted | [Docs](https://ollama.com/docs) | [Keys](https://ollama.com/settings/keys) | ~$20M |
195
+
196
+
197
+ ## Model Rank
198
+
199
+
200
+ | Usage | Logo | Flag | Model | Author | Output $/M | Context | Intelligence | Coding | Agentic | Released |
201
+ |---|---|---|---|---|---|---|---|---|---|---|
202
+ | 1 | ![](https://www.google.com/s2/favicons?domain=deepseek.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | DeepSeek V4 Flash | DeepSeek | $0.18 | 1,048,576 | 40.3 | 56.2 | 31.1 | 2mo ago |
203
+ | 2 | ![](https://www.google.com/s2/favicons?domain=xiaomi.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | MiMo-V2.5 | Xiaomi | $0.28 | 1,048,576 | โ€” | โ€” | โ€” | 2mo ago |
204
+ | 3* | ![](https://www.google.com/s2/favicons?domain=minimax.io&sz=64) | ![](https://flagcdn.com/w40/cn.png) | MiniMax M3 | MiniMax | $1.20 | 1,048,576 | 44.4 | 58.6 | 35.4 | 1mo ago |
205
+ | 4* | ![](https://www.google.com/s2/favicons?domain=z.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | GLM 5.2 | Z.ai | $2.856 | 1,048,576 | 51.1 | 68.8 | 43.1 | 2w ago |
206
+ | 5* | ![](https://www.google.com/s2/favicons?domain=tencent.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Hy3 preview | Tencent | $0.21 | 262,144 | โ€” | โ€” | โ€” | 2mo ago |
207
+ | 6* | ![](https://www.google.com/s2/favicons?domain=deepseek.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | DeepSeek V4 Pro | DeepSeek | $0.87 | 1,048,576 | 44.3 | 59.4 | 36.4 | 2mo ago |
208
+ | 7 | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Opus 4.7 | Anthropic | $25 | 1,000,000 | 53.5 | 73.6 | 44.4 | 2mo ago |
209
+ | 8 | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Opus 4.8 | Anthropic | $25 | 1,000,000 | 55.7 | 74.3 | 47.2 | 1mo ago |
210
+ | 9* | ![](https://www.google.com/s2/favicons?domain=stepfun.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Step 3.7 Flash | StepFun | $1.15 | 256,000 | 29.7 | 37.3 | 21.5 | 1mo ago |
211
+ | 10 | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Sonnet 4.6 | Anthropic | $15 | 1,000,000 | 47.2 | 63.0 | 40.8 | 4mo ago |
212
+ | 11* | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | GPT-5.5 | OpenAI | $30 | 1,050,000 | 54.8 | 74.9 | 44.9 | 2mo ago |
213
+ | 12* | ![](https://www.google.com/s2/favicons?domain=nvidia.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Nemotron 3 Ultra (free) | NVIDIA | $0 | 1,000,000 | 37.8 | 49.3 | 27.4 | 1mo ago |
214
+ | 13 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 3 Flash Preview | Google | $3 | 1,048,576 | โ€” | โ€” | โ€” | 6mo ago |
215
+ | 14 | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Sonnet 5 | Anthropic | $10 | 1,000,000 | 53.4 | 71.5 | 46.7 | 6d ago |
216
+ | 15* | ![](https://www.google.com/s2/favicons?domain=poolside.ai&sz=64) | ![](https://flagcdn.com/w40/us.png) | Laguna M.1 (free) | Poolside | $0 | 262,144 | โ€” | โ€” | โ€” | 2mo ago |
217
+ | 16 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 2.5 Flash Lite | Google | $0.40 | 1,048,576 | โ€” | โ€” | โ€” | 11mo ago |
218
+ | 17 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 2.5 Flash | Google | $2.50 | 1,048,576 | โ€” | โ€” | โ€” | 1y ago |
219
+ | 18* | ![](https://www.google.com/s2/favicons?domain=xiaomi.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | MiMo-V2.5-Pro | Xiaomi | $0.87 | 1,048,576 | 42.2 | 60.2 | 29.1 | 2mo ago |
220
+ | 19 | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | GPT-4o-mini | OpenAI | $0.60 | 128,000 | โ€” | 11.4 | 1.0 | 1y ago |
221
+ | 20 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 3.1 Flash Lite | Google | $1.50 | 1,048,576 | โ€” | โ€” | โ€” | 2mo ago |
222
+ | 21 | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | gpt-oss-120b | OpenAI | $0.15 | 131,072 | 23.8 | 30.4 | 13.2 | 11mo ago |
223
+ | 22 | ![](https://www.google.com/s2/favicons?domain=nvidia.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Nemotron 3 Super (free) | NVIDIA | $0 | 1,000,000 | 25.4 | 37.7 | 8.7 | 3mo ago |
224
+ | 23 | ![](https://www.google.com/s2/favicons?domain=deepseek.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | DeepSeek V3.2 | DeepSeek | $0.3432 | 131,072 | โ€” | 43.7 | โ€” | 7mo ago |
225
+ | 24* | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 3.5 Flash | Google | $9 | 1,048,576 | 50.2 | 70.1 | 37.4 | 1mo ago |
226
+ | 25 | ![](https://www.google.com/s2/favicons?domain=tencent.com&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Hy3 (free) | Tencent | $0 | 262,144 | โ€” | โ€” | โ€” | 0d ago |
227
+ | 26 | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | GPT-5.4 | OpenAI | $15 | 1,050,000 | 51.4 | 71.1 | 41.1 | 4mo ago |
228
+ | 27 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemma 4 31B | Google | $0.35 | 262,144 | 29.4 | 43.4 | 14.4 | 3mo ago |
229
+ | 28 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemma 4 26B A4B | Google | $0.33 | 262,144 | 25.7 | 39.3 | 11.0 | 3mo ago |
230
+ | 29* | ![](https://www.google.com/s2/favicons?domain=moonshot.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Kimi K2.6 | MoonshotAI | $3.41 | 262,144 | 42.8 | 56.0 | 30.3 | 2mo ago |
231
+ | 30* | ![](https://www.google.com/s2/favicons?domain=mistral.ai&sz=64) | ![](https://flagcdn.com/w40/fr.png) | Mistral Nemo | Mistral | $0.03 | 131,072 | โ€” | โ€” | โ€” | 1y ago |
232
+ | 31* | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Fable 5 | Anthropic | $50 | 1,000,000 | 59.9 | 76.5 | 52.8 | 3w ago |
233
+ | 32 | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Opus 4.6 | Anthropic | $25 | 1,000,000 | โ€” | โ€” | โ€” | 5mo ago |
234
+ | 33 | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Haiku 4.5 | Anthropic | $5 | 200,000 | 29.6 | 43.9 | 16.4 | 8mo ago |
235
+ | 34 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 3.1 Pro Preview | Google | $12 | 1,048,576 | 46.5 | 68.8 | 21.4 | 4mo ago |
236
+ | 35 | ![](https://www.google.com/s2/favicons?domain=moonshot.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Kimi K2.7 Code | MoonshotAI | $3.50 | 262,144 | 41.9 | 60.8 | 29.6 | 3w ago |
237
+ | 36 | ![](https://www.google.com/s2/favicons?domain=z.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | GLM 5 | Z.ai | $1.92 | 202,752 | โ€” | โ€” | โ€” | 4mo ago |
238
+ | 37 | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | GPT-5.4 Mini | OpenAI | $4.50 | 400,000 | 40.0 | 56.1 | 30.2 | 3mo ago |
239
+ | 38* | ![](https://www.google.com/s2/favicons?domain=qwen.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Qwen3.7 Max | Qwen | $3.75 | 1,000,000 | 46.0 | 66.0 | 30.6 | 1mo ago |
240
+ | 39 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 3.1 Flash Lite Preview | Google | $1.50 | 1,048,576 | 25.0 | 34.7 | 6.2 | 4mo ago |
241
+ | 40 | ![](https://www.google.com/s2/favicons?domain=qwen.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Qwen3.7 Plus | Qwen | $1.28 | 1,000,000 | 39.0 | 55.9 | 20.8 | 1mo ago |
242
+ | 41* | ![](https://www.google.com/s2/favicons?domain=cohere.com&sz=64) | ![](https://flagcdn.com/w40/ca.png) | North Mini Code (free) | Cohere | $0 | 256,000 | โ€” | 36.5 | โ€” | 2w ago |
243
+ | 42 | ![](https://www.google.com/s2/favicons?domain=z.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | GLM 5.1 | Z.ai | $3.036 | 202,752 | 40.2 | 55.8 | 29.9 | 3mo ago |
244
+ | 43 | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | GPT-5 Mini | OpenAI | $2 | 400,000 | 25.3 | 15.6 | 19.4 | 11mo ago |
245
+ | 44 | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | GPT-5.4 Nano | OpenAI | $1.25 | 400,000 | 38.2 | 56.1 | 27.5 | 3mo ago |
246
+ | 45 | ![](https://www.google.com/s2/favicons?domain=minimax.io&sz=64) | ![](https://flagcdn.com/w40/cn.png) | MiniMax M2.7 | MiniMax | $0.72 | 204,800 | 38.1 | 52.6 | 25.6 | 3mo ago |
247
+ | 46 | ![](https://www.google.com/s2/favicons?domain=moonshot.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Kimi K2.5 | MoonshotAI | $2.025 | 262,144 | โ€” | โ€” | โ€” | 5mo ago |
248
+ | 47* | ![](https://www.google.com/s2/favicons?domain=x.ai&sz=64) | ![](https://flagcdn.com/w40/us.png) | Grok 4.3 | xAI | $2.50 | 1,000,000 | 37.6 | 42.2 | 24.1 | 2mo ago |
249
+ | 48 | ![](https://www.google.com/s2/favicons?domain=anthropic.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Claude Sonnet 4.5 | Anthropic | $15 | 1,000,000 | 36.4 | 52.1 | 24.6 | 9mo ago |
250
+ | 49 | ![](https://www.google.com/s2/favicons?domain=google.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | Gemini 2.5 Pro | Google | $10 | 1,048,576 | 25.8 | 33.3 | 7.1 | 1y ago |
251
+ | 50 | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | GPT-4.1 Mini | OpenAI | $1.60 | 1,047,576 | 14.8 | 20.2 | 1.7 | 1y ago |
252
+ | 51 | ![](https://www.google.com/s2/favicons?domain=qwen.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Qwen3 235B A22B Instruct 2507 | Qwen | $0.10 | 262,144 | โ€” | โ€” | โ€” | 11mo ago |
253
+ | 52 | ![](https://www.google.com/s2/favicons?domain=poolside.ai&sz=64) | ![](https://flagcdn.com/w40/us.png) | Laguna XS 2.1 (free) | Poolside | $0 | 262,144 | โ€” | โ€” | โ€” | 4d ago |
254
+ | 53 | ![](https://www.google.com/s2/favicons?domain=qwen.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | Qwen3.6 Plus | Qwen | $1.95 | 1,000,000 | 39.6 | 54.5 | 27.6 | 3mo ago |
255
+ | 54 | ![](https://www.google.com/s2/favicons?domain=z.ai&sz=64) | ![](https://flagcdn.com/w40/cn.png) | GLM 4.7 Flash | Z.ai | $0.40 | 202,752 | โ€” | โ€” | โ€” | 5mo ago |
256
256
  | 55 | ![](https://www.google.com/s2/favicons?domain=openai.com&sz=64) | ![](https://flagcdn.com/w40/us.png) | gpt-oss-20b | OpenAI | $0.14 | 131,072 | 14.9 | 20.7 | 3.1 | 11mo ago |