sigoden / aichat

All-in-one LLM CLI tool featuring Shell Assistant, Chat-REPL, RAG, AI tools & agents, with access to OpenAI, Claude, Gemini, Ollama, Groq, and more.
Apache License 2.0
4.39k stars 301 forks source link

Please implement list of cloudflare models #1000

Closed vt-alt closed 3 hours ago

vt-alt commented 3 hours ago

List with models-openai-compatible is not working because of "GET not supported for requested URI." error. But it's still possible to list cloudlfare models with model search API https://developers.cloudflare.com/api/operations/workers-ai-search-model

$ curl -s "https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/models/search" -H "Authorization: Bearer $CLOUDFLARE_API_KEY" |  jq . | grep '"name": "@'
      "name": "@cf/qwen/qwen1.5-0.5b-chat",
      "name": "@cf/huggingface/distilbert-sst-2-int8",
      "name": "@cf/google/gemma-2b-it-lora",
      "name": "@hf/nexusflow/starling-lm-7b-beta",
      "name": "@cf/meta/llama-3-8b-instruct",
      "name": "@cf/meta/llama-3.2-3b-instruct",
      "name": "@hf/thebloke/llamaguard-7b-awq",
      "name": "@hf/thebloke/neural-chat-7b-v3-1-awq",
      "name": "@cf/facebook/detr-resnet-50",
      "name": "@cf/meta/llama-2-7b-chat-fp16",
      "name": "@cf/mistral/mistral-7b-instruct-v0.1",
      "name": "@cf/mistral/mistral-7b-instruct-v0.2-lora",
      "name": "@cf/openai/whisper",
      "name": "@cf/tinyllama/tinyllama-1.1b-chat-v1.0",
      "name": "@hf/mistral/mistral-7b-instruct-v0.2",
      "name": "@cf/fblgit/una-cybertron-7b-v2-bf16",
      "name": "@cf/llava-hf/llava-1.5-7b-hf",
      "name": "@cf/runwayml/stable-diffusion-v1-5-inpainting",
      "name": "@cf/black-forest-labs/flux-1-schnell",
      "name": "@cf/thebloke/discolm-german-7b-v1-awq",
      "name": "@cf/meta/llama-2-7b-chat-int8",
      "name": "@cf/meta/llama-3.1-8b-instruct-fp8",
      "name": "@hf/thebloke/mistral-7b-instruct-v0.1-awq",
      "name": "@cf/qwen/qwen1.5-7b-chat-awq",
      "name": "@cf/meta/llama-3.2-1b-instruct",
      "name": "@hf/thebloke/llama-2-13b-chat-awq",
      "name": "@cf/microsoft/resnet-50",
      "name": "@cf/bytedance/stable-diffusion-xl-lightning",
      "name": "@hf/thebloke/deepseek-coder-6.7b-base-awq",
      "name": "@cf/meta-llama/llama-2-7b-chat-hf-lora",
      "name": "@cf/lykon/dreamshaper-8-lcm",
      "name": "@cf/stabilityai/stable-diffusion-xl-base-1.0",
      "name": "@hf/thebloke/openhermes-2.5-mistral-7b-awq",
      "name": "@cf/meta/m2m100-1.2b",
      "name": "@hf/thebloke/deepseek-coder-6.7b-instruct-awq",
      "name": "@cf/baai/bge-small-en-v1.5",
      "name": "@cf/deepseek-ai/deepseek-math-7b-instruct",
      "name": "@cf/tiiuae/falcon-7b-instruct",
      "name": "@hf/nousresearch/hermes-2-pro-mistral-7b",
      "name": "@cf/baai/bge-base-en-v1.5",
      "name": "@cf/meta/llama-3.1-8b-instruct",
      "name": "@cf/meta/llama-3.1-8b-instruct-awq",
      "name": "@cf/unum/uform-gen2-qwen-500m",
      "name": "@hf/thebloke/zephyr-7b-beta-awq",
      "name": "@cf/google/gemma-7b-it-lora",
      "name": "@cf/qwen/qwen1.5-1.8b-chat",
      "name": "@cf/meta/llama-3-8b-instruct-awq",
      "name": "@cf/meta/llama-3.2-11b-vision-instruct",
      "name": "@cf/openai/whisper-tiny-en",
      "name": "@cf/defog/sqlcoder-7b-2",
      "name": "@cf/microsoft/phi-2",
      "name": "@hf/meta-llama/meta-llama-3-8b-instruct",
      "name": "@cf/facebook/bart-large-cnn",
      "name": "@cf/runwayml/stable-diffusion-v1-5-img2img",
      "name": "@hf/google/gemma-7b-it",
      "name": "@cf/qwen/qwen1.5-14b-chat-awq",
      "name": "@cf/openchat/openchat-3.5-0106",
      "name": "@cf/baai/bge-large-en-v1.5",

Btw, it would also be nice if aichat could autodiscover supported models.

sigoden commented 3 hours ago

Argcfile is for testing the provider's API locally.

The models-openai-compatible subcommand only works for the OpenAI-compatible list models API, as expected.

vt-alt commented 3 hours ago

I understand that, but thought it may be useful information in case you would want to add something like models-cloudflare. Or for other users willing to get list of CF models. ✌

sigoden commented 2 hours ago

There is no guarantee that argcfile provides a list of models for every LLM provider. Many LLM providers do not provide any list models API (or anything similar) at all.