diff --git a/providers/clf-ai-gateway/logo.svg b/providers/clf-ai-gateway/logo.svg new file mode 100644 index 00000000000..24629b0df20 --- /dev/null +++ b/providers/clf-ai-gateway/logo.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/providers/clf-ai-gateway/models/deepseek-v4-flash.toml b/providers/clf-ai-gateway/models/deepseek-v4-flash.toml new file mode 100644 index 00000000000..1d0376385c4 --- /dev/null +++ b/providers/clf-ai-gateway/models/deepseek-v4-flash.toml @@ -0,0 +1,23 @@ +base_model = "deepseek/deepseek-v4-flash-0731" + +# Wire: only OpenAI-style `reasoning_effort` is forwarded, verbatim. No on/off toggle +# field is forwarded on this surface, so there is no "toggle" option to expose. +# Host accept-set for deepseek-v4-flash: low, medium, high, xhigh (anything else -> 400 naming this set; public +# in GET /v1/public/models -> capabilities.reasoning_efforts). Only the levels with a +# MEASURED distinct effect are advertised — same prompt, 3 samples per level, median +# reasoning_tokens, 2026-09-02: low 563 / medium 242 / high 199 / xhigh 226 (xhigh samples 1210/226/186) -> no consistent ordering; the accepted levels are not a reliable control. +# Accepted levels are inert and no toggle is forwarded -> no real caller control here. +reasoning_options = [] + +# Current promotional pricing (40% off list), USD/MTok — what the API bills today. +# Live source: GET /v1/public/models (nano-USD per token; /1000 = USD/MTok). +[cost] +input = 0.264 +output = 0.792 +cache_read = 0.008 + +# This gateway's serving surface, measured (context probed to the boundary; +# output verified via max_completion_tokens probes). +[limit] +context = 1_048_576 +output = 131_072 diff --git a/providers/clf-ai-gateway/models/deepseek-v4-pro.toml b/providers/clf-ai-gateway/models/deepseek-v4-pro.toml new file mode 100644 index 00000000000..6406e769496 --- /dev/null +++ b/providers/clf-ai-gateway/models/deepseek-v4-pro.toml @@ -0,0 +1,24 @@ +base_model = "deepseek/deepseek-v4-pro-0813" + +# Wire: only OpenAI-style `reasoning_effort` is forwarded, verbatim. No on/off toggle +# field is forwarded on this surface, so there is no "toggle" option to expose. +# Host accept-set for deepseek-v4-pro: low, medium, high, xhigh (anything else -> 400 naming this set; public +# in GET /v1/public/models -> capabilities.reasoning_efforts). Only the levels with a +# MEASURED distinct effect are advertised — same prompt, 3 samples per level, median +# reasoning_tokens, 2026-09-02: low 282 / medium 214 / high 746 / xhigh 4124 -> three graded behaviors; medium is an inert alias of low. +[[reasoning_options]] +type = "effort" +values = ["low", "high", "xhigh"] + +# Current promotional pricing (40% off list), USD/MTok — what the API bills today. +# Live source: GET /v1/public/models (nano-USD per token; /1000 = USD/MTok). +[cost] +input = 0.792 +output = 2.376 +cache_read = 0.026 + +# This gateway's serving surface, measured (context probed to the boundary; +# output verified via max_completion_tokens probes). +[limit] +context = 1_048_576 +output = 131_072 diff --git a/providers/clf-ai-gateway/models/glm-4.7-flash.toml b/providers/clf-ai-gateway/models/glm-4.7-flash.toml new file mode 100644 index 00000000000..e101460c46e --- /dev/null +++ b/providers/clf-ai-gateway/models/glm-4.7-flash.toml @@ -0,0 +1,23 @@ +base_model = "zhipuai/glm-4.7-flash" + +# Wire: only OpenAI-style `reasoning_effort` is forwarded, verbatim. No on/off toggle +# field is forwarded on this surface, so there is no "toggle" option to expose. +# Host accept-set for glm-4.7-flash: low, medium, high (anything else -> 400 naming this set; public +# in GET /v1/public/models -> capabilities.reasoning_efforts). Only the levels with a +# MEASURED distinct effect are advertised — same prompt, 3 samples per level, median +# reasoning_tokens, 2026-09-02: low 1294 / medium 1451 / high 567 with overlapping spreads (high samples 1778/567/192) -> no measurable graded control; the accepted levels are inert. +# Accepted levels are inert and no toggle is forwarded -> no real caller control here. +reasoning_options = [] + +# Current promotional pricing (40% off list), USD/MTok — what the API bills today. +# Live source: GET /v1/public/models (nano-USD per token; /1000 = USD/MTok). +# No cached tier for this model on this surface (public endpoint: cached_input = null). +[cost] +input = 0.036 +output = 0.24 + +# This gateway's serving surface, measured (context probed to the boundary; +# output verified via max_completion_tokens probes). +[limit] +context = 131_072 +output = 131_072 diff --git a/providers/clf-ai-gateway/models/glm-5.2.toml b/providers/clf-ai-gateway/models/glm-5.2.toml new file mode 100644 index 00000000000..621a658f352 --- /dev/null +++ b/providers/clf-ai-gateway/models/glm-5.2.toml @@ -0,0 +1,24 @@ +base_model = "zhipuai/glm-5.2" + +# Wire: only OpenAI-style `reasoning_effort` is forwarded, verbatim. No on/off toggle +# field is forwarded on this surface, so there is no "toggle" option to expose. +# Host accept-set for glm-5.2: low, medium, high, xhigh (anything else -> 400 naming this set; public +# in GET /v1/public/models -> capabilities.reasoning_efforts). Only the levels with a +# MEASURED distinct effect are advertised — same prompt, 3 samples per level, median +# reasoning_tokens, 2026-09-02: low 471 / medium 367 / high 356 / xhigh 666 -> only xhigh is distinct; low/medium/high overlap (medium/high are inert aliases of low). +[[reasoning_options]] +type = "effort" +values = ["low", "xhigh"] + +# Current promotional pricing (40% off list), USD/MTok — what the API bills today. +# Live source: GET /v1/public/models (nano-USD per token; /1000 = USD/MTok). +[cost] +input = 0.84 +output = 2.64 +cache_read = 0.156 + +# This gateway's serving surface, measured (context probed to the boundary; +# output verified via max_completion_tokens probes). +[limit] +context = 262_144 +output = 131_072 diff --git a/providers/clf-ai-gateway/models/glm-5.3-flash.toml b/providers/clf-ai-gateway/models/glm-5.3-flash.toml new file mode 100644 index 00000000000..768e3379a8e --- /dev/null +++ b/providers/clf-ai-gateway/models/glm-5.3-flash.toml @@ -0,0 +1,29 @@ +base_model = "zhipuai/glm-5.3-flash" + +# Wire: only OpenAI-style `reasoning_effort` is forwarded, verbatim. No on/off toggle +# field is forwarded on this surface, so there is no "toggle" option to expose. +# Host accept-set for glm-5.3-flash: low, medium, high, xhigh (anything else -> 400 naming this set; public +# in GET /v1/public/models -> capabilities.reasoning_efforts). Only the levels with a +# MEASURED distinct effect are advertised — same prompt, 3 samples per level, median +# reasoning_tokens, 2026-09-02: low 27 / medium 289 / high 31 / xhigh 295 -> two behaviors: {low,high} minimal, {medium,xhigh} full; medium and high are inert aliases. +[[reasoning_options]] +type = "effort" +values = ["low", "xhigh"] + +# Current promotional pricing (40% off list), USD/MTok — what the API bills today. +# Live source: GET /v1/public/models (nano-USD per token; /1000 = USD/MTok). +[cost] +input = 0.09 +output = 0.3 +cache_read = 0.018 + +# This gateway's serving surface, measured (context probed to the boundary; +# output verified via max_completion_tokens probes). +[limit] +context = 1_048_576 +output = 131_072 + +# Gateway accepts text + image_url parts only (no video/pdf on this surface). +[modalities] +input = ["text", "image"] +output = ["text"] diff --git a/providers/clf-ai-gateway/models/glm-5.3.toml b/providers/clf-ai-gateway/models/glm-5.3.toml new file mode 100644 index 00000000000..df4e8416e1f --- /dev/null +++ b/providers/clf-ai-gateway/models/glm-5.3.toml @@ -0,0 +1,24 @@ +base_model = "zhipuai/glm-5.3" + +# Wire: only OpenAI-style `reasoning_effort` is forwarded, verbatim. No on/off toggle +# field is forwarded on this surface, so there is no "toggle" option to expose. +# Host accept-set for glm-5.3: none, low, medium, high, max (anything else -> 400 naming this set; public +# in GET /v1/public/models -> capabilities.reasoning_efforts). Only the levels with a +# MEASURED distinct effect are advertised — same prompt, 3 samples per level, median +# reasoning_tokens, 2026-09-02: low 26 / medium 330 / high 32 / max 368 -> two behaviors: {low,high} minimal, {medium,max} full; medium and high are inert aliases; "none" is accepted but does not disable thinking, so it is not advertised. +[[reasoning_options]] +type = "effort" +values = ["low", "max"] + +# Current promotional pricing (40% off list), USD/MTok — what the API bills today. +# Live source: GET /v1/public/models (nano-USD per token; /1000 = USD/MTok). +[cost] +input = 0.84 +output = 2.64 +cache_read = 0.156 + +# This gateway's serving surface, measured (context probed to the boundary; +# output verified via max_completion_tokens probes). +[limit] +context = 1_048_576 +output = 131_072 diff --git a/providers/clf-ai-gateway/models/kimi-k2.6.toml b/providers/clf-ai-gateway/models/kimi-k2.6.toml new file mode 100644 index 00000000000..4851397b997 --- /dev/null +++ b/providers/clf-ai-gateway/models/kimi-k2.6.toml @@ -0,0 +1,28 @@ +base_model = "moonshotai/kimi-k2.6" + +# Wire: only OpenAI-style `reasoning_effort` is forwarded, verbatim. No on/off toggle +# field is forwarded on this surface, so there is no "toggle" option to expose. +# Host accept-set for kimi-k2.6: low, medium, high (anything else -> 400 naming this set; public +# in GET /v1/public/models -> capabilities.reasoning_efforts). Only the levels with a +# MEASURED distinct effect are advertised — same prompt, 3 samples per level, median +# reasoning_tokens, 2026-09-02: low 528 / medium 577 / high 456 -> flat; thinking is always on and the accepted levels are inert (matches the lab: toggle-only, and no toggle is forwarded here). +# Accepted levels are inert and no toggle is forwarded -> no real caller control here. +reasoning_options = [] + +# Current promotional pricing (40% off list), USD/MTok — what the API bills today. +# Live source: GET /v1/public/models (nano-USD per token; /1000 = USD/MTok). +[cost] +input = 0.57 +output = 2.4 +cache_read = 0.096 + +# This gateway's serving surface, measured (context probed to the boundary; +# output verified via max_completion_tokens probes). +[limit] +context = 262_144 +output = 131_072 + +# Gateway accepts text + image_url parts only (no video/pdf on this surface). +[modalities] +input = ["text", "image"] +output = ["text"] diff --git a/providers/clf-ai-gateway/models/kimi-k2.7-code.toml b/providers/clf-ai-gateway/models/kimi-k2.7-code.toml new file mode 100644 index 00000000000..40e7351919c --- /dev/null +++ b/providers/clf-ai-gateway/models/kimi-k2.7-code.toml @@ -0,0 +1,28 @@ +base_model = "moonshotai/kimi-k2.7-code" + +# Wire: only OpenAI-style `reasoning_effort` is forwarded, verbatim. No on/off toggle +# field is forwarded on this surface, so there is no "toggle" option to expose. +# Host accept-set for kimi-k2.7-code: low, medium, high (anything else -> 400 naming this set; public +# in GET /v1/public/models -> capabilities.reasoning_efforts). Only the levels with a +# MEASURED distinct effect are advertised — same prompt, 3 samples per level, median +# reasoning_tokens, 2026-09-02: low 141 / medium 155 / high 283 with overlapping spreads (high 207/283/426 vs medium 210/155/136) -> no reliable graded control; accepted levels are inert. +# Accepted levels are inert and no toggle is forwarded -> no real caller control here. +reasoning_options = [] + +# Current promotional pricing (40% off list), USD/MTok — what the API bills today. +# Live source: GET /v1/public/models (nano-USD per token; /1000 = USD/MTok). +[cost] +input = 0.57 +output = 2.4 +cache_read = 0.114 + +# This gateway's serving surface, measured (context probed to the boundary; +# output verified via max_completion_tokens probes). +[limit] +context = 262_144 +output = 131_072 + +# Gateway accepts text + image_url parts only (no video/pdf on this surface). +[modalities] +input = ["text", "image"] +output = ["text"] diff --git a/providers/clf-ai-gateway/models/qwen3.8-27b.toml b/providers/clf-ai-gateway/models/qwen3.8-27b.toml new file mode 100644 index 00000000000..49f96284d3d --- /dev/null +++ b/providers/clf-ai-gateway/models/qwen3.8-27b.toml @@ -0,0 +1,33 @@ +base_model = "alibaba/qwen3.8-27b" + +# Wire: only OpenAI-style `reasoning_effort` is forwarded, verbatim. No on/off toggle +# field is forwarded on this surface, so there is no "toggle" option to expose. +# Host accept-set for qwen3.8-27b: low, medium, xhigh (anything else -> 400 naming this set; public +# in GET /v1/public/models -> capabilities.reasoning_efforts). Only the levels with a +# MEASURED distinct effect are advertised — same prompt, 3 samples per level, median +# reasoning_tokens, 2026-09-02: low 138 / medium 166 / xhigh 245 (every xhigh sample above every low sample) -> xhigh distinct; medium is an inert alias of low. +[[reasoning_options]] +type = "effort" +values = ["low", "xhigh"] + +# Current promotional pricing (40% off list), USD/MTok — what the API bills today. +# Live source: GET /v1/public/models (nano-USD per token; /1000 = USD/MTok). +# cache_read = input is intentional, not a typo: this model has no verified cached +# tier on this surface, so cached tokens bill at the input rate. The public endpoint +# shows cached_input == input for both promo and list price (270/270 nano now, +# 450/450 list) — we do not advertise a cache discount we cannot prove. +[cost] +input = 0.27 +output = 1.92 +cache_read = 0.27 + +# This gateway's serving surface, measured (context probed to the boundary; +# output verified via max_completion_tokens probes). +[limit] +context = 262_144 +output = 131_072 + +# Gateway accepts text + image_url parts only (no video/pdf on this surface). +[modalities] +input = ["text", "image"] +output = ["text"] diff --git a/providers/clf-ai-gateway/provider.toml b/providers/clf-ai-gateway/provider.toml new file mode 100644 index 00000000000..fe3f9f783dd --- /dev/null +++ b/providers/clf-ai-gateway/provider.toml @@ -0,0 +1,10 @@ +name = "CLF AI Gateway" +env = ["CLF_AI_GATEWAY_API_KEY"] +npm = "@ai-sdk/openai-compatible" +# OpenAI-compatible gateway reselling Cloudflare Workers AI open-weight models +# (GLM, Kimi, DeepSeek, Qwen) with prepaid credits. Runs on Workers AI upstream +# by design and says so publicly: https://clfaigateway.dev/docs +# Model IDs are the gateway's canonical names (glm-5.3, kimi-k2.7-code, ...); +# the upstream @cf/... id is returned per model by GET /v1/public/models. +doc = "https://clfaigateway.dev/docs" +api = "https://api.clfaigateway.dev/v1"