diff --git a/providers/cloudflare-ai-gateway/data/model_families.json b/providers/cloudflare-ai-gateway/data/model_families.json new file mode 100644 index 00000000..9f880a4c --- /dev/null +++ b/providers/cloudflare-ai-gateway/data/model_families.json @@ -0,0 +1,281 @@ +{ + "_comment": "Model family mappings for Cloudflare AI Gateway models. Patterns are matched in order (first match wins).", + "patterns": [ + { + "pattern": "^openai/gpt-3\\.?5", + "family": "gpt-3.5-turbo" + }, + { + "pattern": "^openai/gpt-4o-mini", + "family": "gpt-4o-mini" + }, + { + "pattern": "^openai/gpt-4o", + "family": "gpt-4o" + }, + { + "pattern": "^openai/gpt-4\\.?1", + "family": "gpt-4.1" + }, + { + "pattern": "^openai/gpt-4-turbo", + "family": "gpt-4-turbo" + }, + { + "pattern": "^openai/gpt-4$", + "family": "gpt-4" + }, + { + "pattern": "^openai/gpt-5\\.?1-codex", + "family": "gpt-5.1-codex" + }, + { + "pattern": "^openai/gpt-5\\.?1", + "family": "gpt-5.1" + }, + { + "pattern": "^openai/gpt-5\\.?2", + "family": "gpt-5.2" + }, + { + "pattern": "^openai/gpt-5", + "family": "gpt-5" + }, + { + "pattern": "^openai/o1", + "family": "o1" + }, + { + "pattern": "^openai/o3-pro", + "family": "o3-pro" + }, + { + "pattern": "^openai/o3-mini", + "family": "o3-mini" + }, + { + "pattern": "^openai/o3", + "family": "o3" + }, + { + "pattern": "^openai/o4-mini", + "family": "o4-mini" + }, + { + "pattern": "^openai/o4", + "family": "o4" + }, + { + "pattern": "^openai/gpt-oss-120b", + "family": "gpt-oss-120b" + }, + { + "pattern": "^openai/gpt-oss-20b", + "family": "gpt-oss-20b" + }, + { + "pattern": "^anthropic/claude-sonnet-4", + "family": "claude-sonnet" + }, + { + "pattern": "^anthropic/claude-opus-4", + "family": "claude-opus" + }, + { + "pattern": "^anthropic/claude-haiku-4", + "family": "claude-haiku" + }, + { + "pattern": "^anthropic/claude-3\\.?5-sonnet", + "family": "claude-sonnet" + }, + { + "pattern": "^anthropic/claude-3\\.?5-haiku", + "family": "claude-haiku" + }, + { + "pattern": "^anthropic/claude-3-opus", + "family": "claude-opus" + }, + { + "pattern": "^anthropic/claude-3-sonnet", + "family": "claude-sonnet" + }, + { + "pattern": "^anthropic/claude-3-haiku", + "family": "claude-haiku" + }, + { + "pattern": "llama-4-scout", + "family": "llama-4-scout" + }, + { + "pattern": "llama-4-maverick", + "family": "llama-4-maverick" + }, + { + "pattern": "llama-guard-3", + "family": "llama-guard" + }, + { + "pattern": "llama-3\\.?3", + "family": "llama-3.3" + }, + { + "pattern": "llama-3\\.?2-11b-vision", + "family": "llama-3.2-vision" + }, + { + "pattern": "llama-3\\.?2", + "family": "llama-3.2" + }, + { + "pattern": "llama-3\\.?1", + "family": "llama-3.1" + }, + { + "pattern": "llama-3", + "family": "llama-3" + }, + { + "pattern": "llama-2", + "family": "llama-2" + }, + { + "pattern": "qwen3-embedding", + "family": "qwen3-embedding" + }, + { + "pattern": "qwen3-coder", + "family": "qwen3-coder" + }, + { + "pattern": "qwen3", + "family": "qwen3" + }, + { + "pattern": "qwen2\\.?5-coder", + "family": "qwen2.5-coder" + }, + { + "pattern": "qwen2\\.?5", + "family": "qwen2.5" + }, + { + "pattern": "qwq-32b", + "family": "qwq" + }, + { + "pattern": "deepseek-r1-distill", + "family": "deepseek-r1-distill-qwen" + }, + { + "pattern": "deepseek-r1", + "family": "deepseek-r1" + }, + { + "pattern": "deepseek-v3", + "family": "deepseek-v3" + }, + { + "pattern": "deepseek-coder", + "family": "deepseek-coder" + }, + { + "pattern": "deepseek", + "family": "deepseek" + }, + { + "pattern": "gemma-sea-lion", + "family": "gemma-sea-lion" + }, + { + "pattern": "gemma-3", + "family": "gemma-3" + }, + { + "pattern": "gemma-2", + "family": "gemma-2" + }, + { + "pattern": "gemma", + "family": "gemma" + }, + { + "pattern": "mistral-small-3", + "family": "mistral-small" + }, + { + "pattern": "mistral-7b", + "family": "mistral-7b" + }, + { + "pattern": "mistral", + "family": "mistral" + }, + { + "pattern": "granite-4", + "family": "granite-4" + }, + { + "pattern": "granite", + "family": "granite" + }, + { + "pattern": "bge-reranker", + "family": "bge-reranker" + }, + { + "pattern": "bge-m3", + "family": "bge-m3" + }, + { + "pattern": "bge-large", + "family": "bge-large" + }, + { + "pattern": "bge-base", + "family": "bge-base" + }, + { + "pattern": "bge-small", + "family": "bge-small" + }, + { + "pattern": "aura-2", + "family": "aura-2" + }, + { + "pattern": "nova-3", + "family": "nova" + }, + { + "pattern": "bart-large-cnn", + "family": "bart" + }, + { + "pattern": "distilbert", + "family": "distilbert" + }, + { + "pattern": "melotts", + "family": "melotts" + }, + { + "pattern": "m2m100", + "family": "m2m100" + }, + { + "pattern": "plamo-embedding", + "family": "plamo-embedding" + }, + { + "pattern": "smart-turn", + "family": "smart-turn" + }, + { + "pattern": "indictrans2", + "family": "indictrans2" + } + ] +} diff --git a/providers/cloudflare-ai-gateway/data/model_names.json b/providers/cloudflare-ai-gateway/data/model_names.json index c09935cf..6e3c06a4 100644 --- a/providers/cloudflare-ai-gateway/data/model_names.json +++ b/providers/cloudflare-ai-gateway/data/model_names.json @@ -1,85 +1,66 @@ { - "openai/gpt-5.2": "openai/gpt-5.2", - "anthropic/claude-opus-4-5": "anthropic/claude-opus-4-5", - "openai/gpt-5.1-codex": "openai/gpt-5.1-codex", - "openai/gpt-5.1": "openai/gpt-5.1", - "workers-ai/@cf/qwen/qwen3-embedding-0.6b": "workers-ai/@cf/qwen/qwen3-embedding-0.6b", - "workers-ai/@cf/qwen/qwen3-30b-a3b-fp8": "workers-ai/@cf/qwen/qwen3-30b-a3b-fp8", - "workers-ai/@cf/deepgram/aura-2-en": "workers-ai/@cf/deepgram/aura-2-en", - "workers-ai/@cf/deepgram/nova-3": "workers-ai/@cf/deepgram/nova-3", - "workers-ai/@cf/deepgram/aura-2-es": "workers-ai/@cf/deepgram/aura-2-es", - "workers-ai/@cf/pipecat-ai/smart-turn-v2": "workers-ai/@cf/pipecat-ai/smart-turn-v2", - "workers-ai/@cf/myshell-ai/melotts": "workers-ai/@cf/myshell-ai/melotts", - "anthropic/claude-haiku-4-5": "anthropic/claude-haiku-4-5", - "anthropic/claude-opus-4-1": "anthropic/claude-opus-4-1", - "anthropic/claude-sonnet-4-5": "anthropic/claude-sonnet-4-5", - "workers-ai/@cf/ibm-granite/granite-4.0-h-micro": "workers-ai/@cf/ibm-granite/granite-4.0-h-micro", - "workers-ai/@cf/pfnet/plamo-embedding-1b": "workers-ai/@cf/pfnet/plamo-embedding-1b", - "workers-ai/@cf/ai4bharat/indictrans2-en-indic-1B": "workers-ai/@cf/ai4bharat/indictrans2-en-indic-1B", - "workers-ai/@cf/aisingapore/gemma-sea-lion-v4-27b-it": "workers-ai/@cf/aisingapore/gemma-sea-lion-v4-27b-it", - "workers-ai/llama-3.1-8b-instruct": "workers-ai/llama-3.1-8b-instruct", - "workers-ai/llama-3.2-11b-vision-instruct": "workers-ai/llama-3.2-11b-vision-instruct", - "workers-ai/bge-large-en-v1.5": "workers-ai/bge-large-en-v1.5", - "workers-ai/bge-base-en-v1.5": "workers-ai/bge-base-en-v1.5", - "workers-ai/llama-3.1-8b-instruct-awq": "workers-ai/llama-3.1-8b-instruct-awq", - "workers-ai/llama-3-8b-instruct-awq": "workers-ai/llama-3-8b-instruct-awq", - "workers-ai/bge-small-en-v1.5": "workers-ai/bge-small-en-v1.5", - "workers-ai/m2m100-1.2b": "workers-ai/m2m100-1.2b", - "workers-ai/llama-3.3-70b-instruct-fp8-fast": "workers-ai/llama-3.3-70b-instruct-fp8-fast", - "workers-ai/llama-3.2-1b-instruct": "workers-ai/llama-3.2-1b-instruct", - "workers-ai/llama-3.1-8b-instruct-fp8": "workers-ai/llama-3.1-8b-instruct-fp8", - "workers-ai/distilbert-sst-2-int8": "workers-ai/distilbert-sst-2-int8", - "workers-ai/llama-3.2-3b-instruct": "workers-ai/llama-3.2-3b-instruct", - "workers-ai/deepseek-r1-distill-qwen-32b": "workers-ai/deepseek-r1-distill-qwen-32b", - "workers-ai/llama-3-8b-instruct": "workers-ai/llama-3-8b-instruct", - "workers-ai/llama-2-7b-chat-fp16": "workers-ai/llama-2-7b-chat-fp16", - "workers-ai/mistral-7b-instruct-v0.1": "workers-ai/mistral-7b-instruct-v0.1", - "workers-ai/bge-m3": "workers-ai/bge-m3", - "workers-ai/llama-guard-3-8b": "workers-ai/llama-guard-3-8b", - "workers-ai/@cf/openai/gpt-oss-120b": "workers-ai/@cf/openai/gpt-oss-120b", - "workers-ai/@cf/openai/gpt-oss-20b": "workers-ai/@cf/openai/gpt-oss-20b", - "openai/o3-pro": "openai/o3-pro", - "openai/o3": "openai/o3", - "anthropic/claude-sonnet-4": "anthropic/claude-sonnet-4", - "anthropic/claude-opus-4": "anthropic/claude-opus-4", - "openai/o4-mini": "openai/o4-mini", - "workers-ai/@cf/meta/llama-4-scout-17b-16e-instruct": "workers-ai/@cf/meta/llama-4-scout-17b-16e-instruct", - "workers-ai/@cf/qwen/qwen2.5-coder-32b-instruct": "workers-ai/@cf/qwen/qwen2.5-coder-32b-instruct", - "workers-ai/@cf/mistralai/mistral-small-3.1-24b-instruct": "workers-ai/@cf/mistralai/mistral-small-3.1-24b-instruct", - "workers-ai/@cf/google/gemma-3-12b-it": "workers-ai/@cf/google/gemma-3-12b-it", - "workers-ai/@cf/qwen/qwq-32b": "workers-ai/@cf/qwen/qwq-32b", - "workers-ai/@cf/facebook/bart-large-cnn": "workers-ai/@cf/facebook/bart-large-cnn", - "workers-ai/@cf/baai/bge-reranker-base": "workers-ai/@cf/baai/bge-reranker-base", - "workers-ai/@cf/meta/llama-guard-3-8b": "workers-ai/@cf/meta/llama-guard-3-8b", - "workers-ai/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b": "workers-ai/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b", - "workers-ai/@cf/mistral/mistral-7b-instruct-v0.1": "workers-ai/@cf/mistral/mistral-7b-instruct-v0.1", - "workers-ai/@cf/meta/llama-3.2-1b-instruct": "workers-ai/@cf/meta/llama-3.2-1b-instruct", - "workers-ai/@cf/meta/llama-3.1-8b-instruct-fp8": "workers-ai/@cf/meta/llama-3.1-8b-instruct-fp8", - "workers-ai/@cf/baai/bge-base-en-v1.5": "workers-ai/@cf/baai/bge-base-en-v1.5", - "workers-ai/@cf/meta/llama-3.1-8b-instruct": "workers-ai/@cf/meta/llama-3.1-8b-instruct", - "workers-ai/@cf/baai/bge-small-en-v1.5": "workers-ai/@cf/baai/bge-small-en-v1.5", - "workers-ai/@cf/meta/m2m100-1.2b": "workers-ai/@cf/meta/m2m100-1.2b", - "workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast": "workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast", - "workers-ai/@cf/meta/llama-3.1-8b-instruct-awq": "workers-ai/@cf/meta/llama-3.1-8b-instruct-awq", - "workers-ai/@cf/baai/bge-large-en-v1.5": "workers-ai/@cf/baai/bge-large-en-v1.5", - "workers-ai/@cf/meta/llama-3.2-11b-vision-instruct": "workers-ai/@cf/meta/llama-3.2-11b-vision-instruct", - "workers-ai/@cf/meta/llama-3-8b-instruct-awq": "workers-ai/@cf/meta/llama-3-8b-instruct-awq", - "workers-ai/@cf/meta/llama-3.2-3b-instruct": "workers-ai/@cf/meta/llama-3.2-3b-instruct", - "workers-ai/@cf/baai/bge-m3": "workers-ai/@cf/baai/bge-m3", - "workers-ai/@cf/huggingface/distilbert-sst-2-int8": "workers-ai/@cf/huggingface/distilbert-sst-2-int8", - "workers-ai/@cf/meta/llama-3-8b-instruct": "workers-ai/@cf/meta/llama-3-8b-instruct", - "workers-ai/@cf/meta/llama-2-7b-chat-fp16": "workers-ai/@cf/meta/llama-2-7b-chat-fp16", - "openai/gpt-3.5-turbo": "openai/gpt-3.5-turbo", - "openai/gpt-4o": "openai/gpt-4o", - "openai/o3-mini": "openai/o3-mini", - "anthropic/claude-3.5-haiku": "anthropic/claude-3.5-haiku", - "openai/o1": "openai/o1", - "anthropic/claude-3-5-haiku": "anthropic/claude-3-5-haiku", - "anthropic/claude-3-haiku": "anthropic/claude-3-haiku", - "anthropic/claude-3-sonnet": "anthropic/claude-3-sonnet", - "anthropic/claude-3-opus": "anthropic/claude-3-opus", - "anthropic/claude-3.5-sonnet": "anthropic/claude-3.5-sonnet", - "openai/gpt-4-turbo": "openai/gpt-4-turbo", - "openai/gpt-4": "openai/gpt-4", - "openai/gpt-4o-mini": "openai/gpt-4o-mini" -} + "anthropic/claude-3-5-haiku": "Claude 3.5 Haiku", + "anthropic/claude-3-haiku": "Claude 3 Haiku", + "anthropic/claude-3-opus": "Claude 3 Opus", + "anthropic/claude-3-sonnet": "Claude 3 Sonnet", + "anthropic/claude-3.5-haiku": "Claude 3.5 Haiku", + "anthropic/claude-3.5-sonnet": "Claude 3.5 Sonnet", + "anthropic/claude-haiku-4-5": "Claude Haiku 4.5", + "anthropic/claude-opus-4": "Claude Opus 4", + "anthropic/claude-opus-4-1": "Claude Opus 4.1", + "anthropic/claude-opus-4-5": "Claude Opus 4.5", + "anthropic/claude-sonnet-4": "Claude Sonnet 4", + "anthropic/claude-sonnet-4-5": "Claude Sonnet 4.5", + "openai/gpt-3.5-turbo": "GPT 3.5 Turbo", + "openai/gpt-4": "GPT 4", + "openai/gpt-4-turbo": "GPT 4 Turbo", + "openai/gpt-4o": "GPT 4o", + "openai/gpt-4o-mini": "GPT 4o Mini", + "openai/gpt-5.1": "GPT 5.1", + "openai/gpt-5.1-codex": "GPT 5.1 Codex", + "openai/gpt-5.2": "GPT 5.2", + "openai/o1": "o1", + "openai/o3": "o3", + "openai/o3-mini": "o3 Mini", + "openai/o3-pro": "o3 Pro", + "openai/o4-mini": "o4 Mini", + "workers-ai/@cf/ai4bharat/indictrans2-en-indic-1B": "IndicTrans2 EN-Indic 1B", + "workers-ai/@cf/aisingapore/gemma-sea-lion-v4-27b-it": "Gemma SEA-LION v4 27B IT", + "workers-ai/@cf/baai/bge-base-en-v1.5": "BGE Base EN v1.5", + "workers-ai/@cf/baai/bge-large-en-v1.5": "BGE Large EN v1.5", + "workers-ai/@cf/baai/bge-m3": "BGE M3", + "workers-ai/@cf/baai/bge-reranker-base": "BGE Reranker Base", + "workers-ai/@cf/baai/bge-small-en-v1.5": "BGE Small EN v1.5", + "workers-ai/@cf/deepgram/aura-2-en": "Deepgram Aura 2 (EN)", + "workers-ai/@cf/deepgram/aura-2-es": "Deepgram Aura 2 (ES)", + "workers-ai/@cf/deepgram/nova-3": "Deepgram Nova 3", + "workers-ai/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b": "DeepSeek R1 Distill Qwen 32B", + "workers-ai/@cf/facebook/bart-large-cnn": "BART Large CNN", + "workers-ai/@cf/google/gemma-3-12b-it": "Gemma 3 12B IT", + "workers-ai/@cf/huggingface/distilbert-sst-2-int8": "DistilBERT SST-2 INT8", + "workers-ai/@cf/ibm-granite/granite-4.0-h-micro": "IBM Granite 4.0 H Micro", + "workers-ai/@cf/meta/llama-2-7b-chat-fp16": "Llama 2 7B Chat FP16", + "workers-ai/@cf/meta/llama-3-8b-instruct": "Llama 3 8B Instruct", + "workers-ai/@cf/meta/llama-3-8b-instruct-awq": "Llama 3 8B Instruct AWQ", + "workers-ai/@cf/meta/llama-3.1-8b-instruct": "Llama 3.1 8B Instruct", + "workers-ai/@cf/meta/llama-3.1-8b-instruct-awq": "Llama 3.1 8B Instruct AWQ", + "workers-ai/@cf/meta/llama-3.1-8b-instruct-fp8": "Llama 3.1 8B Instruct FP8", + "workers-ai/@cf/meta/llama-3.2-11b-vision-instruct": "Llama 3.2 11B Vision Instruct", + "workers-ai/@cf/meta/llama-3.2-1b-instruct": "Llama 3.2 1B Instruct", + "workers-ai/@cf/meta/llama-3.2-3b-instruct": "Llama 3.2 3B Instruct", + "workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast": "Llama 3.3 70B Instruct FP8 Fast", + "workers-ai/@cf/meta/llama-4-scout-17b-16e-instruct": "Llama 4 Scout 17B 16E Instruct", + "workers-ai/@cf/meta/llama-guard-3-8b": "Llama Guard 3 8B", + "workers-ai/@cf/meta/m2m100-1.2b": "M2M100 1.2B", + "workers-ai/@cf/mistral/mistral-7b-instruct-v0.1": "Mistral 7B Instruct v0.1", + "workers-ai/@cf/mistralai/mistral-small-3.1-24b-instruct": "Mistral Small 3.1 24B Instruct", + "workers-ai/@cf/myshell-ai/melotts": "MyShell MeloTTS", + "workers-ai/@cf/openai/gpt-oss-120b": "GPT OSS 120B", + "workers-ai/@cf/openai/gpt-oss-20b": "GPT OSS 20B", + "workers-ai/@cf/pfnet/plamo-embedding-1b": "PLaMo Embedding 1B", + "workers-ai/@cf/pipecat-ai/smart-turn-v2": "Pipecat Smart Turn v2", + "workers-ai/@cf/qwen/qwen2.5-coder-32b-instruct": "Qwen 2.5 Coder 32B Instruct", + "workers-ai/@cf/qwen/qwen3-30b-a3b-fp8": "Qwen3 30B A3B FP8", + "workers-ai/@cf/qwen/qwen3-embedding-0.6b": "Qwen3 Embedding 0.6B", + "workers-ai/@cf/qwen/qwq-32b": "QwQ 32B" +} \ No newline at end of file diff --git a/providers/cloudflare-ai-gateway/models/openai/gpt-3.5-turbo.toml b/providers/cloudflare-ai-gateway/models/openai/gpt-3.5-turbo.toml index a9fec8df..c9f977ae 100644 --- a/providers/cloudflare-ai-gateway/models/openai/gpt-3.5-turbo.toml +++ b/providers/cloudflare-ai-gateway/models/openai/gpt-3.5-turbo.toml @@ -1,21 +1,24 @@ -name = "GPT-3.5 Turbo" +name = "GPT-3.5-turbo" family = "gpt-3.5-turbo" -release_date = "2025-02-10" -last_updated = "2025-02-10" +release_date = "2023-03-01" +last_updated = "2023-11-06" attachment = false reasoning = false temperature = true +knowledge = "2021-09-01" tool_call = false +structured_output = false open_weights = false [cost] -input = 0 -output = 1.5 +input = 0.50 +output = 1.50 +cache_read = 1.25 [limit] -context = 128000 -output = 16384 +context = 16_385 +output = 4_096 [modalities] input = ["text"] -output = ["text"] +output = ["text"] \ No newline at end of file diff --git a/providers/cloudflare-ai-gateway/models/openai/gpt-4-turbo.toml b/providers/cloudflare-ai-gateway/models/openai/gpt-4-turbo.toml index d5ede049..bf144a29 100644 --- a/providers/cloudflare-ai-gateway/models/openai/gpt-4-turbo.toml +++ b/providers/cloudflare-ai-gateway/models/openai/gpt-4-turbo.toml @@ -1,21 +1,23 @@ name = "GPT-4 Turbo" family = "gpt-4-turbo" -release_date = "2024-07-23" -last_updated = "2024-07-23" -attachment = false +release_date = "2023-11-06" +last_updated = "2024-04-09" +attachment = true reasoning = false temperature = true -tool_call = false +knowledge = "2023-12" +tool_call = true +structured_output = false open_weights = false [cost] -input = 10 -output = 30 +input = 10.00 +output = 30.00 [limit] -context = 128000 -output = 16384 +context = 128_000 +output = 4_096 [modalities] -input = ["text"] +input = ["text", "image"] output = ["text"] diff --git a/providers/cloudflare-ai-gateway/models/openai/gpt-4.toml b/providers/cloudflare-ai-gateway/models/openai/gpt-4.toml index 6ed34234..ebdfa6c9 100644 --- a/providers/cloudflare-ai-gateway/models/openai/gpt-4.toml +++ b/providers/cloudflare-ai-gateway/models/openai/gpt-4.toml @@ -1,20 +1,22 @@ name = "GPT-4" family = "gpt-4" -release_date = "2024-07-23" -last_updated = "2024-07-23" -attachment = false +release_date = "2023-11-06" +last_updated = "2024-04-09" +attachment = true reasoning = false temperature = true -tool_call = false +knowledge = "2023-11" +tool_call = true +structured_output = false open_weights = false [cost] -input = 30 -output = 60 +input = 30.00 +output = 60.00 [limit] -context = 128000 -output = 16384 +context = 8192 +output = 8192 [modalities] input = ["text"] diff --git a/providers/cloudflare-ai-gateway/models/openai/gpt-4o-mini.toml b/providers/cloudflare-ai-gateway/models/openai/gpt-4o-mini.toml index b28187ce..887110ae 100644 --- a/providers/cloudflare-ai-gateway/models/openai/gpt-4o-mini.toml +++ b/providers/cloudflare-ai-gateway/models/openai/gpt-4o-mini.toml @@ -1,21 +1,24 @@ name = "GPT-4o mini" family = "gpt-4o-mini" -release_date = "2024-07-23" -last_updated = "2024-07-23" -attachment = false +release_date = "2024-07-18" +last_updated = "2024-07-18" +attachment = true reasoning = false temperature = true -tool_call = false +knowledge = "2023-09" +tool_call = true +structured_output = true open_weights = false [cost] -input = 0 -output = 0 +input = 0.15 +output = 0.60 +cache_read = 0.08 [limit] -context = 128000 -output = 16384 +context = 128_000 +output = 16_384 [modalities] -input = ["text"] +input = ["text", "image"] output = ["text"] diff --git a/providers/cloudflare-ai-gateway/models/openai/gpt-4o.toml b/providers/cloudflare-ai-gateway/models/openai/gpt-4o.toml index b3116389..f56b35ea 100644 --- a/providers/cloudflare-ai-gateway/models/openai/gpt-4o.toml +++ b/providers/cloudflare-ai-gateway/models/openai/gpt-4o.toml @@ -1,21 +1,24 @@ name = "GPT-4o" family = "gpt-4o" -release_date = "2025-02-10" -last_updated = "2025-02-10" -attachment = false +release_date = "2024-05-13" +last_updated = "2024-08-06" +attachment = true reasoning = false temperature = true -tool_call = false +knowledge = "2023-09" +tool_call = true +structured_output = true open_weights = false [cost] -input = 2.5 -output = 10 +input = 2.50 +output = 10.00 +cache_read = 1.25 [limit] -context = 128000 -output = 16384 +context = 128_000 +output = 16_384 [modalities] -input = ["text"] +input = ["text", "image"] output = ["text"] diff --git a/providers/cloudflare-ai-gateway/models/openai/gpt-5.1-codex.toml b/providers/cloudflare-ai-gateway/models/openai/gpt-5.1-codex.toml index 70447a2a..6ea4cfb5 100644 --- a/providers/cloudflare-ai-gateway/models/openai/gpt-5.1-codex.toml +++ b/providers/cloudflare-ai-gateway/models/openai/gpt-5.1-codex.toml @@ -1,21 +1,24 @@ name = "GPT-5.1 Codex" family = "gpt-5-codex" -release_date = "2025-11-14" -last_updated = "2025-11-14" -attachment = false -reasoning = false -temperature = true -tool_call = false +release_date = "2025-11-13" +last_updated = "2025-11-13" +attachment = true +reasoning = true +temperature = false +knowledge = "2024-09-30" +tool_call = true +structured_output = true open_weights = false [cost] input = 1.25 -output = 10 +output = 10.00 +cache_read = 0.125 [limit] -context = 128000 -output = 16384 +context = 400_000 +output = 128_000 [modalities] -input = ["text"] +input = ["text", "image"] output = ["text"] diff --git a/providers/cloudflare-ai-gateway/models/openai/gpt-5.1.toml b/providers/cloudflare-ai-gateway/models/openai/gpt-5.1.toml index e813e969..543129da 100644 --- a/providers/cloudflare-ai-gateway/models/openai/gpt-5.1.toml +++ b/providers/cloudflare-ai-gateway/models/openai/gpt-5.1.toml @@ -1,21 +1,23 @@ name = "GPT-5.1" family = "gpt-5" -release_date = "2025-11-14" -last_updated = "2025-11-14" -attachment = false -reasoning = false -temperature = true -tool_call = false +release_date = "2025-11-13" +last_updated = "2025-11-13" +attachment = true +reasoning = true +temperature = false +knowledge = "2024-09-30" +tool_call = true open_weights = false [cost] input = 1.25 -output = 10 +output = 10.00 +cache_read = 0.13 [limit] -context = 128000 -output = 16384 +context = 400_000 +output = 128_000 [modalities] -input = ["text"] +input = ["text", "image"] output = ["text"] diff --git a/providers/cloudflare-ai-gateway/models/openai/o1.toml b/providers/cloudflare-ai-gateway/models/openai/o1.toml index 52b57af6..fc16d970 100644 --- a/providers/cloudflare-ai-gateway/models/openai/o1.toml +++ b/providers/cloudflare-ai-gateway/models/openai/o1.toml @@ -1,21 +1,24 @@ name = "o1" family = "o1" -release_date = "2025-01-07" -last_updated = "2025-01-07" -attachment = false -reasoning = false -temperature = true -tool_call = false +release_date = "2024-12-05" +last_updated = "2024-12-05" +attachment = true +reasoning = true +temperature = false +knowledge = "2023-09" +tool_call = true +structured_output = true open_weights = false [cost] -input = 15 -output = 60 +input = 15.00 +output = 60.00 +cache_read = 7.50 [limit] -context = 128000 -output = 16384 +context = 200_000 +output = 100_000 [modalities] -input = ["text"] +input = ["text", "image"] output = ["text"] diff --git a/providers/cloudflare-ai-gateway/models/openai/o3-mini.toml b/providers/cloudflare-ai-gateway/models/openai/o3-mini.toml index 9de74b88..125bc085 100644 --- a/providers/cloudflare-ai-gateway/models/openai/o3-mini.toml +++ b/providers/cloudflare-ai-gateway/models/openai/o3-mini.toml @@ -1,20 +1,23 @@ -name = "o3 mini" +name = "o3-mini" family = "o3-mini" -release_date = "2025-02-05" -last_updated = "2025-02-05" +release_date = "2024-12-20" +last_updated = "2025-01-29" attachment = false -reasoning = false -temperature = true -tool_call = false +reasoning = true +temperature = false +knowledge = "2024-05" +tool_call = true +structured_output = true open_weights = false [cost] -input = 1.1 -output = 4.4 +input = 1.10 +output = 4.40 +cache_read = 0.55 [limit] -context = 128000 -output = 16384 +context = 200_000 +output = 100_000 [modalities] input = ["text"] diff --git a/providers/cloudflare-ai-gateway/models/openai/o3-pro.toml b/providers/cloudflare-ai-gateway/models/openai/o3-pro.toml index 5e16e193..b5674ad7 100644 --- a/providers/cloudflare-ai-gateway/models/openai/o3-pro.toml +++ b/providers/cloudflare-ai-gateway/models/openai/o3-pro.toml @@ -1,21 +1,23 @@ -name = "O3 Pro" +name = "o3-pro" family = "o3-pro" -release_date = "2025-06-11" -last_updated = "2025-06-11" -attachment = false -reasoning = false -temperature = true -tool_call = false +release_date = "2025-06-10" +last_updated = "2025-06-10" +attachment = true +reasoning = true +temperature = false +knowledge = "2024-05" +tool_call = true +structured_output = true open_weights = false [cost] -input = 20 -output = 80 +input = 20.00 +output = 80.00 [limit] -context = 128000 -output = 16384 +context = 200_000 +output = 100_000 [modalities] -input = ["text"] +input = ["text", "image"] output = ["text"] diff --git a/providers/cloudflare-ai-gateway/models/openai/o3.toml b/providers/cloudflare-ai-gateway/models/openai/o3.toml index d00e4c43..68911bc3 100644 --- a/providers/cloudflare-ai-gateway/models/openai/o3.toml +++ b/providers/cloudflare-ai-gateway/models/openai/o3.toml @@ -1,21 +1,24 @@ -name = "O3" +name = "o3" family = "o3" -release_date = "2025-06-10" -last_updated = "2025-06-10" -attachment = false -reasoning = false -temperature = true -tool_call = false +release_date = "2025-04-16" +last_updated = "2025-04-16" +attachment = true +reasoning = true +temperature = false +knowledge = "2024-05" +tool_call = true +structured_output = true open_weights = false [cost] -input = 2 -output = 8 +input = 2.00 +output = 8.00 +cache_read = 0.50 [limit] -context = 128000 -output = 16384 +context = 200_000 +output = 100_000 [modalities] -input = ["text"] +input = ["text", "image"] output = ["text"] diff --git a/providers/cloudflare-ai-gateway/models/openai/o4-mini.toml b/providers/cloudflare-ai-gateway/models/openai/o4-mini.toml index 3dfaa19b..4472408d 100644 --- a/providers/cloudflare-ai-gateway/models/openai/o4-mini.toml +++ b/providers/cloudflare-ai-gateway/models/openai/o4-mini.toml @@ -1,21 +1,24 @@ -name = "o4 mini" +name = "o4-mini" family = "o4-mini" release_date = "2025-04-16" last_updated = "2025-04-16" -attachment = false -reasoning = false -temperature = true -tool_call = false +attachment = true +reasoning = true +temperature = false +knowledge = "2024-05" +tool_call = true +structured_output = true open_weights = false [cost] -input = 1.1 -output = 4.4 +input = 1.10 +output = 4.40 +cache_read = 0.28 [limit] -context = 128000 -output = 16384 +context = 200_000 +output = 100_000 [modalities] -input = ["text"] +input = ["text", "image"] output = ["text"] diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/indictrans2-en-indic-1B.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/ai4bharat/indictrans2-en-indic-1B.toml similarity index 90% rename from providers/cloudflare-ai-gateway/models/workers-ai/indictrans2-en-indic-1B.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/ai4bharat/indictrans2-en-indic-1B.toml index 0bbe7d8f..87e73750 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/indictrans2-en-indic-1B.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/ai4bharat/indictrans2-en-indic-1B.toml @@ -1,5 +1,5 @@ name = "IndicTrans2 EN-Indic 1B" -family = "indictrans2-en-indic" +family = "indictrans2" release_date = "2025-09-25" last_updated = "2025-09-25" attachment = false diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/gemma-sea-lion-v4-27b-it.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/aisingapore/gemma-sea-lion-v4-27b-it.toml similarity index 81% rename from providers/cloudflare-ai-gateway/models/workers-ai/gemma-sea-lion-v4-27b-it.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/aisingapore/gemma-sea-lion-v4-27b-it.toml index 3542a1e5..3577f84c 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/gemma-sea-lion-v4-27b-it.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/aisingapore/gemma-sea-lion-v4-27b-it.toml @@ -1,5 +1,5 @@ -name = "Gemma SEA-LION V4 27B IT" -family = "gemma" +name = "Gemma SEA-LION v4 27B IT" +family = "gemma-sea-lion" release_date = "2025-09-25" last_updated = "2025-09-25" attachment = false diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/bge-base-en-v1.5.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/baai/bge-base-en-v1.5.toml similarity index 70% rename from providers/cloudflare-ai-gateway/models/workers-ai/bge-base-en-v1.5.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/baai/bge-base-en-v1.5.toml index 7fdcd1a5..1415785a 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/bge-base-en-v1.5.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/baai/bge-base-en-v1.5.toml @@ -1,7 +1,7 @@ -name = "BGE Base EN V1.5" +name = "BGE Base EN v1.5" family = "bge-base" -release_date = "2025-08-23" -last_updated = "2025-08-23" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,7 +9,7 @@ tool_call = false open_weights = false [cost] -input = 67000 +input = 0 output = 0 [limit] diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/bge-large-en-v1.5.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/baai/bge-large-en-v1.5.toml similarity index 69% rename from providers/cloudflare-ai-gateway/models/workers-ai/bge-large-en-v1.5.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/baai/bge-large-en-v1.5.toml index b4a64a91..430b2eb2 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/bge-large-en-v1.5.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/baai/bge-large-en-v1.5.toml @@ -1,7 +1,7 @@ -name = "BGE Large EN V1.5" +name = "BGE Large EN v1.5" family = "bge-large" -release_date = "2025-08-23" -last_updated = "2025-08-23" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,7 +9,7 @@ tool_call = false open_weights = false [cost] -input = 200000 +input = 0 output = 0 [limit] diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/bge-m3.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/baai/bge-m3.toml similarity index 77% rename from providers/cloudflare-ai-gateway/models/workers-ai/bge-m3.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/baai/bge-m3.toml index f9248cbe..62c13a05 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/bge-m3.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/baai/bge-m3.toml @@ -1,7 +1,7 @@ name = "BGE M3" family = "bge-m3" -release_date = "2025-08-23" -last_updated = "2025-08-23" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,7 +9,7 @@ tool_call = false open_weights = false [cost] -input = 12000 +input = 0 output = 0 [limit] diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/bge-reranker-base.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/baai/bge-reranker-base.toml similarity index 92% rename from providers/cloudflare-ai-gateway/models/workers-ai/bge-reranker-base.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/baai/bge-reranker-base.toml index a45d2a48..8168c435 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/bge-reranker-base.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/baai/bge-reranker-base.toml @@ -1,5 +1,5 @@ name = "BGE Reranker Base" -family = "bge-rerank" +family = "bge-reranker" release_date = "2025-04-09" last_updated = "2025-04-09" attachment = false diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/bge-small-en-v1.5.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/baai/bge-small-en-v1.5.toml similarity index 69% rename from providers/cloudflare-ai-gateway/models/workers-ai/bge-small-en-v1.5.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/baai/bge-small-en-v1.5.toml index 9cdf6a45..b98c30cd 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/bge-small-en-v1.5.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/baai/bge-small-en-v1.5.toml @@ -1,7 +1,7 @@ -name = "BGE Small EN V1.5" +name = "BGE Small EN v1.5" family = "bge-small" -release_date = "2025-08-23" -last_updated = "2025-08-23" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,7 +9,7 @@ tool_call = false open_weights = false [cost] -input = 20000 +input = 0 output = 0 [limit] diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/aura-2-en.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/deepgram/aura-2-en.toml similarity index 84% rename from providers/cloudflare-ai-gateway/models/workers-ai/aura-2-en.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/deepgram/aura-2-en.toml index a2842319..d65a2ac7 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/aura-2-en.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/deepgram/aura-2-en.toml @@ -1,5 +1,5 @@ -name = "Aura 2 EN" -family = "aura-2-en" +name = "Deepgram Aura 2 (EN)" +family = "aura-2" release_date = "2025-11-14" last_updated = "2025-11-14" attachment = false diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/aura-2-es.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/deepgram/aura-2-es.toml similarity index 84% rename from providers/cloudflare-ai-gateway/models/workers-ai/aura-2-es.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/deepgram/aura-2-es.toml index 97ec8c8d..0cf48ff6 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/aura-2-es.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/deepgram/aura-2-es.toml @@ -1,5 +1,5 @@ -name = "Aura 2 ES" -family = "aura-2-es" +name = "Deepgram Aura 2 (ES)" +family = "aura-2" release_date = "2025-11-14" last_updated = "2025-11-14" attachment = false diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/nova-3.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/deepgram/nova-3.toml similarity index 91% rename from providers/cloudflare-ai-gateway/models/workers-ai/nova-3.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/deepgram/nova-3.toml index aa9f5b18..0f2f289c 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/nova-3.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/deepgram/nova-3.toml @@ -1,4 +1,4 @@ -name = "Nova 3" +name = "Deepgram Nova 3" family = "nova" release_date = "2025-11-14" last_updated = "2025-11-14" diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/deepseek-r1-distill-qwen-32b.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b.toml similarity index 66% rename from providers/cloudflare-ai-gateway/models/workers-ai/deepseek-r1-distill-qwen-32b.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b.toml index 7da93ca0..1ee2496d 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/deepseek-r1-distill-qwen-32b.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/deepseek-ai/deepseek-r1-distill-qwen-32b.toml @@ -1,7 +1,7 @@ name = "DeepSeek R1 Distill Qwen 32B" -family = "qwen" -release_date = "2025-08-23" -last_updated = "2025-08-23" +family = "deepseek-r1-distill-qwen" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,8 +9,8 @@ tool_call = false open_weights = false [cost] -input = 500000 -output = 4880000 +input = 0 +output = 4.88 [limit] context = 128000 diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/bart-large-cnn.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/facebook/bart-large-cnn.toml similarity index 91% rename from providers/cloudflare-ai-gateway/models/workers-ai/bart-large-cnn.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/facebook/bart-large-cnn.toml index 2b93b7a4..099ec2e6 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/bart-large-cnn.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/facebook/bart-large-cnn.toml @@ -1,5 +1,5 @@ name = "BART Large CNN" -family = "bart-large-cnn" +family = "bart" release_date = "2025-04-09" last_updated = "2025-04-09" attachment = false diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/gemma-3-12b-it.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/google/gemma-3-12b-it.toml similarity index 100% rename from providers/cloudflare-ai-gateway/models/workers-ai/gemma-3-12b-it.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/google/gemma-3-12b-it.toml diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/distilbert-sst-2-int8.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/huggingface/distilbert-sst-2-int8.toml similarity index 70% rename from providers/cloudflare-ai-gateway/models/workers-ai/distilbert-sst-2-int8.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/huggingface/distilbert-sst-2-int8.toml index ef0b0982..f7d98f9a 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/distilbert-sst-2-int8.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/huggingface/distilbert-sst-2-int8.toml @@ -1,7 +1,7 @@ name = "DistilBERT SST-2 INT8" -family = "distilbert-sst" -release_date = "2025-08-23" -last_updated = "2025-08-23" +family = "distilbert" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,7 +9,7 @@ tool_call = false open_weights = false [cost] -input = 26000 +input = 0 output = 0 [limit] diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/granite-4.0-h-micro.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/ibm-granite/granite-4.0-h-micro.toml similarity index 83% rename from providers/cloudflare-ai-gateway/models/workers-ai/granite-4.0-h-micro.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/ibm-granite/granite-4.0-h-micro.toml index 1bf2bad7..2128f9aa 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/granite-4.0-h-micro.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/ibm-granite/granite-4.0-h-micro.toml @@ -1,5 +1,5 @@ -name = "Granite 4.0 H Micro" -family = "granite" +name = "IBM Granite 4.0 H Micro" +family = "granite-4" release_date = "2025-10-15" last_updated = "2025-10-15" attachment = false diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/llama-2-7b-chat-fp16.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-2-7b-chat-fp16.toml similarity index 73% rename from providers/cloudflare-ai-gateway/models/workers-ai/llama-2-7b-chat-fp16.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-2-7b-chat-fp16.toml index f017171e..75c93eaa 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/llama-2-7b-chat-fp16.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-2-7b-chat-fp16.toml @@ -1,7 +1,7 @@ name = "Llama 2 7B Chat FP16" family = "llama-2" -release_date = "2025-08-23" -last_updated = "2025-08-23" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,8 +9,8 @@ tool_call = false open_weights = false [cost] -input = 560000 -output = 6670000 +input = 0 +output = 6.67 [limit] context = 128000 diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3-8b-instruct-awq.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3-8b-instruct-awq.toml similarity index 73% rename from providers/cloudflare-ai-gateway/models/workers-ai/llama-3-8b-instruct-awq.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3-8b-instruct-awq.toml index d8fb83cd..486b0d31 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3-8b-instruct-awq.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3-8b-instruct-awq.toml @@ -1,7 +1,7 @@ name = "Llama 3 8B Instruct AWQ" family = "llama-3" -release_date = "2025-08-23" -last_updated = "2025-08-23" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,8 +9,8 @@ tool_call = false open_weights = false [cost] -input = 120000 -output = 270000 +input = 0 +output = 0 [limit] context = 128000 diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3-8b-instruct.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3-8b-instruct.toml similarity index 73% rename from providers/cloudflare-ai-gateway/models/workers-ai/llama-3-8b-instruct.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3-8b-instruct.toml index 337b5dec..f6f576c4 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3-8b-instruct.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3-8b-instruct.toml @@ -1,7 +1,7 @@ name = "Llama 3 8B Instruct" family = "llama-3" -release_date = "2025-08-23" -last_updated = "2025-08-23" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,8 +9,8 @@ tool_call = false open_weights = false [cost] -input = 280000 -output = 830000 +input = 0 +output = 0 [limit] context = 128000 diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3.1-8b-instruct-awq.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.1-8b-instruct-awq.toml similarity index 74% rename from providers/cloudflare-ai-gateway/models/workers-ai/llama-3.1-8b-instruct-awq.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.1-8b-instruct-awq.toml index 954e7c68..f061c96b 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3.1-8b-instruct-awq.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.1-8b-instruct-awq.toml @@ -1,7 +1,7 @@ name = "Llama 3.1 8B Instruct AWQ" family = "llama-3.1" -release_date = "2025-08-23" -last_updated = "2025-08-23" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,8 +9,8 @@ tool_call = false open_weights = false [cost] -input = 120000 -output = 270000 +input = 0 +output = 0 [limit] context = 128000 diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3.1-8b-instruct-fp8.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.1-8b-instruct-fp8.toml similarity index 74% rename from providers/cloudflare-ai-gateway/models/workers-ai/llama-3.1-8b-instruct-fp8.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.1-8b-instruct-fp8.toml index d5999027..f136bda6 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3.1-8b-instruct-fp8.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.1-8b-instruct-fp8.toml @@ -1,7 +1,7 @@ name = "Llama 3.1 8B Instruct FP8" family = "llama-3.1" -release_date = "2025-08-23" -last_updated = "2025-08-23" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,8 +9,8 @@ tool_call = false open_weights = false [cost] -input = 150000 -output = 290000 +input = 0 +output = 0 [limit] context = 128000 diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3.1-8b-instruct.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.1-8b-instruct.toml similarity index 73% rename from providers/cloudflare-ai-gateway/models/workers-ai/llama-3.1-8b-instruct.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.1-8b-instruct.toml index d303d936..d93080c4 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3.1-8b-instruct.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.1-8b-instruct.toml @@ -1,7 +1,7 @@ name = "Llama 3.1 8B Instruct" family = "llama-3.1" -release_date = "2025-08-23" -last_updated = "2025-08-23" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,8 +9,8 @@ tool_call = false open_weights = false [cost] -input = 280000 -output = 830000 +input = 0 +output = 0 [limit] context = 128000 diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3.2-11b-vision-instruct.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.2-11b-vision-instruct.toml similarity index 68% rename from providers/cloudflare-ai-gateway/models/workers-ai/llama-3.2-11b-vision-instruct.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.2-11b-vision-instruct.toml index dfa7b325..97f872eb 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3.2-11b-vision-instruct.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.2-11b-vision-instruct.toml @@ -1,7 +1,7 @@ name = "Llama 3.2 11B Vision Instruct" -family = "llama-3.2" -release_date = "2025-08-23" -last_updated = "2025-08-23" +family = "llama-3.2-vision" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,8 +9,8 @@ tool_call = false open_weights = false [cost] -input = 49000 -output = 680000 +input = 0 +output = 0 [limit] context = 128000 diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3.2-1b-instruct.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.2-1b-instruct.toml similarity index 74% rename from providers/cloudflare-ai-gateway/models/workers-ai/llama-3.2-1b-instruct.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.2-1b-instruct.toml index bfcb3e47..ff05c632 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3.2-1b-instruct.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.2-1b-instruct.toml @@ -1,7 +1,7 @@ name = "Llama 3.2 1B Instruct" family = "llama-3.2" -release_date = "2025-08-23" -last_updated = "2025-08-23" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,8 +9,8 @@ tool_call = false open_weights = false [cost] -input = 27000 -output = 200000 +input = 0 +output = 0 [limit] context = 128000 diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3.2-3b-instruct.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.2-3b-instruct.toml similarity index 74% rename from providers/cloudflare-ai-gateway/models/workers-ai/llama-3.2-3b-instruct.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.2-3b-instruct.toml index c1dd4034..73c77f07 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3.2-3b-instruct.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.2-3b-instruct.toml @@ -1,7 +1,7 @@ name = "Llama 3.2 3B Instruct" family = "llama-3.2" -release_date = "2025-08-23" -last_updated = "2025-08-23" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,8 +9,8 @@ tool_call = false open_weights = false [cost] -input = 51000 -output = 340000 +input = 0 +output = 0 [limit] context = 128000 diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3.3-70b-instruct-fp8-fast.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast.toml similarity index 74% rename from providers/cloudflare-ai-gateway/models/workers-ai/llama-3.3-70b-instruct-fp8-fast.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast.toml index ae08015b..a126b1c9 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/llama-3.3-70b-instruct-fp8-fast.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast.toml @@ -1,7 +1,7 @@ name = "Llama 3.3 70B Instruct FP8 Fast" family = "llama-3.3" -release_date = "2025-08-23" -last_updated = "2025-08-23" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,8 +9,8 @@ tool_call = false open_weights = false [cost] -input = 290000 -output = 2250000 +input = 0 +output = 2.25 [limit] context = 128000 diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/llama-4-scout-17b-16e-instruct.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-4-scout-17b-16e-instruct.toml similarity index 100% rename from providers/cloudflare-ai-gateway/models/workers-ai/llama-4-scout-17b-16e-instruct.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-4-scout-17b-16e-instruct.toml diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/llama-guard-3-8b.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-guard-3-8b.toml similarity index 68% rename from providers/cloudflare-ai-gateway/models/workers-ai/llama-guard-3-8b.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-guard-3-8b.toml index 60a72213..6795dec4 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/llama-guard-3-8b.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/llama-guard-3-8b.toml @@ -1,7 +1,7 @@ name = "Llama Guard 3 8B" -family = "llama" -release_date = "2025-08-23" -last_updated = "2025-08-23" +family = "llama-guard" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,8 +9,8 @@ tool_call = false open_weights = false [cost] -input = 480000 -output = 30000 +input = 0 +output = 0 [limit] context = 128000 diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/m2m100-1.2b.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/m2m100-1.2b.toml similarity index 66% rename from providers/cloudflare-ai-gateway/models/workers-ai/m2m100-1.2b.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/m2m100-1.2b.toml index 88c639e4..482369f8 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/m2m100-1.2b.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/meta/m2m100-1.2b.toml @@ -1,7 +1,7 @@ name = "M2M100 1.2B" -family = "m2m100-1.2b" -release_date = "2025-08-23" -last_updated = "2025-08-23" +family = "m2m100" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,8 +9,8 @@ tool_call = false open_weights = false [cost] -input = 340000 -output = 340000 +input = 0 +output = 0 [limit] context = 128000 diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/mistral-7b-instruct-v0.1.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/mistral/mistral-7b-instruct-v0.1.toml similarity index 63% rename from providers/cloudflare-ai-gateway/models/workers-ai/mistral-7b-instruct-v0.1.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/mistral/mistral-7b-instruct-v0.1.toml index 4582982c..34a4c771 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/mistral-7b-instruct-v0.1.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/mistral/mistral-7b-instruct-v0.1.toml @@ -1,7 +1,7 @@ -name = "Mistral 7B Instruct V0.1" +name = "Mistral 7B Instruct v0.1" family = "mistral-7b" -release_date = "2025-08-23" -last_updated = "2025-08-23" +release_date = "2025-04-03" +last_updated = "2025-04-03" attachment = false reasoning = false temperature = true @@ -9,8 +9,8 @@ tool_call = false open_weights = false [cost] -input = 110000 -output = 190000 +input = 0 +output = 0 [limit] context = 128000 diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/mistral-small-3.1-24b-instruct.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/mistralai/mistral-small-3.1-24b-instruct.toml similarity index 100% rename from providers/cloudflare-ai-gateway/models/workers-ai/mistral-small-3.1-24b-instruct.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/mistralai/mistral-small-3.1-24b-instruct.toml diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/melotts.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/myshell-ai/melotts.toml similarity index 92% rename from providers/cloudflare-ai-gateway/models/workers-ai/melotts.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/myshell-ai/melotts.toml index 528c222a..df6fc51a 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/melotts.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/myshell-ai/melotts.toml @@ -1,4 +1,4 @@ -name = "MeloTTS" +name = "MyShell MeloTTS" family = "melotts" release_date = "2025-11-14" last_updated = "2025-11-14" diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/gpt-oss-120b.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/openai/gpt-oss-120b.toml similarity index 86% rename from providers/cloudflare-ai-gateway/models/workers-ai/gpt-oss-120b.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/openai/gpt-oss-120b.toml index 1a854224..cdb403b2 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/gpt-oss-120b.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/openai/gpt-oss-120b.toml @@ -1,5 +1,4 @@ -name = "GPT-OSS 120B" -family = "gpt-oss" +name = "GPT OSS 120B" release_date = "2025-08-05" last_updated = "2025-08-05" attachment = false diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/gpt-oss-20b.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/openai/gpt-oss-20b.toml similarity index 87% rename from providers/cloudflare-ai-gateway/models/workers-ai/gpt-oss-20b.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/openai/gpt-oss-20b.toml index 51e99023..6819e586 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/gpt-oss-20b.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/openai/gpt-oss-20b.toml @@ -1,5 +1,4 @@ -name = "GPT-OSS 20B" -family = "gpt-oss" +name = "GPT OSS 20B" release_date = "2025-08-05" last_updated = "2025-08-05" attachment = false diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/plamo-embedding-1b.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/pfnet/plamo-embedding-1b.toml similarity index 91% rename from providers/cloudflare-ai-gateway/models/workers-ai/plamo-embedding-1b.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/pfnet/plamo-embedding-1b.toml index a5d6f018..aed038f2 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/plamo-embedding-1b.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/pfnet/plamo-embedding-1b.toml @@ -1,5 +1,5 @@ name = "PLaMo Embedding 1B" -family = "embedding" +family = "plamo-embedding" release_date = "2025-09-25" last_updated = "2025-09-25" attachment = false diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/smart-turn-v2.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/pipecat-ai/smart-turn-v2.toml similarity index 90% rename from providers/cloudflare-ai-gateway/models/workers-ai/smart-turn-v2.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/pipecat-ai/smart-turn-v2.toml index 3832c3e2..a1b9fd28 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/smart-turn-v2.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/pipecat-ai/smart-turn-v2.toml @@ -1,4 +1,4 @@ -name = "Smart Turn V2" +name = "Pipecat Smart Turn v2" family = "smart-turn" release_date = "2025-11-14" last_updated = "2025-11-14" diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/qwen2.5-coder-32b-instruct.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/qwen/qwen2.5-coder-32b-instruct.toml similarity index 100% rename from providers/cloudflare-ai-gateway/models/workers-ai/qwen2.5-coder-32b-instruct.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/qwen/qwen2.5-coder-32b-instruct.toml diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/qwen3-30b-a3b-fp8.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/qwen/qwen3-30b-a3b-fp8.toml similarity index 100% rename from providers/cloudflare-ai-gateway/models/workers-ai/qwen3-30b-a3b-fp8.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/qwen/qwen3-30b-a3b-fp8.toml diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/qwen3-embedding-0.6b.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/qwen/qwen3-embedding-0.6b.toml similarity index 91% rename from providers/cloudflare-ai-gateway/models/workers-ai/qwen3-embedding-0.6b.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/qwen/qwen3-embedding-0.6b.toml index a11d32d6..da388c58 100644 --- a/providers/cloudflare-ai-gateway/models/workers-ai/qwen3-embedding-0.6b.toml +++ b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/qwen/qwen3-embedding-0.6b.toml @@ -1,5 +1,5 @@ name = "Qwen3 Embedding 0.6B" -family = "qwen3" +family = "qwen3-embedding" release_date = "2025-11-14" last_updated = "2025-11-14" attachment = false diff --git a/providers/cloudflare-ai-gateway/models/workers-ai/qwq-32b.toml b/providers/cloudflare-ai-gateway/models/workers-ai/@cf/qwen/qwq-32b.toml similarity index 100% rename from providers/cloudflare-ai-gateway/models/workers-ai/qwq-32b.toml rename to providers/cloudflare-ai-gateway/models/workers-ai/@cf/qwen/qwq-32b.toml diff --git a/providers/cloudflare-ai-gateway/scripts/03_generate_model_toml.sh b/providers/cloudflare-ai-gateway/scripts/03_generate_model_toml.sh index 8ec37c0f..19adce87 100755 --- a/providers/cloudflare-ai-gateway/scripts/03_generate_model_toml.sh +++ b/providers/cloudflare-ai-gateway/scripts/03_generate_model_toml.sh @@ -29,6 +29,7 @@ MODELS_DIR="${PROVIDER_DIR}/models" DATA_DIR="${PROVIDER_DIR}/data" PROVIDERS_DIR="${PROVIDER_DIR}/.." MODEL_NAMES_FILE="${DATA_DIR}/model_names.json" +MODEL_FAMILIES_FILE="${DATA_DIR}/model_families.json" API_RESPONSE_FILE="${DATA_DIR}/api_response.json" # Check if API response file exists @@ -61,6 +62,32 @@ GENERATED_COUNT=0 SKIPPED_COUNT=0 CROSS_REF_COUNT=0 +# ============================================================================= +# Helper function to get model family from mapping file +# ============================================================================= +get_model_family() { + local model_id="$1" + + # Return empty if families file doesn't exist + if [[ ! -f "${MODEL_FAMILIES_FILE}" ]]; then + echo "" + return + fi + + # Try to match patterns in order + local family + family=$(jq -r --arg id "${model_id}" ' + .patterns[] | .pattern as $p | .family as $f | select($id | test($p)) | $f + ' "${MODEL_FAMILIES_FILE}" | head -n 1) + + # Return family if found, empty otherwise + if [[ -n "${family}" && "${family}" != "null" ]]; then + echo "${family}" + else + echo "" + fi +} + # Process each model from the API response while IFS= read -r MODEL_JSON; do MODEL_ID=$(echo "${MODEL_JSON}" | jq -r '.id') @@ -83,21 +110,7 @@ while IFS= read -r MODEL_JSON; do # Extract provider and model name PROVIDER=$(echo "${MODEL_ID}" | cut -d'/' -f1) MODEL_NAME=$(echo "${MODEL_ID}" | cut -d'/' -f2-) - - # Convert model ID to file path based on the API format: - # - "workers-ai/@cf/vendor/model-name" -> "workers-ai/model-name.toml" - # - "anthropic/claude-3.5-haiku" -> "anthropic/claude-3.5-haiku.toml" (keep dots) - # - "openai/gpt-5.1" -> "openai/gpt-5.1.toml" (keep dots) - # IMPORTANT: Cloudflare uses dots in model IDs, so we preserve them - - if [[ "${MODEL_ID}" == workers-ai/@cf/* ]]; then - # Workers AI model: workers-ai/@cf/vendor/model-name -> workers-ai/model-name.toml - MODEL_NAME=$(echo "${MODEL_ID}" | sed 's|workers-ai/@cf/[^/]*/||') - MODEL_PATH="workers-ai/${MODEL_NAME}.toml" - else - # Keep the model ID as-is (Cloudflare uses dots in model names) - MODEL_PATH="${MODEL_ID}.toml" - fi + MODEL_PATH="${MODEL_ID}.toml" FULL_PATH="${MODELS_DIR}/${MODEL_PATH}" echo "${FULL_PATH}" >> "${API_MODEL_FILES}" @@ -130,6 +143,9 @@ while IFS= read -r MODEL_JSON; do # Escape double quotes for TOML string DISPLAY_NAME="${DISPLAY_NAME//\"/\\\"}" + # Get model family from mapping file + MODEL_FAMILY=$(get_model_family "${MODEL_ID}") + # Convert created_at timestamp to date (YYYY-MM-DD) if [[ "${CREATED_AT}" != "0" && "${CREATED_AT}" != "null" ]]; then RELEASE_DATE=$(date -r "${CREATED_AT}" +%Y-%m-%d 2>/dev/null || date -d "@${CREATED_AT}" +%Y-%m-%d 2>/dev/null || date +%Y-%m-%d) @@ -161,10 +177,15 @@ while IFS= read -r MODEL_JSON; do fi # Always overwrite to ensure data is up to date - cat > "${FULL_PATH}" << EOF -name = "${DISPLAY_NAME}" -release_date = "${RELEASE_DATE}" -last_updated = "${RELEASE_DATE}" + # Build the TOML content with optional family field + TOML_CONTENT="name = \"${DISPLAY_NAME}\"" + if [[ -n "${MODEL_FAMILY}" ]]; then + TOML_CONTENT="${TOML_CONTENT} +family = \"${MODEL_FAMILY}\"" + fi + TOML_CONTENT="${TOML_CONTENT} +release_date = \"${RELEASE_DATE}\" +last_updated = \"${RELEASE_DATE}\" attachment = false reasoning = false temperature = true @@ -180,9 +201,10 @@ context = 128000 output = 16384 [modalities] -input = ["text"] -output = ["text"] -EOF +input = [\"text\"] +output = [\"text\"]" + + echo "${TOML_CONTENT}" > "${FULL_PATH}" fi done < <(jq -c '.data[]' "${API_RESPONSE_FILE}") diff --git a/providers/cloudflare-ai-gateway/scripts/utils.sh b/providers/cloudflare-ai-gateway/scripts/utils.sh index d8948523..cc4dca1f 100644 --- a/providers/cloudflare-ai-gateway/scripts/utils.sh +++ b/providers/cloudflare-ai-gateway/scripts/utils.sh @@ -114,6 +114,10 @@ should_include_model() { # Check if provider is in the "include all" list for p in ${INCLUDE_ALL_PROVIDERS}; do if [[ "${provider}" == "${p}" ]]; then + # Special case for workers-ai: only include models with workers-ai/@cf/ prefix + if [[ "${provider}" == "workers-ai" && "${model_id}" != "workers-ai/@cf/"* ]]; then + return 1 # Exclude workers-ai models that don't have @cf/ namespace + fi return 0 # Include fi done