Skip to content

Commit 273b314

Browse files
Add Cloudflare Workers AI catalog models
1 parent a1741c1 commit 273b314

8 files changed

Lines changed: 81 additions & 9 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
All notable changes to `@stackbilt/llm-providers` are documented here.
44
Format follows [Keep a Changelog](https://keepachangelog.com/). Versions use [Semantic Versioning](https://semver.org/).
55

6+
## [1.14.2] — 2026-06-09
7+
8+
Workers AI catalog expansion for Cloudflare credit-backed gateway routing.
9+
10+
### Added
11+
- **Cloudflare Kimi K2.6** — adds `@cf/moonshotai/kimi-k2.6` as an active Workers AI catalog entry with long context, tool calling, vision, and structured-agent workload metadata.
12+
- **Cloudflare GLM-4.7-Flash** — adds `@cf/zai-org/glm-4.7-flash` as an active fast/balanced Workers AI catalog entry with long context and tool-calling metadata.
13+
- **Cloudflare DeepSeek V4 Pro** — adds the dashboard model slug `deepseek/deepseek-v4-pro` as an active high-performance Workers AI catalog entry for reasoning and coding routes.
14+
615
## [1.14.1] — 2026-06-07
716

817
Patch compatibility fix for Cerebras OpenAI-compatible tool-call responses.

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const llm = LLMProviders.fromEnv(env, {
119119
|----------|--------|-----------|-------|-------|
120120
| **OpenAI** | GPT-4o Mini, GPT-4 Turbo, GPT-4, GPT-3.5 Turbo | Yes | Yes | Default: `gpt-4o-mini` |
121121
| **Anthropic** | Claude Opus 4.6, Sonnet 4.6, Sonnet 4, Haiku 4.5, 3.7 Sonnet, 3.5 Sonnet/Haiku, 3 Opus/Sonnet | Yes | Yes | Default: `claude-haiku-4-5-20251001` |
122-
| **Cloudflare** | Gemma 4 26B, Llama 4 Scout, GPT-OSS 120B, LLaMA 3.x, Mistral 7B, Qwen 1.5, TinyLlama, and more | Yes | GPT-OSS, Gemma 4, Llama 4 Scout | Default is request-aware and catalog-driven |
122+
| **Cloudflare** | Kimi K2.6, GLM-4.7-Flash, DeepSeek V4 Pro, Gemma 4 26B, Llama 4 Scout, GPT-OSS 120B, LLaMA 3.x, Mistral 7B, Qwen 1.5, TinyLlama, and more | Yes | Kimi, GLM, GPT-OSS, Gemma 4, Llama 4 Scout | Default is request-aware and catalog-driven |
123123
| **Cerebras** | GPT-OSS 120B, ZAI-GLM 4.7, LLaMA 3.1 8B *(deprecated 2026-05-27)*, Qwen 3 235B *(deprecated 2026-05-27)* | Yes | GLM, Qwen, GPT-OSS | ~2,200 tok/s |
124124
| **Groq** | LLaMA 3.3 70B Versatile, LLaMA 3.1 8B Instant, GPT-OSS 120B, Compound, Compound Mini | Yes | LLaMA 3.3 70B, GPT-OSS 120B | Ultra-fast inference; Compound systems run built-in tools |
125125
| **NVIDIA NIM** | Llama 3.3/3.1 70B, Llama 4 Maverick, Nemotron 70B/49B/253B, Mistral Large 2, DeepSeek V4 Flash/Pro | Yes | Llama, Nemotron, Mistral Large 2 | Costs $0 placeholder — dev-tier credits; set real rates in `CreditLedger` |
@@ -674,7 +674,7 @@ fs.writeFileSync('fixtures/openai.json', JSON.stringify(shape, null, 2));
674674
| `LLMProviderFactory` | Lower-level factory with provider chain building, catalog-based routing, and fallback logic |
675675
| `OpenAIProvider` | OpenAI GPT models (streaming, tools) |
676676
| `AnthropicProvider` | Anthropic Claude models (streaming, tools) |
677-
| `CloudflareProvider` | Cloudflare Workers AI (streaming, tools on GPT-OSS/Gemma 4/Llama 4, batch) |
677+
| `CloudflareProvider` | Cloudflare Workers AI (streaming, tools on Kimi/GLM/GPT-OSS/Gemma 4/Llama 4, batch) |
678678
| `CerebrasProvider` | Cerebras fast inference (streaming, tools on GLM/Qwen) |
679679
| `GroqProvider` | Groq fast inference (streaming, tools on GPT-OSS/LLaMA 3.3 70B; server-side built-in tools on Compound systems and GPT-OSS) |
680680
| `NvidiaProvider` | NVIDIA NIM inference (streaming, tools on Llama/Nemotron/Mistral) |

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stackbilt/llm-providers",
3-
"version": "1.14.1",
3+
"version": "1.14.2",
44
"description": "Multi-LLM failover with circuit breakers, cost tracking, and intelligent retry. Cloudflare Workers native.",
55
"author": "Stackbilt <[email protected]>",
66
"license": "Apache-2.0",

‎src/__tests__/cloudflare.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ describe('CloudflareProvider', () => {
9898
});
9999

100100
it('should recommend a BALANCED catalog model over tiny legacy defaults', () => {
101-
// Gemma is no longer in the BALANCED use-case list (issue #57), so the top
102-
// cloudflare-only BALANCED pick is mistral-7b (has BALANCED + higher score).
101+
// Newer Workers AI catalog entries should outrank tiny legacy defaults
102+
// for normal balanced requests.
103103
expect(provider.getRecommendedModel({
104104
messages: [{ role: 'user', content: 'Hello' }],
105105
maxTokens: 200
106-
})).toBe('@cf/mistral/mistral-7b-instruct-v0.1');
106+
})).toBe('@cf/zai-org/glm-4.7-flash');
107107

108108
expect(provider.getRecommendedModel({
109109
messages: [{ role: 'user', content: 'Use the weather tool' }],

‎src/model-catalog.ts‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,36 @@ export const MODEL_CATALOG: readonly ModelCatalogEntry[] = [
328328
outputTokenCost: 0.0000008,
329329
description: 'Workers AI GPT-OSS 120B'
330330
}, { speed: 4, quality: 5, cost: 4 }),
331+
entry('cloudflare', '@cf/moonshotai/kimi-k2.6', 'active', ['HIGH_PERFORMANCE', 'TOOL_CALLING', 'LONG_CONTEXT', 'VISION', 'BALANCED'], {
332+
maxContextLength: 262100,
333+
supportsStreaming: true,
334+
supportsTools: true,
335+
toolCalling: true,
336+
supportsVision: true,
337+
supportsBatching: true,
338+
inputTokenCost: 0,
339+
outputTokenCost: 0,
340+
description: 'Workers AI Kimi K2.6 — frontier-scale agent model with multi-turn tools, vision, structured outputs, and 262K context'
341+
}, { speed: 3, quality: 5, cost: 5 }),
342+
entry('cloudflare', '@cf/zai-org/glm-4.7-flash', 'active', ['COST_EFFECTIVE', 'BALANCED', 'TOOL_CALLING', 'LONG_CONTEXT'], {
343+
maxContextLength: 131072,
344+
supportsStreaming: true,
345+
supportsTools: true,
346+
toolCalling: true,
347+
supportsBatching: true,
348+
inputTokenCost: 0,
349+
outputTokenCost: 0,
350+
description: 'Workers AI GLM-4.7-Flash — fast multilingual model with multi-turn tool calling and 131K context'
351+
}, { speed: 5, quality: 4, cost: 5 }),
352+
entry('cloudflare', 'deepseek/deepseek-v4-pro', 'active', ['HIGH_PERFORMANCE', 'BALANCED'], {
353+
maxContextLength: 128000,
354+
supportsStreaming: true,
355+
supportsTools: false,
356+
supportsBatching: true,
357+
inputTokenCost: 0,
358+
outputTokenCost: 0,
359+
description: 'Workers AI DeepSeek V4 Pro - high-capability reasoning and coding model'
360+
}, { speed: 3, quality: 5, cost: 5 }),
331361
entry('cloudflare', '@cf/tinyllama/tinyllama-1.1b-chat-v1.0', 'compatibility', ['COST_EFFECTIVE'], {
332362
maxContextLength: 2048,
333363
supportsStreaming: true,

‎src/providers/cloudflare.ts‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ export class CloudflareProvider extends BaseProvider {
148148
'@cf/mistral/mistral-7b-instruct-v0.1',
149149
'@cf/openchat/openchat-3.5-0106',
150150
'@cf/openai/gpt-oss-120b',
151+
'@cf/moonshotai/kimi-k2.6',
152+
'@cf/zai-org/glm-4.7-flash',
153+
'deepseek/deepseek-v4-pro',
151154
'@cf/tinyllama/tinyllama-1.1b-chat-v1.0',
152155
'@cf/qwen/qwen1.5-0.5b-chat',
153156
'@cf/qwen/qwen1.5-1.8b-chat',
@@ -334,6 +337,36 @@ export class CloudflareProvider extends BaseProvider {
334337
outputTokenCost: 0.00075, // $0.75/MTok
335338
description: 'GPT-OSS 120B - OpenAI-format tool calling on Workers AI'
336339
},
340+
'@cf/moonshotai/kimi-k2.6': {
341+
maxContextLength: 262100,
342+
supportsStreaming: true,
343+
supportsTools: true,
344+
toolCalling: true,
345+
supportsVision: true,
346+
supportsBatching: true,
347+
inputTokenCost: 0,
348+
outputTokenCost: 0,
349+
description: 'Kimi K2.6 — multi-turn tools, vision, structured outputs, 262K context'
350+
},
351+
'@cf/zai-org/glm-4.7-flash': {
352+
maxContextLength: 131072,
353+
supportsStreaming: true,
354+
supportsTools: true,
355+
toolCalling: true,
356+
supportsBatching: true,
357+
inputTokenCost: 0,
358+
outputTokenCost: 0,
359+
description: 'GLM-4.7-Flash — fast multilingual text generation with multi-turn tools'
360+
},
361+
'deepseek/deepseek-v4-pro': {
362+
maxContextLength: 128000,
363+
supportsStreaming: true,
364+
supportsTools: false,
365+
supportsBatching: true,
366+
inputTokenCost: 0,
367+
outputTokenCost: 0,
368+
description: 'DeepSeek V4 Pro - high-capability reasoning and coding model on Workers AI'
369+
},
337370
'@cf/tinyllama/tinyllama-1.1b-chat-v1.0': {
338371
maxContextLength: 2048,
339372
supportsStreaming: true,

‎src/version.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// Generated by scripts/sync-version.mjs; do not edit manually.
2-
export const VERSION = '1.14.1';
2+
export const VERSION = '1.14.2';

0 commit comments

Comments
 (0)